Intellj Idea 社区版本的 framework support中没有spring支持,导致resources文件夹里的配置文件无法识别,所以配置文件内容都无法读取。但是在eclipse下是正常的。
经查阅资料,pom中添加以下依赖即可,
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
这样即使framework support 中没有spring支持,也可以正常运行springboot项目了。
本人使用的配置文件格式为yml