摘要:啟動項目,驗證進入到項目中的中的方法的類中,在方法上點擊啟動啟動報錯,查看報錯原因分析問題原因說明端口被占用了。解決方法修改的端口號,或者將端口的應用的端口號修改了。再次啟動項目啟動成功,驗證項目,驗證成功
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)
啟動成功,驗證項目,驗證成功
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/68385.html
摘要:一從零開始環境搭建對于之前的框架的使用,各種配置文件一旦出錯之后錯誤難尋,這也是為什么被推上主流的原因,的配置簡單,說分鐘能從框架的搭建到運行也不為過現在更是微服務當道,所以在此總結下的一些知識,新手教程是一個基于和概念的項目自動化構建開源 SpringBoot2.x【一】從零開始環境搭建 對于之前的Spring框架的使用,各種配置文件XML、properties一旦出錯之后錯誤難尋,...
摘要:它使用約定大于配置的理念讓你的項目快速運行起來。如何使用構建工程第一步,當然是安裝傻瓜式教程,請自行百度。包名,填完和后自動生成,默認即可。確認無誤,點完成創建即可。 微信公眾號:一個優秀的廢人如有問題或建議,請后臺留言,我會盡力解決你的問題。 前言 新年立了個 flag,好好運營這個公眾號。具體來說,就是每周要寫兩篇文章在這個號發表。剛立的 flag 可不能這么快打臉。下面送上本周第...
摘要:由于本人更習慣使用所以后續案例都是基于與,同時這里是基于最新的編寫的哦創建項目初次接觸,我們先來看看如何創建一個項目,這里以為例,其他的工具小伙伴們自行搜索創建方式。創建完項目后,各位小伙伴請認真細心的對比下與傳統的工程有何區別如目錄結構。 SpringBoot 是為了簡化 Spring 應用的創建、運行、調試、部署等一系列問題而誕生的產物,自動裝配的特性讓我們可以更好的關注業務本身...
摘要:簡介它的設計目的就是為例簡化開發,開啟了各種自動裝配,你不想寫各種配置文件,引入相關的依賴就能迅速搭建起一個工程。它采用的是建立生產就緒的應用程序觀點,優先于配置的慣例。另,本系列教程全部用的作為開發工具。 簡介 spring boot 它的設計目的就是為例簡化開發,開啟了各種自動裝配,你不想寫各種配置文件,引入相關的依賴就能迅速搭建起一個web工程。它采用的是建立生產就緒的應用程序觀...
摘要:熱加載代表的是我們不需要重啟服務器,就能夠類檢測得到,重新生成類的字節碼文件無論是熱部署或者是熱加載都是基于類加載器來完成的。驗證階段字節碼文件不會對造成危害準備階段是會賦初始值,并不是程序中的值。 一、SpringBoot入門 今天在慕課網中看見了Spring Boot這么一個教程,這個Spring Boot作為JavaWeb的學習者肯定至少會聽過,但我是不知道他是什么玩意。 只是大...
閱讀 2328·2021-11-22 14:56
閱讀 1460·2021-09-24 09:47
閱讀 904·2019-08-26 18:37
閱讀 2818·2019-08-26 12:10
閱讀 1522·2019-08-26 11:55
閱讀 3140·2019-08-23 18:07
閱讀 2294·2019-08-23 14:08
閱讀 605·2019-08-23 12:12