异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException
这个异常是出现在注入配置文件中配置好的属性时报错的:
Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'my.name' in value "${my.name}"
此时配置文件默认的名称为:application.properties
解决方法:
将配置文件名改为:application.yml
就可以正常启动.
后来又发现如果想让配置文件名称为application.properties
则需要在配置文件中以: xxx.yyy.name的格式来书写需要使用到的属性
异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException的更多相关文章
- IDEA报错: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.url' in value "${spring.datasource.url}"
运行审核流模块: 在ActivitiServiceApplication模块日志报错: Error starting ApplicationContext. To display the auto-c ...
- MyBatis与Spring MVC结合时,使用DAO注入出现:Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
错误源自使用了这个例子:http://www.yihaomen.com/article/java/336.htm,如果运行时会出现如下错误: Invocation of init method fai ...
- HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.
HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: ...
- Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 36
例: <aop:config> <aop:pointcut expression="execution(* com.zsn.Service.Impl.*.*(..))&qu ...
- 异常:Instantiation of bean failed; nested exception is java.lang.NoSuchMethodError: com.google.common.base.Preconditions.che ckState(ZLjava/lang/String;I)V
Instantiation of bean failed; nested exception is java.lang.NoSuchMethodError: com.google.common.bas ...
- 报错:defined for 'courierAction_pageQuery' in namespace '/'Error creating bean with name 'cn.itcast.bos.web.action.base.CourierAction': Injection of autowired dependencies failed; nested exception is or
No qualifying bean of type [cn.itcast.bos.web.service.base.CourierService] found for dependency: exp ...
- Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class cn.e3mall.pojo.TbItem
这个异常是缺少json相关的包 把以下依赖补上就好: <!-- Jackson Json处理工具包 --><dependency> <groupId>com.fas ...
- Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error at ::0 inconsistent binding
1.发生原因 springAOP 里面绑定参数出现错误 核对绑定参数的名称 核对 springAOP的版本 2.aop切面表达式写的有误
- nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed
在用AOP 的时候出现了如下的错误, 警告: Exception encountered during context initialization - cancelling refresh atte ...
随机推荐
- bzoj 2243 [SDOI2011]染色(树链剖分+线段树合并)
[bzoj2243][SDOI2011]染色 2017年10月20日 Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1.将节点a到节点b路径上所有点都染成颜色c: 2.询 ...
- 张高兴的 Xamarin.Android 学习笔记:(二)“Hello World”
完成环境配置后开始第一个简单项目.打开 Visual Studio 新建一个 Xamarin.Android 项目 "HelloAndroid".(GitHub:https://g ...
- BZOJ-3709-[PA2014]Bohater(贪心)
Description 在一款电脑游戏中,你需要打败n只怪物(从1到n编号).为了打败第i只怪物,你需要消耗d[i]点生命值,但怪物死后会掉落血药,使你恢复a[i]点生命值.任何时候你的生命值都不能降 ...
- Linux入门(4)——Ubuntu16.04安装MATLAB2016b
通常有三个安装文件: Matlab 2016b Linux64 Crack.rar R2016b_glnxa64_dvd1.iso R2016b_glnxa64_dvd2.iso sudo apt i ...
- JSTL标签库的基本教程之核心标签库(一)
JSTL介绍 Java Server Pages Standard Tag Libray(JSTL):JSP标准标签库,它封装了JSP应用的通用核心功能.JSTL支持通用的.结构化的任务,比如迭代,条 ...
- JAVA 编码解码
涉及编码的地方一般都在从字符到字节或是从字节到字符间的转换上 1.在IO中存在的编码,主要是 FileOutputStream 和 FileInputStream,在使用时需要指定字符集,而不是使用系 ...
- 打包zip下载
//首先引入的文件为org.apache的切记不是jdk的import org.apache.tools.zip.ZipOutputStream;import org.apache.tools.zip ...
- 加载web项目时报的错误:Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modul
用eclipse开发的java项目不能加载到tomcat6.0服务器,原因是:jst.web的版本高了 <installed facet="jst.web" version= ...
- 2_ROS学习
2_VNC远程连接树莓派 在上一次,我们成功的给树莓派安装了Ubuntu mate的操作系统. 树莓派是嵌入式计算机,一般是没有显示屏来显示的,我们通过远程连接来访问树莓派.网上推荐了ssh连接,xr ...
- 利用Tkinter和matplotlib两种方式画饼状图
当我们学习python的时候,总会用到一些常用的模块,接下来我就详细讲解下利用两种不同的方式画饼状图.首先利用[Tkinter]中的canvas画布来画饼状图: from tkinter import ...