springboot项目配置类使用@ConfigurationProperties注解时,提示Spring Boot Configuration Annotation Proessor not found in classpath

如上图所示,虽然不影响编译和运行,但是看着别扭。

解决方法:添加下面的依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <version>2.2.2.RELEASE</version>
</dependency>

猜你喜欢

转载自www.cnblogs.com/dubhlinn/p/12157278.html