Could not open PortletContext resource [/com/rujuan/model/SqlMapConfig.xml]
来源:互联网 发布:淘宝豆豆鞋 编辑:程序博客网 时间:2024/06/10 22:16
In my spring-ibatis.xml, I need to config sqlMapClient:
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="com/rujuanmodel/SqlMapConfig.xml" />
<property name="dataSource" ref="dataSource" />
</bean>
When I deploy it to tomcat, it always gives me an error:
Could not open PortletContext resource [/com/rujuan/model/SqlMapConfig.xml]
The thing is when it deploys to webapp, the path has changed. So we need to config like this:
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:com/rujuan/model/SqlMapConfig.xml" />
<property name="dataSource" ref="dataSource" />
</bean>
then it works!
- Could not open PortletContext resource [/com/rujuan/model/SqlMapConfig.xml]
- java.io.IOException: Could not find resource SqlMapConfig.xml
- java.io.IOException: Could not find resource SqlMapConfig.xml
- java.io.IOException: Could not find resource SqlMapConfig.xml at org.apache.ibatis.io.Resources.get
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- dorado7 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/dispatcherservlet-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Delphi 的RTTI机制浅探
- ASP.NET MVC 4 in Action文章系列说明【持续更新......】
- 64位VS2010配置MongoDB
- 罗姆尼失败的原因
- 1.预备知识
- Could not open PortletContext resource [/com/rujuan/model/SqlMapConfig.xml]
- 极限来电屏蔽
- UML类图符号 各种关系说明以及举例
- Tyvj Q1024(double的使用)
- CCActionEase的实现原理
- nginx apache 区别
- Golf Range Finder 高尔夫激光测距仪和GPS测距仪
- oracle 11g 卸载 客户端卸载
- 用C实现PHP扩展类