spring boot configuration annotation processor not configured 错误解决方案

读取application.properties配置时,出现如下错误:spring boot configuration annotation processor not configured

@ConfigurationProperties(prefix=“book”)
spring boot configuration annotation processor not configured 错误解决方案_第1张图片
解决办法:
在pom.xml中增加如下依赖

        
            org.springframework.boot
            spring-boot-configuration-processor
            true
        

如果我们的application.properties配置中有中文,可能会出现乱码
在setting -> editor -> file Encodings中修改编码
spring boot configuration annotation processor not configured 错误解决方案_第2张图片
application.properties文件中添加

spring.http.encoding.charset=UTF-8

你可能感兴趣的:(springboot,java,spring,boot,乱码,maven)