摘要:启动项目,验证进入到项目中的中的方法的类中,在方法上点击启动启动报错,查看报错原因分析问题原因说明端口被占用了。解决方法修改的端口号,或者将端口的应用的端口号修改了。再次启动项目启动成功,验证项目,验证成功
1.创建项目
打开IDEA,File->New->Project
选择Spring Initializr,可以默认,也可以在Custom中输入https://start.spring.io,点击Next
编辑项目信息,点击Next
选择需要的引用,这里我们先只需要点击Web中的Web,同时,我们也可以在右上角选择Spring Boot的版本号,点击Next
确认项目的信息,以及保存的地址
Finish,完成项目的创建。
进入到spring-boot-lesson-1项目中的java中的main方法的类中,在main方法上点击启动
启动报错,查看报错原因:
"C:Program Files (x86)Javajdk1.8.0_91injava" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1746 - Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:ideaIUlibidea_rt.jar=1747:E:ideaIUin - Dfile.encoding=UTF-8 -classpath "C:Program Files (x86)Javajdk1.8.0_91jrelibcharsets.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibdeploy.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextaccess-bridge-32.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextcldrdata.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextdnsns.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextjaccess.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibext jfxrt.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextlocaledata.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibext ashorn.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextsunec.jar;C:Program Files (x86)Java jdk1.8.0_91jrelibextsunjce_provider.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextsunmscapi.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextsunpkcs11.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibext zipfs.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjavaws.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjce.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjfr.jar;C:Program Files (x86)Javajdk1.8.0_91jrelib jfxswt.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjsse.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibmanagement-agent.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibplugin.jar;C:Program Files (x86)Java jdk1.8.0_91jrelib esources.jar;C:Program Files (x86)Javajdk1.8.0_91jrelib t.jar;E:springbootspring-boot-lessons-1 argetclasses;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter-web1.5.10.RELEASEspring- boot-starter-web-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter1.5.10.RELEASEspring-boot-starter-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot1.5.10.RELEASE spring-boot-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-autoconfigure1.5.10.RELEASEspring-boot-autoconfigure-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter- logging1.5.10.RELEASEspring-boot-starter-logging-1.5.10.RELEASE.jar;E:mavenlocalwarehousechqoslogbacklogback-classic1.1.11logback-classic-1.1.11.jar;E:mavenlocalwarehousechqoslogbacklogback-core1.1.11logback-core- 1.1.11.jar;E:mavenlocalwarehouseorgslf4jjcl-over-slf4j1.7.25jcl-over-slf4j-1.7.25.jar;E:mavenlocalwarehouseorgslf4jjul-to-slf4j1.7.25jul-to-slf4j-1.7.25.jar;E:mavenlocalwarehouseorgslf4jlog4j-over-slf4j1.7.25log4j- over-slf4j-1.7.25.jar;E:mavenlocalwarehouseorgyamlsnakeyaml1.17snakeyaml-1.17.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter-tomcat1.5.10.RELEASEspring-boot-starter-tomcat-1.5.10.RELEASE.jar;E:maven localwarehouseorgapache omcatembed omcat-embed-core8.5.27 omcat-embed-core-8.5.27.jar;E:mavenlocalwarehouseorgapache omcat omcat-annotations-api8.5.27 omcat-annotations-api-8.5.27.jar;E:mavenlocalwarehouseorgapache omcatembed omcat-embed-el8.5.27 omcat-embed-el-8.5.27.jar;E:mavenlocalwarehouseorgapache omcatembed omcat-embed-websocket8.5.27 omcat-embed-websocket-8.5.27.jar;E:mavenlocalwarehouseorghibernatehibernate-validator 5.3.6.Finalhibernate-validator-5.3.6.Final.jar;E:mavenlocalwarehousejavaxvalidationvalidation-api1.1.0.Finalvalidation-api-1.1.0.Final.jar;E:mavenlocalwarehouseorgjbossloggingjboss-logging3.3.1.Finaljboss-logging- 3.3.1.Final.jar;E:mavenlocalwarehousecomfasterxmlclassmate1.3.4classmate-1.3.4.jar;E:mavenlocalwarehousecomfasterxmljacksoncorejackson-databind2.8.10jackson-databind-2.8.10.jar;E:mavenlocalwarehousecomfasterxml jacksoncorejackson-annotations2.8.0jackson-annotations-2.8.0.jar;E:mavenlocalwarehousecomfasterxmljacksoncorejackson-core2.8.10jackson-core-2.8.10.jar;E:mavenlocalwarehouseorgspringframeworkspring-web4.3.14.RELEASE spring-web-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-aop4.3.14.RELEASEspring-aop-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-beans4.3.14.RELEASEspring-beans- 4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-context4.3.14.RELEASEspring-context-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-webmvc4.3.14.RELEASEspring-webmvc-4.3.14.RELEASE.jar;E: mavenlocalwarehouseorgspringframeworkspring-expression4.3.14.RELEASEspring-expression-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgslf4jslf4j-api1.7.25slf4j-api-1.7.25.jar;E:mavenlocalwarehouseorgspringframeworkspring- core4.3.14.RELEASEspring-core-4.3.14.RELEASE.jar" com.segmentfault.springbootlessons1.SpringBootLessons1Application . ____ _ __ _ _ / / ___"_ __ _ _(_)_ __ __ _ ( ( )\___ | "_ | "_| | "_ / _` | / ___)| |_)| | | | | || (_| | ) ) ) ) " |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.10.RELEASE) 2018-02-01 09:35:21.465 INFO 10184 --- [ main] c.s.s.SpringBootLessons1Application : Starting SpringBootLessons1Application on YGW0211V with PID 10184 (E:springbootspring-boot-lessons-1 argetclasses started by qkf7476 in E:springbootspring-boot-lessons-1) 2018-02-01 09:35:21.472 INFO 10184 --- [ main] c.s.s.SpringBootLessons1Application : No active profile set, falling back to default profiles: default 2018-02-01 09:35:21.570 INFO 10184 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d282e0: startup date [Thu Feb 01 09:35:21 CST 2018]; root of context hierarchy 2018-02-01 09:35:23.824 INFO 10184 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) 2018-02-01 09:35:23.839 INFO 10184 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2018-02-01 09:35:23.840 INFO 10184 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.27 2018-02-01 09:35:24.029 INFO 10184 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2018-02-01 09:35:24.029 INFO 10184 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2463 ms 2018-02-01 09:35:24.351 INFO 10184 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: "dispatcherServlet" to [/] 2018-02-01 09:35:24.361 INFO 10184 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "characterEncodingFilter" to: [/*] 2018-02-01 09:35:24.363 INFO 10184 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "hiddenHttpMethodFilter" to: [/*] 2018-02-01 09:35:24.363 INFO 10184 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "httpPutFormContentFilter" to: [/*] 2018-02-01 09:35:24.363 INFO 10184 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "requestContextFilter" to: [/*] 2018-02-01 09:35:24.971 INFO 10184 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d282e0: startup date [Thu Feb 01 09:35:21 CST 2018]; root of context hierarchy 2018-02-01 09:35:25.097 INFO 10184 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2018-02-01 09:35:25.099 INFO 10184 --- [ 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.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2018-02-01 09:35:25.167 INFO 10184 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-02-01 09:35:25.167 INFO 10184 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-02-01 09:35:25.235 INFO 10184 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-02-01 09:35:25.498 INFO 10184 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2018-02-01 09:35:25.550 ERROR 10184 --- [ main] o.apache.catalina.core.StandardService : Failed to start connector [Connector[HTTP/1.1-8080]] org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.27.jar:8.5.27] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.27.jar:8.5.27] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) [spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE] at com.segmentfault.springbootlessons1.SpringBootLessons1Application.main(SpringBootLessons1Application.java:10) [classes/:na] Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1021) ~[tomcat-embed-core-8.5.27.jar:8.5.27] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.27.jar:8.5.27] ... 13 common frames omitted Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_91] at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_91] at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_91] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_91] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_91] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-embed-core-8.5.27.jar:8.5.27] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150) ~[tomcat-embed-core-8.5.27.jar:8.5.27] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591) ~[tomcat-embed-core-8.5.27.jar:8.5.27] at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018) ~[tomcat-embed-core-8.5.27.jar:8.5.27] ... 14 common frames omitted 2018-02-01 09:35:25.571 INFO 10184 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2018-02-01 09:35:25.606 INFO 10184 --- [ main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with "debug" enabled. 2018-02-01 09:35:25.612 ERROR 10184 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured. Action: Verify the connector"s configuration, identify and stop any process that"s listening on port 8080, or configure this application to listen on another port. 2018-02-01 09:35:25.615 INFO 10184 --- [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d282e0: startup date [Thu Feb 01 09:35:21 CST 2018]; root of context hierarchy 2018-02-01 09:35:25.617 INFO 10184 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown Process finished with exit code 1
分析问题原因:说明localhost:8080端口被占用了。
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
Caused by: java.net.BindException: Address already in use: bind
解决方法:修改springboot的端口号,或者将8080端口的应用的端口号修改了。
再次启动项目
"C:Program Files (x86)Javajdk1.8.0_91injava" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=2237 - Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:ideaIUlibidea_rt.jar=2238:E:ideaIUin - Dfile.encoding=UTF-8 -classpath "C:Program Files (x86)Javajdk1.8.0_91jrelibcharsets.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibdeploy.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextaccess-bridge-32.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextcldrdata.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextdnsns.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextjaccess.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibext jfxrt.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextlocaledata.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibext ashorn.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextsunec.jar;C:Program Files (x86)Java jdk1.8.0_91jrelibextsunjce_provider.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextsunmscapi.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibextsunpkcs11.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibext zipfs.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjavaws.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjce.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjfr.jar;C:Program Files (x86)Javajdk1.8.0_91jrelib jfxswt.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibjsse.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibmanagement-agent.jar;C:Program Files (x86)Javajdk1.8.0_91jrelibplugin.jar;C:Program Files (x86)Java jdk1.8.0_91jrelib esources.jar;C:Program Files (x86)Javajdk1.8.0_91jrelib t.jar;E:springbootspring-boot-lessons-1 argetclasses;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter-web1.5.10.RELEASEspring- boot-starter-web-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter1.5.10.RELEASEspring-boot-starter-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot1.5.10.RELEASE spring-boot-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-autoconfigure1.5.10.RELEASEspring-boot-autoconfigure-1.5.10.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter- logging1.5.10.RELEASEspring-boot-starter-logging-1.5.10.RELEASE.jar;E:mavenlocalwarehousechqoslogbacklogback-classic1.1.11logback-classic-1.1.11.jar;E:mavenlocalwarehousechqoslogbacklogback-core1.1.11logback-core- 1.1.11.jar;E:mavenlocalwarehouseorgslf4jjcl-over-slf4j1.7.25jcl-over-slf4j-1.7.25.jar;E:mavenlocalwarehouseorgslf4jjul-to-slf4j1.7.25jul-to-slf4j-1.7.25.jar;E:mavenlocalwarehouseorgslf4jlog4j-over-slf4j1.7.25log4j- over-slf4j-1.7.25.jar;E:mavenlocalwarehouseorgyamlsnakeyaml1.17snakeyaml-1.17.jar;E:mavenlocalwarehouseorgspringframeworkootspring-boot-starter-tomcat1.5.10.RELEASEspring-boot-starter-tomcat-1.5.10.RELEASE.jar;E:maven localwarehouseorgapache omcatembed omcat-embed-core8.5.27 omcat-embed-core-8.5.27.jar;E:mavenlocalwarehouseorgapache omcat omcat-annotations-api8.5.27 omcat-annotations-api-8.5.27.jar;E:mavenlocalwarehouseorgapache omcatembed omcat-embed-el8.5.27 omcat-embed-el-8.5.27.jar;E:mavenlocalwarehouseorgapache omcatembed omcat-embed-websocket8.5.27 omcat-embed-websocket-8.5.27.jar;E:mavenlocalwarehouseorghibernatehibernate-validator 5.3.6.Finalhibernate-validator-5.3.6.Final.jar;E:mavenlocalwarehousejavaxvalidationvalidation-api1.1.0.Finalvalidation-api-1.1.0.Final.jar;E:mavenlocalwarehouseorgjbossloggingjboss-logging3.3.1.Finaljboss-logging- 3.3.1.Final.jar;E:mavenlocalwarehousecomfasterxmlclassmate1.3.4classmate-1.3.4.jar;E:mavenlocalwarehousecomfasterxmljacksoncorejackson-databind2.8.10jackson-databind-2.8.10.jar;E:mavenlocalwarehousecomfasterxml jacksoncorejackson-annotations2.8.0jackson-annotations-2.8.0.jar;E:mavenlocalwarehousecomfasterxmljacksoncorejackson-core2.8.10jackson-core-2.8.10.jar;E:mavenlocalwarehouseorgspringframeworkspring-web4.3.14.RELEASE spring-web-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-aop4.3.14.RELEASEspring-aop-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-beans4.3.14.RELEASEspring-beans- 4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-context4.3.14.RELEASEspring-context-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgspringframeworkspring-webmvc4.3.14.RELEASEspring-webmvc-4.3.14.RELEASE.jar;E: mavenlocalwarehouseorgspringframeworkspring-expression4.3.14.RELEASEspring-expression-4.3.14.RELEASE.jar;E:mavenlocalwarehouseorgslf4jslf4j-api1.7.25slf4j-api-1.7.25.jar;E:mavenlocalwarehouseorgspringframeworkspring- core4.3.14.RELEASEspring-core-4.3.14.RELEASE.jar" com.segmentfault.springbootlessons1.SpringBootLessons1Application . ____ _ __ _ _ / / ___"_ __ _ _(_)_ __ __ _ ( ( )\___ | "_ | "_| | "_ / _` | / ___)| |_)| | | | | || (_| | ) ) ) ) " |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.10.RELEASE) 2018-02-01 09:45:05.184 INFO 17908 --- [ main] c.s.s.SpringBootLessons1Application : Starting SpringBootLessons1Application on YGW0211V with PID 17908 (E:springbootspring-boot-lessons-1 argetclasses started by qkf7476 in E:springbootspring-boot-lessons-1) 2018-02-01 09:45:05.191 INFO 17908 --- [ main] c.s.s.SpringBootLessons1Application : No active profile set, falling back to default profiles: default 2018-02-01 09:45:05.297 INFO 17908 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d282e0: startup date [Thu Feb 01 09:45:05 CST 2018]; root of context hierarchy 2018-02-01 09:45:07.429 INFO 17908 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) 2018-02-01 09:45:07.444 INFO 17908 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2018-02-01 09:45:07.446 INFO 17908 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.27 2018-02-01 09:45:07.577 INFO 17908 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2018-02-01 09:45:07.577 INFO 17908 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2283 ms 2018-02-01 09:45:07.788 INFO 17908 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: "dispatcherServlet" to [/] 2018-02-01 09:45:07.794 INFO 17908 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "characterEncodingFilter" to: [/*] 2018-02-01 09:45:07.795 INFO 17908 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "hiddenHttpMethodFilter" to: [/*] 2018-02-01 09:45:07.795 INFO 17908 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "httpPutFormContentFilter" to: [/*] 2018-02-01 09:45:07.795 INFO 17908 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: "requestContextFilter" to: [/*] 2018-02-01 09:45:08.350 INFO 17908 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@d282e0: startup date [Thu Feb 01 09:45:05 CST 2018]; root of context hierarchy 2018-02-01 09:45:08.458 INFO 17908 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2018-02-01 09:45:08.460 INFO 17908 --- [ 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.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2018-02-01 09:45:08.519 INFO 17908 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-02-01 09:45:08.519 INFO 17908 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-02-01 09:45:08.577 INFO 17908 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2018-02-01 09:45:08.824 INFO 17908 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2018-02-01 09:45:08.913 INFO 17908 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http) 2018-02-01 09:45:08.920 INFO 17908 --- [ main] c.s.s.SpringBootLessons1Application : Started SpringBootLessons1Application in 4.35 seconds (JVM running for 5.484)
启动成功,验证项目,验证成功
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/68385.html
摘要:一从零开始环境搭建对于之前的框架的使用,各种配置文件一旦出错之后错误难寻,这也是为什么被推上主流的原因,的配置简单,说分钟能从框架的搭建到运行也不为过现在更是微服务当道,所以在此总结下的一些知识,新手教程是一个基于和概念的项目自动化构建开源 SpringBoot2.x【一】从零开始环境搭建 对于之前的Spring框架的使用,各种配置文件XML、properties一旦出错之后错误难寻,...
摘要:它使用约定大于配置的理念让你的项目快速运行起来。如何使用构建工程第一步,当然是安装傻瓜式教程,请自行百度。包名,填完和后自动生成,默认即可。确认无误,点完成创建即可。 微信公众号:一个优秀的废人如有问题或建议,请后台留言,我会尽力解决你的问题。 前言 新年立了个 flag,好好运营这个公众号。具体来说,就是每周要写两篇文章在这个号发表。刚立的 flag 可不能这么快打脸。下面送上本周第...
摘要:由于本人更习惯使用所以后续案例都是基于与,同时这里是基于最新的编写的哦创建项目初次接触,我们先来看看如何创建一个项目,这里以为例,其他的工具小伙伴们自行搜索创建方式。创建完项目后,各位小伙伴请认真细心的对比下与传统的工程有何区别如目录结构。 SpringBoot 是为了简化 Spring 应用的创建、运行、调试、部署等一系列问题而诞生的产物,自动装配的特性让我们可以更好的关注业务本身...
摘要:简介它的设计目的就是为例简化开发,开启了各种自动装配,你不想写各种配置文件,引入相关的依赖就能迅速搭建起一个工程。它采用的是建立生产就绪的应用程序观点,优先于配置的惯例。另,本系列教程全部用的作为开发工具。 简介 spring boot 它的设计目的就是为例简化开发,开启了各种自动装配,你不想写各种配置文件,引入相关的依赖就能迅速搭建起一个web工程。它采用的是建立生产就绪的应用程序观...
摘要:热加载代表的是我们不需要重启服务器,就能够类检测得到,重新生成类的字节码文件无论是热部署或者是热加载都是基于类加载器来完成的。验证阶段字节码文件不会对造成危害准备阶段是会赋初始值,并不是程序中的值。 一、SpringBoot入门 今天在慕课网中看见了Spring Boot这么一个教程,这个Spring Boot作为JavaWeb的学习者肯定至少会听过,但我是不知道他是什么玩意。 只是大...
阅读 2287·2021-11-22 14:56
阅读 1338·2021-09-24 09:47
阅读 858·2019-08-26 18:37
阅读 2787·2019-08-26 12:10
阅读 1477·2019-08-26 11:55
阅读 3100·2019-08-23 18:07
阅读 2253·2019-08-23 14:08
阅读 579·2019-08-23 12:12