Dynamic SQL Statements in Mybatis

The Foundation of MyBatis Series (10) Dynamic SQL Statements in Mybatis 1. Overview of Dynamic SQL Referring to the official documents, it is described as follows: They are: if choose (when, otherwise) trim (where, set) foreach 2. Label of ...

Posted by guttyguppy on Sun, 18 Aug 2019 11:34:11 +0200

Java - Manual build SSM (Maven)

I. Environmental deployment Operating System: Windows 10 Professional Edition jdk:1.8.0_144 IDE: eclipse-oxygen Server: tomcat 9.0 Database: mysql 5.7.18 Maven: 3.54 "If you want to do a good job, you must first use your tools." The environment must be built in advance. II. New Maven Project In the menu bar, click File-New- ...

Posted by harrylt on Fri, 16 Aug 2019 06:40:47 +0200

Mybatis additions, deletions, modifications, dynamic SQL statements, multi-table operations (easy to understand, graphics and text teaching, a whole set of actual combat)

1. Optimizing code Let's start with a little optimization of yesterday's code. Test methods written in test classes. If we write one test method at a time, we need to build factories or something, and there will be a lot of repetitive code.Modify the test method Mybatis Test public class MybatisTest { ...

Posted by Jon12345 on Tue, 13 Aug 2019 11:40:37 +0200

SpringBoot Two Ways to Simply Integrate Mybatis

rely on Be careful The database connection pool is used here, the Druid is used here, and the Druid is used here is com.alibaba.druid-spring-boot-starter. The starter is provided by a third party. The names of MyBatis and Druid depend on are different from those of other libraries, but the mysql it supp ...

Posted by Good2CU on Mon, 12 Aug 2019 10:29:14 +0200

Advanced mapping: one-to-one, one-to-many, multi-to-many query summary

Data Interaction between Multiple Tables In fact, one-to-one and one-to-many mappings have already been touched on in the previous configuration. I explained directly in the log because I wanted to write a summary log (that is, this article) after that to summarize the configuration of these advance ...

Posted by trube on Mon, 12 Aug 2019 10:15:14 +0200

Spring Boot's core 27 annotations, how much do you know?

Guide reading Spring Boot project development has gradually become the mainstream framework in the field of Java application development. It can not only create production-level Spring applications easily, but also easily integrate with the hot micro-service framework Spring Cloud through some annotation configurations. The ...

Posted by antileon on Sun, 11 Aug 2019 12:12:47 +0200

Spring mybatis - ssm framework environment construction (scheme 1)

The SSM framework - S-Spring S-Spring mvc M-mybatis requires the following configuration files to be placed under the resources folder: db.properties is the configuration file of the database connection pool, which has the connection information of the database jdbc: # JDBC jdbc.driverClass=com.mysql.jdbc.Driver jdbc.connectionURL=jdbc: ...

Posted by drepster on Fri, 09 Aug 2019 13:03:55 +0200

Java simulates and solves cache penetration

Java simulates and solves cache penetrationWhat is Cache PenetrationCache penetration only occurs in high concurrency, that is, when there are 10,000 concurrent query data, we usually go to redis to query data first, but if there is no such data in redis, then a large part of the 10,000 concurrent data will go to mysql at once. Queried in the d ...

Posted by ditusade on Thu, 08 Aug 2019 09:39:27 +0200

Spring Boot 2.x: PageHelper you don't know

PageHelper Speaking of PageHelper, friends who have used Mybatis may not be unfamiliar. As a paging plugin developed by a Chinese, it basically meets our daily needs.But when I wanted to go to the official documentation and see how it worked with Spring Boot, I found this: So I spent an evening exploring how to play this sensibly. quick get st ...

Posted by webtech123 on Thu, 08 Aug 2019 04:21:44 +0200

Mybatis Framework -- Basic Introduction

Introduction to Mybatis Mybatis is a persistence framework, ORM framework, is the top-level project under Apache, supporting customized SQL, stored procedures and advanced mapping. Mybatis avoids all JDBC code and manual parameter setting and result set acquisition in the JDBC programming process. Mai ...

Posted by maineyak on Sat, 03 Aug 2019 10:14:39 +0200