Spring Boot Configuration Annota

2022-05-27  本文已影响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>
上一篇 下一篇

猜你喜欢

热点阅读