mybatis中SqlSessionFactoryBean路径配置错误

来源:互联网 发布:网络电视直播软件 最新 编辑:程序博客网 时间:2024/06/05 02:27

mybatis配置文件

Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'org.springframework.core.io.Resource[]' for property 'mapperLocations'; nested exception is java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:/com/**/wap/dao/impl/*.xml]: class path resource [com/***/wap/dao/impl/] cannot be resolved to URL because it does not exist

Caused by: java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:/com/***/wap/dao/impl/*.xml]: class path resource [com/***/wap/dao/impl/] cannot be resolved to URL because it does not exist



路径报错:修改为

<bean id="msqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">   <property name="dataSource" ref="dataSource" />   <property name="mapperLocations" value="classpath*:/com/**/wap/dao/impl/*.xml" /></bean>

http://ojdbc.com/springmvcmybatis-exception-resolution/

0 0
原创粉丝点击