MyBatis -- generator reverse engineering

I. Introduction Official website: http://www.mybatis.org/generator/index.html By using the official mapper auto generation tool, mybatis-generator-core-1.3.2, po classes and mapper mapping files are automatically generated. Function: mybatis officially provides reverse engineering, which can be used to automatically generate Mapper interface, m ...

Posted by sumathi on Wed, 04 Dec 2019 21:56:30 -0800

springboot learning notes

(V) springboot integrates the thmeleaf template to realize simple login 1. Modify the user table in the note in the previous section, add a password field, and require the username to be UNIQUE to realize login verification. The table structure is as follows.   CREATE TABLE `user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` var ...

Posted by James25 on Wed, 04 Dec 2019 21:47:35 -0800

[MyBatis] reverse engineering use

Using mybatis reverse engineering, it is very convenient to automatically map with tables in the database, and generate mapper.xml and mapper interface. Here I use IDEA to demonstrate through maven. Step 1: configure the pom.xml fileThe corresponding shelf package is introduced. The emphasis of reverse engineering is on the mybat ...

Posted by luddeb on Wed, 04 Dec 2019 15:53:41 -0800

Mybatis generator generates Service and Controller

Take notes for a long time. In this period of time, when doing government projects, the data entry system is basically imported through excel, and the data volume is large, many of which are also single table entry, so there are many general codes, such as controller,service layer, which can be generated by code, and a database batch adding int ...

Posted by Jin597 on Wed, 04 Dec 2019 13:46:49 -0800

Learning back-end fast food for all - accessing database with MyBatis

Learning back-end fast food for all (3) - accessing database with MyBatis In the last section, we learned the JdbcTemplate to access the database, which is much more convenient than using the original JDBC. At least you don't have to deal with a lot of exceptions.But we can still use some frameworks to make the work less. The main choice is MyB ...

Posted by mattison on Wed, 04 Dec 2019 07:19:46 -0800

Writing 10 years of JAVA code, why is it still messy?

Many programmers who have known to write code for more than 10 years often find their code messy. How can you write code that makes your colleagues feel less messy? 1. Why should I write this article? Explain why you want to write this article before you start?In the Java world, MVC software architecture pattern is absolutely classical (PS: ...

Posted by stopblackholes on Tue, 03 Dec 2019 04:47:44 -0800

How to configure multiple data sources and switch between them?

Recently, a project of the company needs to connect two databases (A and b) for operation. Some modules query database a, and some modules query database B. therefore, the project background uses the spring MVC + mybatis + MySQL architecture. After two days of tossing, it is finally completed. Here, the modification process is recorded. Us ...

Posted by tryin_to_learn on Sun, 01 Dec 2019 07:40:39 -0800

spring boot+mybatis building project

I. create the spring boot project 1.File->New->Project image.png 2. Select Spring Initializr, then select the default url and click [Next]: 2.jpg 3. Modify project information 3.jpg 4. Select the template of the project 4.jpg 5.jpg 5. Fill in Project name and project location, and then click Fin ...

Posted by guru2k9 on Sun, 01 Dec 2019 06:13:00 -0800

2. Initialization depth analysis of MyBatis Mapper Bean 5-3

III. load MapperScannerRegistrar The startup class code is as follows: package com.iwill.mybatis; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; import or ...

Posted by suzzane2020 on Sun, 01 Dec 2019 04:16:48 -0800

Java advanced notes: Spring Boot integrates Mybatis

Mybatis is an excellent persistence framework that supports customized SQL, stored procedures, and advanced mapping. Mybatis avoids almost all JDBC code and manual setting of parameters and getting result sets. This article introduces the steps of integrating Mybatis with Spring Boot. MYSQL is selected as the database Create a Spri ...

Posted by jwmessiah on Sat, 30 Nov 2019 13:34:09 -0800