Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'redis.maxIdle' in stri
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'redis.maxIdle' in string value "${redis.maxIdle}"
解决办法:
知道了怎么配置,就知道自己有没有配置错误,如果配置没有问题,那么就继续找问题,Could not resolve placeholder占位符不能被解析,那就是没有在.properties中找到要注入的值了,原来是在xml里面配置了2个ignore-unresolvable,这就是定位问题所在了。
个是引入配置文件.properties,一个是引入db配置文件.properties,其实配置多个并不是报错的主要问题所在,是因为spring的加载机制,原来是Spring容器采用反射扫描的发现机制,在探测到Spring容器中有一个org.springframework.beans.factory.config.PropertyPlaceholderConfigurer的Bean就会停止对剩余PropertyPlaceholderConfigurer的扫描(Spring 3.1已经使用PropertySourcesPlaceholderConfigurer替代PropertyPlaceholderConfigurer了),所以根据加载的顺序,配置的第二个property-placeholder就被没有被spring加载,我想引入的config-wxapp.properties就没有被引入,所以在使用@Value注入的时候占位符就解析不了...解决方法就是把2个property-placeholder注解配置合并在一起就好了
原因是我发现我配置文件有多个这个东西.,,..
<context:property-placeholder location="classpath*:properties/*.properties" />
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'redis.maxIdle' in stri相关推荐
- 报错:Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'USER_NICK_NAME' in
推荐阅读:报错原因详解 报错信息 Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'USER_ ...
- 查看提供者的端口时报Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘server.port‘
@Value("${server.port}")private String port; @Value("${server.port}") 表示获取属性文件ym ...
- Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder
nacos无法远程获取配置值,在确认以下无误的情况下 在 Nacos Spring Cloud 中,dataId 的完整格式如下: ${prefix}-${spring.profiles.active ...
- yml:java.lang.IllegalArgumentException: Could not resolve placeholder ‘jdbc.driverClassName‘
第一天学spring Boot遇到的配置问题 org.springframework.beans.factory.BeanCreationException: Error creating bean ...
- java.lang.IllegalArgumentException: Could not resolve placeholder ‘stu.age‘ in value “${stu.age}
1.运行spring boot项目时出现这个错误,java.lang.IllegalArgumentException: Could not resolve placeholder 'stu.age' ...
- java.lang.IllegalArgumentException: Could not resolve placeholder ‘XXX‘ in string value “${XXX}“;
spring项目运行的时候提示这个错误.很奇怪的是这个项目是我自己从原来自己写的git上迁移到gitlab上的,yml并没有做任何手脚. 检查了一下yml的书写格式,换行等,都是正确的,网上搜这个问题 ...
- Redis配置错误(已解决) Could not resolve placeholder 'redis.maxIdle' in string value ${redis.maxIdle}
错误信息 使用Redis 时遇到Could not resolve placeholder 'redis.maxIdle' in string value "${redis.maxIdle} ...
- Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> [url] in servlet mapping
使用SSM框架的时候我测试springmvc的时候遇到的错误: 一.Server Tomcat v9.0 Server at localhost failed to start. 启动Tomcat服务 ...
- Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.INT
Caused by: java.lang.IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.INT ...
最新文章
- h2 不能访问localhost_SpringBoot2.x系列教程44--H2数据库详解及搭建Web控制台
- c++ list box 字体设置_上海印刷字体展示馆 迎来第一批团队参观
- apr_pool -- 内存池
- 访问GitHub超慢的解决办法
- 咬肌边上有个滑动疙瘩_猫逆子一个:摔杯子咬箱子,时常给我甩脸子!
- 开源电子商务平台:OfBiz
- *******clob问题***********
- 计算机网络体系结构作业题整理-第一章答案
- Mysql + keepalived 实现双主热备读写分离【转】
- 创建型模式之简单工厂模式
- 生鲜电商纷纷传上市,但赛道并不性感
- 从ccps项目中学习bottle,sqlalchemy,jinja2
- react报错Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.
- JAVA多线程读写文件如何做到线程安全?(文件锁,FileChannel)
- P3625 [APIO2009]采油区域 题解
- 极高水平的电吉他音源 Orange Tree Samples Evolution Stratosphere Kontakt
- 博途(TIA)软件安装教程;博途软件安装常见问题解决办法
- 计算机整机配置单,小编教你电脑主机配置清单推荐
- 云展网教程 | 如何把云展的杂志下载下来上传到自己的网站(服务空间)?
- SRS+metaRTC+FFmpeg助力直播进入webrtc直播互动新时代