使用注解@ConfigurationProperties报错

1,使用注解@ConfigurationProperties报错:Spring Boot Configuration Annotation Processor not found in classpath

解决方式:在pom文件添加:

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

2,添加pom之后报错:Re-run Spring Boot Configuration Annootation Processor to update gennerated

解决方式:Settings --->Build ----> Annottation Processors,重新设置即可

发布了27 篇原创文章 · 获赞 12 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/baidu_38226233/article/details/82702873