关于SpringBoot启动类报错的问题解决
2018-04-05 11:48
741 查看
在SpringBoot的Maven项目中 SpringBoot的启动类报错为:
The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. It is indirectly referenced from required .class files
如图:
查找相关的文章 应该是maven缓存损坏
解决办法:
找到该maven项目的文件夹(带有pom.xml的目录) shift+右键 => 在此处打开命令行窗口
=> 输入mvn dependency:purge-local-repository => 回车 执行成功的界面如图:
这时如果不能解决 则将 〜/ .m2 / repository / org / springframework 文件夹删除 然后再执行
mvn package
如果mvn命令无法执行 则要对maven项目进行配置 方法为:
在pom.xml中加上
然后alt+f5 => update project 即可
The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. It is indirectly referenced from required .class files
如图:
查找相关的文章 应该是maven缓存损坏
解决办法:
找到该maven项目的文件夹(带有pom.xml的目录) shift+右键 => 在此处打开命令行窗口
=> 输入mvn dependency:purge-local-repository => 回车 执行成功的界面如图:
这时如果不能解决 则将 〜/ .m2 / repository / org / springframework 文件夹删除 然后再执行
mvn package
如果mvn命令无法执行 则要对maven项目进行配置 方法为:
在pom.xml中加上
<build> <defaultGoal>compile</defaultGoal> </build>
然后alt+f5 => update project 即可
相关文章推荐
- Spring boot 关于在Maven下的pom.xml添加对redis的支持报错解决问题
- Maven项目中,关于Spring Boot 整合MyBatis时,Service层无法找到mapper接口的问题解决
- shiro+spring boot+mybatis启动循环引用问题解决思路和方案
- 关于springboot正常启动,路由却无法正常访问的问题
- 关于spring boot 中App类位置不同导致出错的问题的解决方法
- 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
- 解决Intellij Idea Spring Boot Mybatis @Autowired报错的问题
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
- 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
- redis 在spring boot工程中的应用(三) 问题发现与解决 :反序列化 报错
- 关于spring boot整合druid连接池在程序关闭后连接不释放问题解决
- 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE(转)
- spring boot 用war包部署到tomcat下详细教程(解决缺少web.xml报错的问题)
- 解决SpringBoot项目打成jar包访问不了jsp模板的问题: SpringBoot项目集成jsp模板打成war包 然后通过java -jar 命令启动访问
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案 标签: spring 201
- 关于springboot启动时候报错:springboot Failed to parse configuration class [Application]
- Spring boot 启动jsp访问404问题解决
- 关于spring boot 中App类位置不同导致出错的问题的解决方法