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
![](https://img-blog.csdn.net/20170307092455915?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd29kZWdlZWt3b3JsZA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
路径报错:修改为
http://ojdbc.com/springmvcmybatis-exception-resolution/
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/
相关文章推荐
- Spring-mybatis整合配置错误,显示不能创建spring配置文件中的sqlSessionFactory的Bean
- Maven Web项目配置Mybatis出现SqlSessionFactory错误的解决方案
- mybatis与spring整合之错误定义sqlSessionFactoryBean
- Spring-Mybatis --- 配置SqlSessionFactoryBean,整合Spring-Mybatis
- springmvc整合mybatis错误:java.lang.AbstractMethodError,sqlSessionFactoryBeanName造成tomcat启动错误
- Maven Web项目配置Mybatis出现SqlSessionFactory错误的解决方案
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- MyBatis-Spring-SqlSessionFactoryBean
- MyBatis-Spring-SqlSessionFactoryBean
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- mybatis-spring整合总结02_SqlSessionFactoryBean
- myBatis3与spring整合之SqlSessionFactoryBean
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- MyBatis-Spring-SqlSessionFactoryBean
- MyBatis-Spring-SqlSessionFactoryBean
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory
- MyBatis-Spring 之SqlSessionFactoryBean
- Spring3 整合MyBatis3 配置多数据源 动态选择SqlSessionFactory