spring boot org.springframework.context.ApplicationContextException:Unable to start tomcat异常解决

已经是第二次遇到这个问题了,上一次和网上说的一样,是jar包冲突冲突,这次虽然是同样的错误,但是原因不同,说说自己犯的傻事:

看图:

spring boot org.springframework.context.ApplicationContextException:Unable to start tomcat异常解决

还有一节没有截完的图片

spring boot org.springframework.context.ApplicationContextException:Unable to start tomcat异常解决

 

能在idea中看到其实springboot项目已经启动,但是下面却包错。

----------------------------------------------------------------------------------------------------------------------------------------------------

说一下自己的解决方法:

    看到图中的model.AgentExample 么, 这是用generator自生成代码的时候将路径写错,导致启动报错

spring boot org.springframework.context.ApplicationContextException:Unable to start tomcat异常解决

将图中的地址改到自己的项目的路径下即可,我的路径是  com.szzt.csp.entity.AgentExample  

 

顺便说一下网上说的jar包重复,是有可能的,第一次包这样的错确实是jar包冲突,所以还要结合自己的项目具体看。

 比如这个错误 https://blog.****.net/liummmin/article/details/78779366