我是靠谱客的博主 搞怪火,最近开发中收集的这篇文章主要介绍Myeclipse2017下使用Maven搭建的spring boot项目怎样运行?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

刚开始接触SpringBoot以及Maven,在网上找到很多入门Demo,将这些Demo在Myecplise中导入后怎样运行?

①导入到Myecplise

②右击项目名-->Maven-->update Project 

③右击项目名-->run As -->SpringBootApp

④此时控制台会出现



  .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _
( ( )___ | '_ | '_| | '_ / _` |
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |___, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.0.RELEASE)


2018-07-07 09:56:13.414  INFO 7048 --- [           main] org.fkit.hellotest.App                   : Starting App on HAOHAO-PC with PID 7048 (H:MyEcplise2017Ci1WprkspacesSpringBoot_hellotesttargetclasses started by HAOHAO in H:MyEcplise2017Ci1WprkspacesSpringBoot_hellotest)
2018-07-07 09:56:13.423  INFO 7048 --- [           main] org.fkit.hellotest.App                   : No active profile set, falling back to default profiles: default
2018-07-07 09:56:13.742  INFO 7048 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1a0dcaa: startup date [Sat Jul 07 09:56:13 CST 2018]; root of context hierarchy
2018-07-07 09:56:17.072  INFO 7048 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2018-07-07 09:56:17.119  INFO 7048 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-07-07 09:56:17.119  INFO 7048 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.28
2018-07-07 09:56:17.162  INFO 7048 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [E:MyEcplise2017ci1binarycom.sun.java.jdk8.win32.x86_64_1.8.0.v112bin;C:WindowsSunJavabin;C:Windowssystem32;C:Windows;E:SoftwarePython3Scripts;E:SoftwarePython3;C:Program FilesJavajdk1.8.0_112bin;C:Program FilesJavajdk1.8.0_112jrebin;C:Program FilesCommon FilesMicrosoft SharedWindows Live;E:Oraclebaselistproduct11.2.0dbhome_1bin;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program FilesMicrosoftWeb Platform Installer;C:Program Files (x86)Microsoft ASP.NETASP.NET Web Pagesv1.0;C:Program FilesMicrosoft SQL Server110ToolsBinn;C:Program FilesJavajdk1.8.0_112bin;%MYSQL_HOME%bin;C:Program Files (x86)Windows Kits8.0Windows Performance Toolkit;C:Program Files (x86)Microsoft SQL ServerClient SDKODBC110ToolsBinn;C:Program Files (x86)Microsoft SQL Server120ToolsBinn;C:Program Files (x86)Microsoft SQL Server120DTSBinn;C:Program Files (x86)Microsoft SQL Server120ToolsBinnManagementStudio;E:GitGitcmd;E:NodeJs;C:Program FilesTortoiseSVNbin;C:Program FilesVisualSVN Serverbin;C:strawberrycbin;C:strawberryperlbin;C:Program FilesCommon FilesMicrosoft SharedWindows Live;E:Mavenapache-maven-3.5.2bin;C:UsersHAOHAOAppDataRoamingnpm;.]
2018-07-07 09:56:17.429  INFO 7048 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-07-07 09:56:17.430  INFO 7048 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3697 ms
2018-07-07 09:56:17.739  INFO 7048 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-07-07 09:56:17.766  INFO 7048 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-07-07 09:56:17.767  INFO 7048 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-07-07 09:56:17.768  INFO 7048 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-07-07 09:56:17.768  INFO 7048 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-07-07 09:56:18.705  INFO 7048 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1a0dcaa: startup date [Sat Jul 07 09:56:13 CST 2018]; root of context hierarchy
2018-07-07 09:56:18.921  INFO 7048 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello]}" onto public java.lang.String org.fkit.hellotest.HelloController.hello()
2018-07-07 09:56:18.937  INFO 7048 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-07-07 09:56:18.937  INFO 7048 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-07-07 09:56:19.015  INFO 7048 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-07-07 09:56:19.015  INFO 7048 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-07-07 09:56:19.114  INFO 7048 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-07-07 09:56:19.467  INFO 7048 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-07-07 09:56:19.587  INFO 7048 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2018-07-07 09:56:19.606  INFO 7048 --- [           main] org.fkit.hellotest.App                   : Started App in 7.506 seconds (JVM running for 10.507)
2018-07-07 09:58:11.028  INFO 7048 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-07-07 09:58:11.028  INFO 7048 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started

2018-07-07 09:58:11.093  INFO 7048 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 64 ms

 

⑤访问正确url

 

如果这篇文章帮助到了你,欢迎点赞鼓励,您的鼓励是我最大的动力!

 

最后

以上就是搞怪火为你收集整理的Myeclipse2017下使用Maven搭建的spring boot项目怎样运行?的全部内容,希望文章能够帮你解决Myeclipse2017下使用Maven搭建的spring boot项目怎样运行?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(76)

评论列表共有 0 条评论

立即
投稿
返回
顶部