Springboot1.5以上版本,在使用 @ConfigurationProperties注解的时候会提示“Spring Boot Configuration Annotation Processor not found in classpath”,

这是因为新版本已经取消了对location的支持,替代方案是使用
@Configuration和@PropertySource进行组合使用,例如:
@Primary
@Configuration
@PropertySource(value = "classpath:application.properties", ignoreResourceNotFound = true)
如果要使用指定属性前缀”Prefix“,这时候还会使用到@ConfigurationProperties,提示依然会存在

解决方案是在POM文件中增加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
导入依赖包后,异常提示消失,问题解决!
---------------------
作者:solin418
来源:CSDN
原文:https://blog.csdn.net/weixin_41846320/article/details/81566660
版权声明:本文为博主原创文章,转载请附上博文链接!

解决spring boot1.5以上版本@ConfigurationProperties提示“Spring Boot Configuration Annotation Processor not.."的更多相关文章

  1. 【spring Boot】spring boot1.5以上版本@ConfigurationProperties取消location注解后的替代方案

    前言 =========================================== 初步接触Spring Boot ===================================== ...

  2. spring boot1.5以上版本@ConfigurationProperties取消location注解后的替代方案 cannot resolve method location

    问题 在spring boot(版本1.5.1.RELEASE)项目中,当准备映射自定义的配置文件属性到类中的时候,发现原本的@ConfigurationProperties注解已将location属 ...

  3. 使用@ConfigurationProperties注解 提示 “Spring Boot Configuration Annotation Processor not found in classpath ”

    解决方案: 在 pom.xml 添加依赖 <dependency> <groupId>org.springframework.boot</groupId> < ...

  4. 解决Spring Boot Configuration Annotation Processor not found in classpath

    问题截图: 解决方式: 在pom.xml文件中添加这些依赖 <dependency> <groupId>org.springframework.boot</groupId ...

  5. spring boot configuration annotation processor not found in classpath

    <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spri ...

  6. Spring Boot Configuration Annotation Proessor not found in classpath解决办法

    From: https://www.cnblogs.com/whtgjy/p/9438317.html 出现spring boot Configuration Annotation Proessor ...

  7. SpringBoot中使用@ConfigurationProperties提示:Configuration Annotation Processor not found in classpath

    问题 Springboot1.5以上版本,在使用 @ConfigurationProperties注解的时候会提示Spring Boot Configuration Annotation Proces ...

  8. spring boot Configuration Annotation Proessor not found in classpath

    出现spring boot Configuration Annotation Proessor not found in classpath的提示是在用了@ConfigurationPropertie ...

  9. spring boot1.3.0版本及以上版本profile指定参数无法被打入

    现象:小于1.3.0版本如1.2.6的spring boot, 当指定profile进行参数打入的时候,发现没有问题,但是比如改用1.3.0,1.3.1及其以上版本的时候,发现参数打不进去,经过比对s ...

随机推荐

  1. odoo开发笔记--定时任务源码分析

    场景描述: 处理思路: 参考文章: 定时任务相关: https://www.jianshu.com/p/ad48239f84d6 https://blog.csdn.net/M0relia/artic ...

  2. 对象与json字符串转换类设计

    public static class JsonNewtonsoft { /// <summary> /// 把对象转换为JSON字符串 /// </summary> /// ...

  3. SAP 更新模块1

    RSM13000 / RSM13000 / 5.747FORM / VB_CALL_FUNC CALL 'ThVBCall' ID 'OPCODE' FIELD vb_update_modul_pro ...

  4. 必备Docker命令

    Dockerfile常用指令 Docker常用操作指令 Docker管理指令 文章来源:https://macrozheng.github.io/mall-learning/#/reference/d ...

  5. [转]MathJax与LaTex公式简介

    链接地址:https://www.cnblogs.com/linxd/p/4955530.html

  6. 如何使APP开机自启动

    方案一 将app做成系统应用,直接安装在 system/app 目录下 具体步骤为: 1.在AndroidManifest文件中,添加 android:sharedUserId="andro ...

  7. [LeetCode] 583. Delete Operation for Two Strings 两个字符串的删除操作

    Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 t ...

  8. LumiSoft 邮件操作删除(无法删除解决方法)

    最近在用 LumiSoft  进行邮件读取,然后操作相关附件邮件使用的是qq邮箱,读取后进行移除,但是怎么都移除不了 后来咨询了官方客服,原来是设置不对 需要 取消掉 X禁止收信软件删信 (仅对 PO ...

  9. oracle创建用户并指定表空间

    /*第1步:创建ODPS数据表空间 */create tablespace ODPS logging datafile '/home/oracle/tablespace_dir/ODPS.dbf' s ...

  10. python爬虫3之去哪儿网

    学习任务 获取去哪儿网的出发地列表 获取旅游景点列表 获取景点产品列表 存储数据 1 获取出发地站点 (1)访问touch.qunar.com (2)按F12,单击自由行,在自由行页面点击搜索框 (3 ...