美文网首页
Spring Boot Configuration Annota

Spring Boot Configuration Annota

作者: 一介书生独醉江湖 | 来源:发表于2022-05-27 09:06 被阅读0次
@Component
@ConfigurationProperties(prefix = "test")
public class TestProperties {
}
# 问题描述:
# 加上注解 @ConfigurationProperties(prefix = "test")之后,idea抛错:
# Spring Boot Configuration Annotation Proessor not found in classpath
# 解决方式:
# 在pom.xml中加入spring-boot-configuration-processor依赖即可

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
</dependency>

相关文章

网友评论

      本文标题:Spring Boot Configuration Annota

      本文链接:https://www.haomeiwen.com/subject/ztxdprtx.html