Spring boot principle: the starting principle of source code analysis
catalog
1, Introduction to spring boot analysis
2, Spring boot annotations to be covered
1.@SpringBootApplication
2.@SpringBootConfiguration
3.@EnableAutoConfiguration
4.@AutoConfigurationPackage
5. Some annotations in the xxxautoconfiguration class
3, Spring application initialization proces ...
Posted by aseaofflames on Mon, 22 Jun 2020 10:48:12 +0200
Dynamic sql splicing in mybatis
Before moving on to dynamic sql, let's start by saying that a user's id in real development is usually out of order, such as random generation using UUID s. Write one below.
public class UUIDGenerate {
public static String getIdByUUID(){
return UUID.randomUUID().toString().replaceAll("-" ...
Posted by c-o-d-e on Sat, 20 Jun 2020 18:12:19 +0200
MyBatis - Introduction
MyBatis - Introduction
Frame at a glance:
(1) Framework to solve technology integration problems: Spring framework is created due to the complexity of software development.
(2) The MVC framework to solve the problem of WEB layer: Spring MVC.
(3) The framework to solve the problem of data persistence: ...
Posted by hookit on Fri, 19 Jun 2020 06:20:22 +0200
mybatis source code - initialization configuration
Our debugging environment:
Debug code:
public class MyaaTest {
public static void main(String[]args) {
String resource = "config.xml";
try {
//1. Read configuration file
InputStream in= Resources.getResourceAsStream(resource);
SqlSessionFactor ...
Posted by gere06 on Wed, 17 Jun 2020 07:42:02 +0200
Mybatis Source Interpretation--Data Source Module (Factory Mode)
The data source module for Mybatis is located inOrg.apache.ibatis.datasource.
Common data source components are implementedJavax.sql.DataSourceInterface.Within Mybatis, third-party data source components are integrated, and data source implementations are provided.In general, data source initializat ...
Posted by sane993 on Wed, 17 Jun 2020 02:59:26 +0200
Mybatis framework learning delay loading
catalog
Delay loading
Implement delayed loading
Delay loading using allocation
Using Collection to delay loading
Delay loading
It is to load data when it is needed, and not to load data when it is not needed. Lazy loading is also called lazy loading
Advantages: query from single table first, ...
Posted by theDog on Sun, 14 Jun 2020 11:24:43 +0200
The spring boot series integrates MyBatis framework
Add Dependency
<!--Add to mysql and mybatis rely on-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<a ...
Posted by Jragon on Sat, 13 Jun 2020 20:59:15 +0200
[elegant code writing system] springboot+mybatis+pagehelper+mybatisplus+druid shows you how to write code gracefully
[TOC]
Springboot integrates a lot of plug-ins. Compared with spring, springboot is a little bit
Auto configuration: for many spring applications, springboot provides many auto configurations
Start dependency: tell springboot what you need, and it will introduce the required Library
Command line interface: optional features of springboot
Autu ...
Posted by jbruns on Thu, 11 Jun 2020 06:23:55 +0200
4, Cache and annotation development of mybatis
1, Loading time in mybatis
Question: in one to many, when we have a user, it has 100 accounts.
When querying users, do you want to find out the associated accounts?
Do you want to find out the associated users when querying accounts?
When querying users, the account information under users shou ...
Posted by j0hn_ on Wed, 10 Jun 2020 09:32:03 +0200
spring-boot blog system
Spring-boot Personal Blog System
GitHub: https://github.com/Werdio66/myblog
1. Environmental Construction
gradle dependencies:
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.sp ...
Posted by stevietee on Mon, 08 Jun 2020 03:22:50 +0200