@ConfigurationProperties注解提示Configuration Annotation Proessor not found in classpath 解决方案

@ConfigurationProperties注解提示Configuration Annotation Proessor not found in classpath 解决方案

@ConfigurationProperties注解提示Configuration Annotation Proessor not found in classpath 解决方案

菜鸟本人要配置一个七牛云的上传Demo,参考了网上各位大佬的傻瓜式教程,在配置yml文件属性类时候使用@ConfigurationProperties(prefix = “qiniu”) 时候IDE的窗口上出现"Spring Boot Configuration Annotation Proessor not found in classpath"。异常如图所示

原因

这里搬运一下福尔摩帅的原因讲解:

  1. 出现spring boot Configuration Annotation Proessor not found in classpath的提示是在用了@ConfigurationProperties这个注解时,所以问题出现在ConfigurationProperties注解。

  2. 根据提示的not found in classpath,查询此注解的使用关于怎么指定classpath,进而查询location,spring boot1.5以上版本@ConfigurationProperties取消location注解

解决方法

在Maven中添加如下依赖即可

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

添加后效果

添加后出现如下提示,不用管,正常运行即可。解决后效果
作为笔记和学习交流之用。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值