springboot学习笔记--启动springboot报错

在学习SpringBoot过程中遇到启动报错,错误原因是Tomcat添加Servlet映射时的方法不存在。问题由依赖版本不兼容引起,具体是spring-boot-starter-parent版本为1.5.10.RELEASE。解决方法是将该父依赖版本升级到2.0.2.RELEASE。
摘要由CSDN通过智能技术生成

小编在学习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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值