Overview of Spring Data JPA

Overview of Spring Data JPA 1.1 overview of spring data JPA Spring Data JPA is a set of JPA application framework based on ORM framework and JPA specification. It enables developers to access and operate the database with simple code. It provides common functions including addition, deletion, modif ...

Posted on Wed, 19 Feb 2020 19:50:00 -0800 by itsmeArry

The use and principle of ThreadLocal

I. overview The simple understanding of ThreadLocal is to share resources for a thread, save some resources in the thread through set() method, and then obtain this resource through get method. It solves the problem of sharing the same object or variable in the same thread and method of different clas ...

Posted on Wed, 05 Feb 2020 23:24:57 -0800 by vhaxu

Hibernate multi table design

Multi table design In the development process, the requirement analysis is carried out in the early stage. The requirement analysis provides E-R diagram, and the table structure is compiled according to the ER diagram. There are three relationships between tables: one to many, many to many, and o ...

Posted on Tue, 04 Feb 2020 03:33:57 -0800 by dannyz

Design Mode - Agent Mode

In some cases, a client cannot or does not want to access another object directly, and then an intermediary is needed to help complete a task, which is a proxy object.For example, buying a train ticket does not necessarily mean going to a train station. It can be bought through the 12306 website or a ...

Posted on Mon, 03 Feb 2020 18:27:58 -0800 by Daijoubu

Hibernate (11) - one to many association mapping

This blog series is summarized here: Hibernate summary One to many association mapping One to many association mapping 1. Create model object 2. Configuration mapping file 3. Test one to many Preservation query 4. One to many two-way Association (1) Create model (2) Modify configuration (3) Test o ...

Posted on Wed, 29 Jan 2020 00:03:48 -0800 by nec9716

Hibernate (10) one-to-one association mapping

This blog series is summarized here: Hibernate summary One to one association mapping One to one association mapping 1. Create model class 2. Configuration mapping file 3. One to one single end test Preservation query 4. One to one bidirectional association mapping Preservation query The so ...

Posted on Tue, 28 Jan 2020 23:00:18 -0800 by zelot1980

Three states of objects in Hibernate_hibernate

This series of blogs is summarized here: Hibernate Summary Three states of objects 1. Three states of objects in hibernate 2. Transient Object to Persistent Object 3. Conversion of persistent and offline objects 4. Objects queried by get, load and iterator are persistent 5. Persistent and offline obje ...

Posted on Tue, 28 Jan 2020 19:32:28 -0800 by tmann

XML parsing -- using dom4j open source library

Article directory 1, How to parse XML with dom4j 2, The steps of dom4j parsing XML 3, dom4j parsing XML instance (1) Give the file of XML to be parsed (2) Encapsulating XML files as Java objects (3) Parsing XML with dom4j Querying nodes in an XML file Add nodes to XML file Modify nodes of XML file ...

Posted on Wed, 15 Jan 2020 01:51:14 -0800 by MytHunter

hibernate left Association query returns custom VO

Requirement: multi table associated query to obtain the required fields in each table 1. Create the UserAccountInfoVo entity class, set the get set method, and the fields are all lowercase. Even if the sql is upper case, the return result is lowercase, which will cause the setter method not to be found public class UserAccoun ...

Posted on Fri, 10 Jan 2020 08:01:38 -0800 by Pezmc

Validator custom validation of parameter validation tool

Baidu blog a lot of validator, this article is excerpted part of the content combined with the use of experience in the project 1, Import maven dependency <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> <version>1.1.0.Final</version& ...

Posted on Sun, 22 Dec 2019 23:25:51 -0800 by RW