Simple construction of springboot
advantage
The configuration becomes simple. In most cases, you can use the default configuration; For example, maven dependency, using starter to simplify maven configurationThe construction of the project is simple, with a built-in framework for integrating the third party and no configuration integration;The deployment of the project is ...
Added by Chrysanthus on Fri, 18 Feb 2022 12:36:38 +0200
Introduction to mybatis plus
What is mybatis plus?
To explain mybatis plus, you must first explain what mybatis is:
(1) Mybatis is a semi ORM (object relational mapping) framework. It encapsulates JDBC internally. During development, you only need to pay attention to the sql statement itself, and you don't need to spend energy dealing with the complicated processes such ...
Added by koddos on Fri, 18 Feb 2022 11:21:45 +0200
Mybatis study notes
0. Case environment
0.1 case data initialization sql
CREATE DATABASE /*!32312 IF NOT EXISTS*/`mybatis_db` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `mybatis_db`;
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMEST ...
Added by jaymc on Fri, 18 Feb 2022 10:35:45 +0200
Mybatis learning notes - L1 cache, L2 cache, reverse engineering
Mybatis basic edition is released after completion
Query cache
L1 cache
MyBatis enables the first level cache by default. If the same SqlSession object is used to execute the same query statement, it will only send the SQL statement to the database at the first query and put the query results into the SqlSession (existing as a cache). If the ...
Added by ganesan on Thu, 17 Feb 2022 16:26:28 +0200
Mybatis study notes
MyBatis study notes
Knowledge preparation:
JDBCMysqlMavenJunit
1. Introduction
1.1. What is MyBatis?
MyBatis is an excellent persistence layer framework It supports custom SQL, stored procedures, and advanced mapping. MyBatis eliminates almost all JDBC code and the work of setting parameters and obtaining result sets. MyBatis can confi ...
Added by calumstevens on Thu, 17 Feb 2022 14:46:27 +0200
vulnerable! spring, which you can't learn, is integrated with MyBatis. The girl next door easily completed it and sent a login verification case!
Integration of spring and MyBatista in spring learning (1)
1. Integration of spring and MyBatista
1.1 integration process and ideas
1.1.1 Mybatis
As we all know, mybatis evolved from ibatis of Apache and is a persistence layer framework based on Java. Mybatis annotation 𞓜 xml file is used for configuration or original mapping.
Mybatis refe ...
Added by DanDaBeginner on Thu, 17 Feb 2022 14:06:09 +0200
JDBC(Java DataBase Connectivity)
JDBC(Java DataBase Connectivity)
JDBC(Java DataBase Connectivity): a set of specifications (classes and interfaces) defined by sun company in order to simplify and unify Java database connection.
JDBC is a standard Java API for database independent connection between Java programming language and database.
Relationship between JDBC and ...
Added by greenhorn666 on Tue, 15 Feb 2022 16:16:03 +0200
#{} how to prevent SQL injection? What is its underlying principle?
1, The difference between ${} and #{} in MyBatis1.1 ${} and #{} presentationsDatabase data:dao interface:List<User> findByUsername(String username);
List<User> findByUsername2(String username);
Mapper.xml: <!-- use#{} -->
<select id="findByUsername" parameterType="java.lang.String" resultType="com.lscl.entity.User">
...
Added by seikan on Tue, 15 Feb 2022 04:09:18 +0200
Mybatis learning notes summary
1. Dynamic SQL
1.1 what is dynamic SQL?
What is dynamic SQL?
Dynamic SQL refers to generating different SQL statements according to different conditions.
Usually, we operate some different SQL statements, which are directly changed in the code, which is very troublesome. It is very convenient to use dynamic SQL of Mybatis.
Using t ...
Added by darkwolf on Sun, 13 Feb 2022 09:29:44 +0200
spring integrates the core principles of mybatis
In mybatis, I often use @ MapperScan annotation. Let's see how it is integrated into spring. First, when we enter MapperScan, we will see @ import (mapperscannerregister. Class)
When we open mappercannerregister, we will see that the importbeandefinitionregister interface is implemented. This interface will call the registerBeanDefinitions ...
Added by Phirus on Fri, 11 Feb 2022 23:51:54 +0200