![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
深海梨
a geek~
展开
-
MyBatis-Spring(二)中的no declaration can be found for element 'context:annotation-con
tool 全部改成 context原创 2017-09-13 12:11:01 · 674 阅读 · 0 评论 -
Spring:com.sun.proxy.$Proxy6 cannot be cast to
错误原因 Spring AOP实现方式有两种,一种使用JDK动态代理,另一种通过CGLIB来为目标对象创建代理。如果被代理的目标实现了至少一个接口,则会使用JDK动态代理,所有该目标类型实现的接口都将被代理。若该目标对象没有实现任何接口,则创建一个CGLIB代理,创建的代理类是目标类的子类。 显然,本工程中是通过JDK动态代理来实现AOP的。原创 2017-09-14 12:04:26 · 301 阅读 · 0 评论 -
SpringMVC: can be found for element 'mvc:annotation-driven'
解决方法:在该配置文件上面的beans中添加xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"原创 2017-09-14 19:30:46 · 587 阅读 · 0 评论 -
【MyBatis-Spring】mybatis整合spring报java.lang.AbstractMethodError: org.mybatis.spring.transaction....
jar 包问题,jar 包太老。 把mybatis-Spring1.2 换成1.3 即可原创 2017-09-11 14:13:20 · 463 阅读 · 0 评论 -
MyBatis-Spring(一)
1.在lib 包中添加:主要是添加多一个1.3的 mybatis-spring jar 包 2.pojo 实体类–>mapper—>config.xml—>mapper/IMP—>applicationContext.xml其中 config.xml 中省略了连接数据库的操作,只需要保留typeAliases和mappers标签3.mapper 中的 IMP1)定义spring给mybatis提供原创 2017-09-11 14:49:35 · 335 阅读 · 0 评论 -
MyBatis-Spring(二)使用注解
在MyBatis-Spring(一)基础上的改进:1.1 在com.mapper.IMP下@Repository:用于标注数据访问组件,即 DAO 组件@Repository // 数据访问层:自动 new 一个 AccountMapperIMP,默认对象名字:accountMapperIMP'public class AccountMapperIMP implements AccountMapp原创 2017-09-12 17:20:51 · 206 阅读 · 0 评论