Mybatis learning record 02 - mybatis configuration
mybatis-config.xml system core configuration file
The MyBatis configuration file contains settings and attribute information that deeply affect MyBatis behavior. The top-level structure of the configuration document is as follows:
configurationpropertiessettingstypeAliasestypeHandlersobjectFactory (object factory)pluginsenvironments
En ...
Added by Imperialdata on Wed, 05 Jan 2022 21:02:30 +0200
mybatis common query
1, Example
1. Alias
For a parameter, it is not necessary to declare an alias, but if the parameter involves null judgment such as if test, it is necessary to declare an alias, otherwise an error will occur dao
Map<String,Object> getBidResult(String projectId);
String getDicName(@Param("dicCode") String dicCode1);
mapper.xml
<sele ...
Added by MilesStandish on Wed, 05 Jan 2022 18:16:39 +0200
MyBatis02 -- getting started
1, Introductory case
MyBatis development preparation Build MyBatis development environment and realize the first case
1. Prepare with Mybatis
download mybatis
2. Build MyBatis development environment
1) Create MySQL database and tables
Database name ssm; Table name student Create table statement
CREATE TABLE `student` (
`id` int(11 ...
Added by cytech on Wed, 05 Jan 2022 13:16:12 +0200
Introduction to MyBatis
Introduction to MyBatis
Building SqlSessionFactory from XML
Each MyBatis application is based on an instance of SSF (SqlSessionFactory), which can be obtained through SSF Builder. SSF Builder can build an SSF through XML configuration file or configuration class.
It is very convenient to build SSF through XML files. It is recommended to use ...
Added by mpiaser on Wed, 05 Jan 2022 10:52:39 +0200
[MyBatis Series 1] Basics
It mainly explains the basic knowledge of MyBatis, and the content comes from C language Chinese network.
MyBatis example
Project preparation
The DB uses Mysql, POM Dependency packages to be added to XML:
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version ...
Added by msaspence on Wed, 05 Jan 2022 05:37:42 +0200
Custom implementation of Mybatis framework
preface
This paper is divided into two parts: the first part writes an introductory program with mybatis, and the second part removes mybatis from the introductory program and replaces it with a custom framework
Tip: the following is the main content of this article
1, Introduction to Mybatis framework
1.1. Import tables and data ...
Added by findshorty on Tue, 04 Jan 2022 04:50:43 +0200
Imitating mybatis, OpenFeign implements the springboot custom scanning interface and injects the proxy class
explain
When you use mybatis or openFeign, you only define an interface class without an implementation class. You can inject the interface into the service and call the method return value. An interface has no implementation class. Why can it be instantiated and handed over to spring management. How is mybatis and OpenFeign implemented? Look ...
Added by chet139 on Mon, 03 Jan 2022 23:51:34 +0200
Five articles teach you to master spring five
Integration of Spring and mybatis and weaving of transactions
Integrate Mybatis
Create dependency
We need junit, mysql driver, mybatis, spring webmvc, spring JDBC, aspectjweaver
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4 ...
Added by c0le on Mon, 03 Jan 2022 20:40:11 +0200
Mybatis learning record 06 - dynamic SQL
Environment construction
Create table and insert data
CREATE TABLE `blog` (
`id` varchar(50) NOT NULL COMMENT 'Blog id',
`title` varchar(100) NOT NULL COMMENT 'Blog title',
`author` varchar(30) NOT NULL COMMENT 'Blogger',
`create_time` datetime NOT NULL COMMENT 'Creation time',
`views` int(30) NOT NULL COMMENT ...
Added by jwright on Mon, 03 Jan 2022 20:01:20 +0200
Hand-held instructions for using MyBatisPlus
All content is a video recording of madness teacher's station B MyBatisPlus Complete Tutorial B-Station Video for Crazy Java
brief introduction
MyBatis-Plus (opens new window) (MP) is an enhancement tool for MyBatis (opens new window). On the basis of MyBatis, only enhancements are made and no changes are made to simplify development and incr ...
Added by nonso on Mon, 03 Jan 2022 10:13:19 +0200