小编在学习springboot的过程中遇到了启动报错的问题,具体错误如下:
Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled.
2018-11-11 12:39:15.923 ERROR 18872 — [ restartedMain] o.s.boot.SpringApplication : Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.apache.catalina.Context.addServletMapping(Ljava/lang/String;Ljava/lang/String;)V
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext
springboot学习笔记--启动springboot报错
最新推荐文章于 2024-05-05 11:16:30 发布
在学习SpringBoot过程中遇到启动报错,错误原因是Tomcat添加Servlet映射时的方法不存在。问题由依赖版本不兼容引起,具体是spring-boot-starter-parent版本为1.5.10.RELEASE。解决方法是将该父依赖版本升级到2.0.2.RELEASE。
摘要由CSDN通过智能技术生成