为了账号安全,请及时绑定邮箱和手机立即绑定

spring boot 启动报错,启动不去来怎么回事呀

https://img1.sycdn.imooc.com//5ad34b540001ebbd19170948.jpg

 :: Spring Boot ::        (v2.0.1.RELEASE)

2018-04-15 20:52:56.778  INFO 7476 --- [           main] com.example.demo.Demo1Application        : Starting Demo1Application on LAPTOP-4VDF7TDA with PID 7476 (started by admin in D:\Spring tool\work\demo-1)
2018-04-15 20:52:56.780  INFO 7476 --- [           main] com.example.demo.Demo1Application        : No active profile set, falling back to default profiles: default
2018-04-15 20:52:56.807  INFO 7476 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@37e547da: startup date [Sun Apr 15 20:52:56 GMT+08:00 2018]; root of context hierarchy
2018-04-15 20:52:57.407 ERROR 7476 --- [           main] o.a.catalina.core.AprLifecycleListener   : An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-04-15 20:52:57.452  INFO 7476 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2018-04-15 20:52:57.460 ERROR 7476 --- [           main] o.a.catalina.core.AprLifecycleListener   : An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-04-15 20:52:57.465  INFO 7476 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-04-15 20:52:57.465  INFO 7476 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.29
2018-04-15 20:52:57.468 ERROR 7476 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-04-15 20:52:57.536  INFO 7476 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-04-15 20:52:57.536  INFO 7476 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 731 ms
2018-04-15 20:52:57.619  INFO 7476 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-04-15 20:52:57.622  INFO 7476 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-04-15 20:52:57.622  INFO 7476 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-04-15 20:52:57.623  INFO 7476 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-04-15 20:52:57.623  INFO 7476 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-04-15 20:52:57.684  INFO 7476 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-15 20:52:57.805  INFO 7476 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@37e547da: startup date [Sun Apr 15 20:52:56 GMT+08:00 2018]; root of context hierarchy
2018-04-15 20:52:57.842  INFO 7476 --- [           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-04-15 20:52:57.843  INFO 7476 --- [           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-04-15 20:52:57.858  INFO 7476 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-15 20:52:57.859  INFO 7476 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-15 20:52:57.957  INFO 7476 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-04-15 20:52:58.133  INFO 7476 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2018-04-15 20:52:58.137  INFO 7476 --- [           main] com.example.demo.Demo1Application        : Started Demo1Application in 1.558 seconds (JVM running for 2.158)
2018-04-15 20:53:37.239 ERROR 7476 --- [nio-8080-exec-1] o.a.catalina.core.AprLifecycleListener   : An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-04-15 20:53:37.248  INFO 7476 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-04-15 20:53:37.248  INFO 7476 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-04-15 20:53:37.272  INFO 7476 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 23 ms


正在回答

4 回答

楼主你怎么解决的!!!求解


0 回复 有任何疑惑可以回复我~

加上后就显示 ERROR 7476 --- [nio-8080-exec-1] o.a.catalina.core.AprLifecycleListener   : An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]

0 回复 有任何疑惑可以回复我~

看error报错那行写的大概是,关于tomcat的一个依赖的版本号不正确,建议尝试在本地maven残酷找出那个依赖并删除,嫌麻烦可以直接把整个仓库的jar包删除,重新加载项目,再下载一次jar包。还有,新建工程之后,什么都不写,访问主页就是这样显示的,没问题。你可以写个mvc的controller,返回json,再访问相应的url试试。

1 回复 有任何疑惑可以回复我~
#1

慕粉3327984 提问者

大神,有个依赖是spring-boot-starter-web ,不加注解@requestmapping 不能用,加了报错怎么办
2018-04-16 回复 有任何疑惑可以回复我~
#2

cmy11 回复 慕粉3327984 提问者

加了报错,是指代码显示报错编译不通过吗?
2018-04-16 回复 有任何疑惑可以回复我~
#3

慕粉3327984 提问者 回复 cmy11

加上后就显示 ERROR 7476 --- [nio-8080-exec-1] o.a.catalina.core.AprLifecycleListener : An incompatible version [1.1.33] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
2018-04-16 回复 有任何疑惑可以回复我~
#4

慕粉3327984 提问者 回复 cmy11

端口还被占用了真烦,大神有时间能远程一下吗
2018-04-16 回复 有任何疑惑可以回复我~
#5

cmy11 回复 慕粉3327984 提问者

你把本地maven仓库目录的jar包全删除,重新建工程,让它重新解析依赖试下。新建工程的时候,可以勾选下web这个选项,就带有web相关的jar包,不需要手动引入依赖。
2018-04-16 回复 有任何疑惑可以回复我~
#6

cmy11 回复 慕粉3327984 提问者

打开任务管理器,找进程,找到java.exe,全都结束进程。然后重新启动。
2018-04-16 回复 有任何疑惑可以回复我~
#7

cmy11 回复 慕粉3327984 提问者

端口占用是因为你之前启动的没有关闭,可以看下你的ide控制台,是不是之前启动过项目了,把它停掉。当然可能会找不到,就按我上面说的,从任务管理器结束掉名字带有java的相关进程。
2018-04-16 回复 有任何疑惑可以回复我~
#8

慕粉3327984 提问者 回复 cmy11

鑫新建项目就不能启动,
2018-04-16 回复 有任何疑惑可以回复我~
#9

慕粉3327984 提问者 回复 cmy11

[ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-04-16 回复 有任何疑惑可以回复我~
#10

慕粉3327984 提问者 回复 慕粉3327984 提问者

[ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4de5031f: startup date [Mon Apr 16 11:14:15 GMT+08:00 2018]; root of context hierarchy
2018-04-16 回复 有任何疑惑可以回复我~
#11

cmy11 回复 慕粉3327984 提问者

如果你没有勾选任何相关依赖(就是说还没有带有web的依赖),这个是信息正常的。 引入以下依赖,然后写一个controller,再重启访问试试。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>
2018-04-16 回复 有任何疑惑可以回复我~
#12

慕粉3327984 提问者 回复 cmy11

大神,我知道java结束进程,但是新项目都不能启动,也不能加注解@requstmapping ,我才在maven中加依赖 spring-boot-starter-web,求远程一下呗
2018-04-16 回复 有任何疑惑可以回复我~
#13

慕粉3327984 提问者 回复 cmy11

1005068661
2018-04-16 回复 有任何疑惑可以回复我~
#14

慕粉3327984 提问者 回复 cmy11

谢谢呀,给你红包
2018-04-16 回复 有任何疑惑可以回复我~
#15

慕粉3327984 提问者 回复 慕粉3327984 提问者

晚上说
2018-04-16 回复 有任何疑惑可以回复我~
#16

慕粉3327984 提问者 回复 cmy11

大神,下班了没那,有时间帮我先看下呗
2018-04-16 回复 有任何疑惑可以回复我~
查看16条回复

访问出现这个https://img1.sycdn.imooc.com//5ad34c070001360c16940578.jpg

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

spring boot 启动报错,启动不去来怎么回事呀

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信