ssm multiple profiles configuring multiple data sources

Dynamic switching of data sources on the Internet can not meet my current application, and switching back and forth will cause performance problems and crash. And it's not a good way to switch notes on a certain method. So think about it at the top level. Here is my configuration: Initializing multiple spring-mybatis.xml files i ...

Posted by diesel_heart on Tue, 26 Nov 2019 20:54:14 +0100

Spring boot integrates Shiro and simple implementation

Spring boot integrates Shiro and simple implementation Create a SpringBoot project Add dependency Configure Shiro (key) Configure login logic Configuration authorization Create a SpringBoot project Create a little Add dependency 1. Add thymeleaf <!-- thymeleaf Dependent dependence --> <dependency> <g ...

Posted by lizard on Tue, 26 Nov 2019 16:33:35 +0100

Things management and caching in MyBatis

Things about MyBatis The concept of things In the framework of Java language database, the transaction management of database is very important. Each business logic is completed by a series of database accesses, which may modify multiple data records. This series of modifications should be a whole, and it is absolutely not allowed to modify onl ...

Posted by Sonic_Rage on Tue, 26 Nov 2019 06:13:06 +0100

MybatisGenerator extension: Custom comment generator

MybatisGenerator extension: Custom comment generator I believe you have a certain understanding of the mybatisgenerator. I love and hate it. The code generated by the mybatisgenerator plug-in will generate comments, which are all useless to us. Although it can prevent the generation of comments, it is not good to have no comme ...

Posted by trrobnett on Mon, 25 Nov 2019 20:57:54 +0100

Mybatis-Spring Source Analysis

Analyzing how Mybatis integrates into the framework using Spring's extension points, Mybatis's own extension points are no longer covered in this analysis Build environment Upload Github https://github.com/mybatis/spring .After several unsuccessful attempts through Git, the zip package was directly downloaded and imported into Idea. The imp ...

Posted by lice200 on Wed, 20 Nov 2019 08:01:31 +0100

MyBatis implements basic CRUD and unit test

Overall project structure bean code package bean; public class Apply { private long id; private String sname; private String qq; private long enterTime; private String type; private String school; private long number; private String repLink; private String goal; @Override public String toString() { ...

Posted by qaladien on Mon, 18 Nov 2019 16:52:59 +0100

Spring Boot2 series of tutorials integrating MyBatis multiple data sources

About the configuration of multiple data sources, I have introduced the configuration of multiple data sources of JdbcTemplate with you. That is relatively simple. This article will talk about the configuration of multiple data sources of MyBatis with you. In fact, as for multi data sources, my attitude is the same as before. For complex data s ...

Posted by andrin on Mon, 18 Nov 2019 05:21:34 +0100

mybatis source series Configuration class Configuration

In Chapter 1, we learned that the core configuration class of mybatis is org.apache.ibatis.session.Configuration.java Let's first look at the class diagram of Configuration.java Seeing the class diagram, I was stunned. There are too many properties However, considering that mybatis has such powerful functions and so m ...

Posted by bentobenji on Sun, 10 Nov 2019 15:59:52 +0100

How Mybatis XML maps to methods

Preface Above How Mybatis's method maps to XML This article describes how Mybatis maps method names to statementID s for method splitting, how parameters are parsed into sql in xml, and how return types are handled; it will look at how methods are mapped from the XML side. XML Mapping Class In the previous two articles, you learned that the ...

Posted by robindean on Sun, 10 Nov 2019 03:48:03 +0100

Why the sum sum of Specification in Jpa is not effective

In autumn, there is no sun in Beijing as always. It is not clear whether the sky is cloud or fog or what strange things are. Buildings are black and white to prove their own outlines. I can't see the edge in a foggy day, just like I need to use Spring Data Jpa to implement a very small SQL. I can't see the effect I want when I write it. The SQL ...

Posted by beselabios on Sat, 09 Nov 2019 12:03:44 +0100