Ibatis问题?
Spring的配置文件中:
<!-- 定义IBatis -->
<bean id= "sqlMapClient " class= "org.springframework.orm.ibatis.SqlMapClientFactoryBean ">
<property name= "configLocation " value= "WEB-INF/SqlMapConfig.xml "/>
<property name= "dataSource " ref= "dataSource "/>
</bean>
但是出现问题:
...
java.lang.IllegalArgumentException: No SqlMapClient specified
...
有人说是找不到SqlMapClient.xml文件,但是我的文件夹里面存在此文件:
<?xml version= "1.0 " encoding= "UTF-8 " ?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN "
"http://www.ibatis.com/dtd/sql-map-config-2.dtd ">
<sqlMapConfig>
<sqlMap resource= "beans/userbean.xml "/>
</sqlMapConfig>
为什么会出错?
------解决方案--------------------sqlmap映射问题。
------解决方案--------------------应该是路径问题resource= "beans/userbean.xml "。