json formatting of springboot+mybatis
Suppose that there are five attribute values in the database, namely id,name,sex,age and hobbies. It is required that hobbies are presented in the front end in the form of array. At this time, it can be realized through JSON. At first, I thought of using JSON directly in impl, but there is a problem that there are not only hobbies, but also ID, ...
Added by uidzer0b on Fri, 25 Feb 2022 06:36:01 +0200
Mybatis Learn Notes
Mybatis Learn Notes
I. Understanding Mybatis
MyBatis is an excellent persistence framework. It supports custom SQL, stored procedures, and advanced mappings. MyBatis eliminates almost all JDBC code and setting parameters and getting result sets. MyBatis can configure and map raw types, interfaces, and Java POJO s (Plain Old Java Objects, ...
Added by Chrisww on Wed, 23 Feb 2022 19:19:45 +0200
Analyze the cause of BindingException: Invalid bound statement (not found) by tracing the source code
background
The new project, the framework springboot + mybatis + mybatis plus, wants to add a CommonMapper and the corresponding mapper xml file to store general sql or sql across multiple tables. As a result, an error is reported when starting the test, as shown below:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...
Added by daftdog on Wed, 23 Feb 2022 02:21:18 +0200
Learning spring MVC
SpringMVC
First of all, let's learn about the classic MVC mode. The full name of MVC is Model View Controller. M refers to business model and data model, V refers to user interface and C refers to controller. The purpose of using MVC is to separate the implementation codes of M and V, so that the same program can use different expressions. ...
Added by benwhitmore on Mon, 21 Feb 2022 17:36:28 +0200
After using the MyBatis interceptor, the fishing time is long again.
scene
In the development of back-end services, the popular framework combination is SSM (SpringBoot + Spring + MyBatis). When we develop some business systems, there will be many business data tables, and the information in the tables will be inserted again, and many operations may be carried out in the whole life cycle.
For example, when we ...
Added by dibyajyotig on Mon, 21 Feb 2022 12:32:37 +0200
springboot+mybatis+mysql transaction rollback
1. Introduction
reference resources:
mysql essentially uses database rollback, and the table engine needs InnoDB
The versions used are as follows
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.or ...
Added by cdickson on Mon, 21 Feb 2022 11:01:31 +0200
Mybatis foundation + addition, deletion, modification and query (code example)
First, what is MyBatis?
MyBatis is a state-of-the-art persistence framework that supports custom SQL, stored procedures, and advanced mapping. MyBatis eliminates almost all JDBC code and manually setting parameters and retrieving results. MyBatis can use simple XML or Annotations to configure and map primitives, mapping interfaces, and Java PO ...
Added by hesketh on Sun, 20 Feb 2022 14:15:42 +0200
[mybatis] a direct conclusion
Mybatis
brief introduction
MyBatis is an excellent persistence layer framework, which 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 configure and map primitive types, interfaces and Java POJO s (Plain Old Java Objec ...
Added by Griff1324 on Sat, 19 Feb 2022 13:48:02 +0200
Declarative transaction
What is a transaction?
Transaction is to treat a series of actions as an independent unit of work, which are either completed or ineffective.
Attribute ACID of transaction:
1. Atomicity: a transaction is an atomic operation consisting of a series of actions. The atomicity of a transaction ensures that the actions are either completed or inef ...
Added by amandas on Sat, 19 Feb 2022 12:43:32 +0200
Chapter 7 MybatisPlus plug-in
Chapter 7 MybatisPlus plug-in
1. Overview of plug-in mechanism
MybatisPlusInterceptor core plug-in
MybatisPlus can intercept the execution of relevant methods of four objects (Executor, StatementHandle, ParameterHandler and ResultSetHandler) through the plug-in (Interceptor), and complete the dynamic change of relevant data according to ...
Added by chiprivers on Fri, 18 Feb 2022 13:59:25 +0200