Spring:BeanInitializationException: Could not load properties
来源:互联网 发布:淘宝客怎么开通 编辑:程序博客网 时间:2024/05/21 10:19
错误信息:
严重: Context initialization failedorg.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [dbconn.properties] cannot be opened because it does not exist at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:151) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:162) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
这里查看配置的属性文件如下: <context:property-placeholder location="classpath:dbconn.properties" />
实际上应该是找不到文件,之前放在Web主目录(WebContent)下,下载放在src目录下能够解决问题
阅读全文
0 0
- Spring:BeanInitializationException: Could not load properties
- org.springframework.beans.factory.BeanInitializationException: Could not load properties;
- Could not load properties
- Spring.net Could not load type from string value
- spring+mybatis 报Could not load driverClass ${jdbc.driverClass}
- spring+mybatis 报Could not load driverClass ${jdbc.driverClass}
- Could not load definitions from resource net/sf/antcontrib/antcontrib.properties.
- could not load a entity
- Could not load taglib information
- Could not load native libraries
- android SDK Tools跟新后不能用ant进行打包问题,Could not load definitions from resource anttasks.properties. It co
- spring.net配置错误:Could not load type from string value ...
- spring配置c3p0报错Could not load driverClass oracle.jdbc.OracleDriver
- Spring Boot 出现 Could not load JDBC driver class [com.mysql.jdbc.Drivers]
- Could not load 'esri.nls.jsap_zh-cn'
- Android 2.2: Could not load 'clearsilver-jni'
- Could not load java.net.BindException
- Could not load the Tomcat server configuration
- [数据结构]栈的C语言简单实现
- HTTP 长连接和短连接
- 深度学习:卷积神经网络与图像识别基本概念
- ASP.NET各类时间
- Eclipse 右击项目卡死无反应解决办法
- Spring:BeanInitializationException: Could not load properties
- 各大公司java后端开发面试题总结
- iFunk翼S超极本双十一特购享优惠
- Android Intent.FLAG_ACTIVITY_NEW_TASK的个人理解
- Qt几个版本支持的编程库
- 【每天一个linux命令】02.Linux中ping命令的用法
- MyBatis Generator 详解
- 网络字节序,大小端
- solr5.5.5入门实例