读取application.properties配置时,出现如下错误:spring boot configuration annotation processor not configured
@ConfigurationProperties(prefix=“book”)
解决办法:
在pom.xml中增加如下依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
如果我们的application.properties配置中有中文,可能会出现乱码
在setting -> editor -> file Encodings中修改编码
application.properties文件中添加
spring.http.encoding.charset=UTF-8
更多推荐
spring boot configuration annotation processor not configured 错误解决方案
发布评论