![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
framework
文章平均质量分 85
Simon站起来
Now you are on the way.Just look ahead!
展开
-
Springboot+MyBatis-Plus+druid多数据源配置实现
Springboot+MyBatis-Plus+druid多数据源配置实现一.背景业务上需求或者业务的扩展需要分库,多数据源的配置使用在业务开发中常常会用到。MyBatis-plus官网(https://mp.baomidou.com/guide/dynamic-datasource.html)对如何配置多数据源给出了范例,但对于整合druid数据库连接池却没有具体的实施范例。二.依赖<parent><groupId>org.springframework.boot<原创 2020-08-10 19:01:03 · 7632 阅读 · 3 评论 -
Mybatis缓存机制
Mybatis缓存机制一.什么是Mybatis的缓存机制缓存的概念简而言之就是临时存放在本机的数据。为什么需要缓存机制呢,因为链接数据库的资源很珍贵,而且如果每次查询数据都需要访问数据库的话会很费时,且效率不高,于是就有了缓存的机制。有了缓存机制,由原来的 请求-->数据库 到 请求-->缓存(是否有数据? 数据:请求数据库).Mybatis分两级缓存:为一级缓存和二级缓存!原创 2016-11-09 21:20:55 · 378 阅读 · 0 评论 -
Mybatis框架搭建
Mybatis理解及框架搭建官方API中给出对Mybatis的解释是MyBatis is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings. 意思是Mybatis是可持久性框架,支持自定义SQL,存储过程和高级映射。目前Myb原创 2016-11-07 20:36:37 · 521 阅读 · 0 评论 -
java.lang.NoSuchMethodException <init>()
今天使用Mybatis连接数据库时报出了java.lang.NoSuchMethodException 的错误,错误信息如下,错误提示,出错地点是Player的BEAN类实例化出了错,Player代码如下public class Player { private int pid; private String pname; private String position;原创 2016-11-23 19:36:11 · 29587 阅读 · 6 评论 -
Mybatis连3表查询数据resultMap结果映射
Mybatis连结3表查询数据resultMap结果映射一、前言 Mybatis实现了sql与java代码原创 2016-11-23 21:18:46 · 37995 阅读 · 8 评论