您的位置:首页 > 数据库

mybatis中SqlSessionFactoryBean路径配置错误

2017-03-07 09:27 489 查看
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/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: