解决spring boot1.5以上版本@ConfigurationProperties提示“Spring Boot Configuration Annotation Processor not.."
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.."的更多相关文章
- 【spring Boot】spring boot1.5以上版本@ConfigurationProperties取消location注解后的替代方案
前言 =========================================== 初步接触Spring Boot ===================================== ...
- spring boot1.5以上版本@ConfigurationProperties取消location注解后的替代方案 cannot resolve method location
问题 在spring boot(版本1.5.1.RELEASE)项目中,当准备映射自定义的配置文件属性到类中的时候,发现原本的@ConfigurationProperties注解已将location属 ...
- 使用@ConfigurationProperties注解 提示 “Spring Boot Configuration Annotation Processor not found in classpath ”
解决方案: 在 pom.xml 添加依赖 <dependency> <groupId>org.springframework.boot</groupId> < ...
- 解决Spring Boot Configuration Annotation Processor not found in classpath
问题截图: 解决方式: 在pom.xml文件中添加这些依赖 <dependency> <groupId>org.springframework.boot</groupId ...
- spring boot configuration annotation processor not found in classpath
<dependency> <groupId> org.springframework.boot </groupId> <artifactId> spri ...
- Spring Boot Configuration Annotation Proessor not found in classpath解决办法
From: https://www.cnblogs.com/whtgjy/p/9438317.html 出现spring boot Configuration Annotation Proessor ...
- SpringBoot中使用@ConfigurationProperties提示:Configuration Annotation Processor not found in classpath
问题 Springboot1.5以上版本,在使用 @ConfigurationProperties注解的时候会提示Spring Boot Configuration Annotation Proces ...
- spring boot Configuration Annotation Proessor not found in classpath
出现spring boot Configuration Annotation Proessor not found in classpath的提示是在用了@ConfigurationPropertie ...
- spring boot1.3.0版本及以上版本profile指定参数无法被打入
现象:小于1.3.0版本如1.2.6的spring boot, 当指定profile进行参数打入的时候,发现没有问题,但是比如改用1.3.0,1.3.1及其以上版本的时候,发现参数打不进去,经过比对s ...
随机推荐
- Layui 点击查询分页,页码不刷新解决方法
Layui 点击查询分页,页码不刷新解决方法 function queryDataGrid() { layui.table.reload(tableName, { where: { //设定异步数据接 ...
- bind 0.0.0.0的作用是什么呢?
背景描述: 今天在看redis的内容,看到同事在配置文件中将bind配置为0.0.0.0进行监听,不明白什么意思就查询了下,在此记录下. 解释: 0.0.0.0在服务器的环境中,指的就是服务器上所有的 ...
- Python - Django - form 组件常用的字段和字段参数
邮箱: views.py: from django import forms from django.forms import widgets class RegForm(forms.Form): e ...
- [LeetCode] 503. Next Greater Element II 下一个较大的元素 II
Given a circular array (the next element of the last element is the first element of the array), pri ...
- 【Sqoop学习之一】Sqoop简介
环境 sqoop-1.4.6 Sqoop:将关系数据库(oracle.mysql.postgresql等)数据与hadoop数据进行转换的工具. 两个版本:两个版本完全不兼容,sqoop1使用最多:s ...
- Gevent模块,协程应用
Gevent官网文档地址:http://www.gevent.org/contents.html 进程.线程.协程区分 我们通常所说的协程Coroutine其实是corporate routine的缩 ...
- son-server模拟http mock数据
json-server 前端开发中,想通过异步请求服务端json数据,但是服务端还没有开发完,此时可以快速启动一个server服务 1,安装json-server插件 npm -g add json- ...
- 【转帖】漏洞数量242:15,英特尔和AMD CPU谁更安全?
漏洞数量242:15,英特尔和AMD CPU谁更安全? http://www.eetop.cn/cpu_soc/6946340.html 越来越多的用户开始怀疑哪种处理器可以最好地保护他们的计算机,数 ...
- Redhat7.6Linux本地的yum源配置
安装好虚拟机,配置Ip地址,见博客https://www.cnblogs.com/xuzhaoyang/p/11264573.html 我是使用的Xshell在外部链接进行的操作,比较简单,见博客ht ...
- 使用Python快速实现简单的人脸检测
最近有个比较要好的朋友问我能不能从监控视频里识别到从监控跟前经过的指定的人.因为他们单位的监控室经常要花大量的人力跟时间去找某个人在哪个位置出现过的证据.听起来像是一份比较有挑战性的任务,就答应他试试 ...