Mybatis
Lucky52hz
学无止境,业精立于勤。
展开
-
mybatis关联关系映射
mybatis关联关系映射关联步骤1、一对多关联关系2、多对多关联关系关联步骤通过mybatis-generator插件生成dao、mapper、model1)配置mybatis-generator插件生成文件位置2)修改generatorConfig.xml配置文件的生成目录(mapper和model)及对应生成关系3.修改Customer、Order实体类1)实现序列化接口2)建...原创 2019-11-20 23:08:24 · 100 阅读 · 0 评论 -
Mybatis整合Redis实现二级缓存
Mybatis整合Redis实现二级缓存1、集成ehcacheMybatis集成ehcache1. 为什么需要缓存2. 什么样的数据需要缓存3. ehcache是什么4. ehcache的特点4.1 够快4.2 够简单4.3 够袖珍4.4 够轻量4.5 好扩展4.6 监听器4.7 分布式缓存3. ehcache的使用4. ssm中整合ehcache4.1 导入相关依赖2、集成redisMybati...原创 2019-11-20 16:43:25 · 73 阅读 · 0 评论 -
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:报错连接超时
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure报错详情Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureTh...原创 2019-11-18 21:11:33 · 1101 阅读 · 0 评论 -
mybatis整合spring
mybatis整合spring1、Mybatis与spring集成2、Aop整合pagehelper插件1、Mybatis与spring集成1、导入pom依赖1.1 添加spring相关依赖(5.0.2.RELEASE)spring-corespring-beansspring-contextspring-ormspring-txspring-aspectsspring-web...原创 2019-11-18 14:48:08 · 111 阅读 · 0 评论 -
Caused by: org.springframework.beans.factory.BeanCreationException报错
Caused by: org.springframework.beans.factory.BeanCreationException报错报错详情Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transac...原创 2019-11-18 14:14:05 · 6497 阅读 · 0 评论 -
Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around异常
Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around异常报错信息"C:\Program Files\Java\jdk1.8.0_131\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:D:\app\Jet...原创 2019-11-17 20:29:53 · 1748 阅读 · 1 评论 -
mybatis-generator-config_1_0.dtd标红:逆向工程常见错误
mybatis-generator-config_1_0.dtd标红:逆向工程常见错误generatorConfig.xmlgeneratorConfig.xml的头文件http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd标红原因:缺少mybatis-generator-core.jar解决办法:Pom.xml添加依赖 <...转载 2019-11-15 09:36:39 · 1623 阅读 · 0 评论 -
mybatis入门
mybatis入门1 mybatis环境搭建2 逆向生成插件的使用3 mybatis环境测试1 mybatis环境搭建2 逆向生成插件的使用3 mybatis环境测试原创 2019-11-16 02:05:35 · 77 阅读 · 0 评论 -
mybatis之动态sql及分页
mybatis之动态sql及分页1、mybatis动态sqlforeachIf,trim2、模糊查询3、查询返回结果集的处理3.1 使用resultMap返回自定义类型集合3.2 使用resultType返回List3.3 使用resultType返回单个对象3.4 使用resultType返回List3.5 使用resultType返回Map1、mybatis动态sqlforeachBook...原创 2019-11-16 16:17:50 · 142 阅读 · 0 评论