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

编程知识 更新时间:2023-04-05 03:44:03

读取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 错误解决方案

本文发布于:2023-04-05 03:44:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/46de5c4a33b6fd48fd7066381c5ec6f1.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:解决方案   错误   configuration   boot   spring

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 44583文章数
  • 14阅读数
  • 0评论数