spring boot 的项目在idea下报错,错误信息如下:
2017-07-28 09:50
399 查看
spring boot 的项目在idea下报错,错误信息如下:
java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer due to org/apache/catalina/connector/Connector not found. Make sure your own
configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
解决方案:打开maven配置文件pom.xml, 将
顺便学习一下,在POM 4中,maven 中的dependency , 的scope是什么用途,它主要管理依赖的部署。
目前<scope>可以使用5个值:
* compile,缺省值,适用于所有阶段,会随着项目一起发布。
* provided,类似compile,期望JDK、容器或使用者会提供这个依赖。如servlet.jar。
* runtime,只在运行时使用,如JDBC驱动,适用运行和测试阶段。
* test,只在测试时使用,用于编译和运行测试代码。不会随项目发布。
* system,类似provided,需要显式提供包含依赖的jar,Maven不会在Repository中查找它。
java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer due to org/apache/catalina/connector/Connector not found. Make sure your own
configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
解决方案:打开maven配置文件pom.xml, 将
provided注释,
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <!--<scope>provided</scope>--> </dependency>
顺便学习一下,在POM 4中,maven 中的dependency , 的scope是什么用途,它主要管理依赖的部署。
目前<scope>可以使用5个值:
* compile,缺省值,适用于所有阶段,会随着项目一起发布。
* provided,类似compile,期望JDK、容器或使用者会提供这个依赖。如servlet.jar。
* runtime,只在运行时使用,如JDBC驱动,适用运行和测试阶段。
* test,只在测试时使用,用于编译和运行测试代码。不会随项目发布。
* system,类似provided,需要显式提供包含依赖的jar,Maven不会在Repository中查找它。
相关文章推荐
- 使用IDEA创建springboot项目时,出现错误Cannot download 'https://start.spring.io': connect timed out
- IDEA中Spring Boot项目MyBaits提示Invalid bound statement (not found)错误
- VS Code打开使用IDEA搭建的Spring Boot项目运行提示"snakeyaml was not found on the classpath"错误
- 多个springboot项目部署在同一tomcat上,出现jmx错误
- SpringBoot项目创建报:java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication错误的解决方案
- IDEA 配置maven + SpringBoot项目在新电脑上的配置运行
- IDEA中SpringBoot项目启动遇到端口被占用(Address already in use: bind)
- Idea创建spring boot项目
- idea 远程调试服务器项目 springboot idea debug
- 使用idea创建springboot项目并打成war包发布到weblogic上
- 用Intelij idea 创建 Spring Boot项目一创建Module openfirein-cloud-config-servier(1-2)
- IDEA 创建spring boot项目无法启动
- SpringBoot基础-在IDEA中创建跑得起来的Springboot项目
- 从eclipse中导入到IDEA中的SpringBoot项目,启动时报错 Unable to start EmbeddedWebApplicationContext due to missing Em
- 利用命令部署springBoot项目出现ERROR] No plugin found for prefix ‘spring-boot’ in the current的错误
- IDEA上面搭建一个SpringBoot的web-mvc项目
- idea 的SpringBoot项目做单元测试
- springBoot系列-IDEA 创建springBoot项目
- 利用IDEA创建Spring Boot项目
- idea快速搭建springboot项目的操作方法