mybatis中SqlSessionFactoryBean路径配置错误

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


mybatis中SqlSessionFactoryBean路径配置错误_第1张图片

路径报错:修改为

<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/

你可能感兴趣的:(Mybatis)