- 博客(10)
- 资源 (6)
- 收藏
- 关注
转载 mybatis:Result Maps collection already contains value for cn.itcast.ssm.mapper.ItemsMapper.BaseResul
org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for cn.itcast.ssm.mapper.ItemsMapper.Base...
2018-09-30 13:42:47 274
原创 spring:java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
在使用spring申明事务管理,加入定义注解事务<tx:annotation-driven transaction-manager=“transactionManager”/> 后出现 java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor这样的问题 原因是没有导入spring-aop相关的j...
2018-09-30 13:28:58 521
原创 springMVC-映射器和适配器配置(注解)
springmvc.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="htt
2018-09-29 14:09:27 326
原创 springMVC-映射器和适配器配置
web.xml &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee&quo
2018-09-29 13:04:16 270
原创 Mybatis-spring整合
1,导入spring,mybatis整合的jar包 mybatis-spring-1.2.2.jar spring相关的jar包 2,由spring管理mybatis的sqlSessionFactory applicationContext.xml &lt;!-- SqlSessionFactory --&gt; &lt;bean id="sqlSessionFactory" class="
2018-09-27 21:30:55 125
原创 Mybatis-延迟加载
什么是延迟加载 延迟加载的条件:resultMap可以实现高级映射(使用association、collection实现一对一及一对多映射),association、collection具备延迟加载功能。 延迟加载的好处: 先从单表查询、需要时再从关联表去关联查询,大大提高 数据库性能,因为查询单表要比关联查询多张表速度要快。 延迟加载的实例: 如果查询订单并且关联查询用户信息。如果先查询订单信息...
2018-09-26 23:18:45 166
原创 Mybatis-高级映射-一对多
现在多出一张表orderdetail 从三张表user,orders,orderdetail中查询记录 SELECT orders.*, `user`.username, `user`.sex, `user`.address, orderdetail.id orderdetail_id, orderdetail.items_num, orderdetail.orders_id ...
2018-09-26 20:55:19 527
原创 Mybatis-高级映射:一对一查询
Mybatis:一对一查询获取结果有两种方式:resultType和resultMap 现在有这样一条select语句 SELECT orders.* ,`user`.username,`user`.sex,`user`.address from orders,`user` where orders.user_id = `user`.id 可以看出这条语句需要连接两张表进行查...
2018-09-26 14:00:27 172
原创 Mybatis-增删改查
配置文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration>
2018-09-24 17:46:25 142
原创 Mybatis配置文件
SqlMapConfig.xml &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &amp;lt;!DOCTYPE configuration PUBLIC &quot;-//mybatis.org//DTD Config 3.0//EN&quot; &am
2018-09-23 16:16:05 135
mysql_数据类型
2017-09-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人