Handwritten Hibernate ORM framework-01-annotation definition, constant definition

Catalog Catalog Content of this section Annotation definition @Entity @Column @Id @GenerateValue Constant definition HibernateConstant.java TypeMap.java Directory navigation Content of this section Carry out annotation definition and constant definition of Hibernate Annotation definition Simulate Hibernate ...

Posted by azhan on Thu, 26 Mar 2020 08:11:37 -0700

Detailed explanation of CGLIB, one of Java Dynamic agents

In the last article< Java agent pattern and dynamic agent >In Java, we introduce the static proxy mode and dynamic proxy mode, and take JDK native dynamic proxy as an example to explain. In this article, we will introduce the dynamic agent based on CGLIB and compare it with the native dynamic agent. CGLIB introduction CGLIB(Code Generatio ...

Posted by Tekron-X on Mon, 23 Mar 2020 18:43:56 -0700

Using hibernate validator as a data validation component in Spring

In the process of web development, it is often necessary to verify the data sent by the client to prevent the data from being illegal. Spring MVC supports data validation as JSR303 standard, which is verified by annotation @NotNull @Max and other annotations on bean properties. JSR303 provides many annotation excuses, and spring MVC uses hibern ...

Posted by Liquid Fire on Sat, 07 Mar 2020 23:50:51 -0800

3 first hibernate program (IDEA+Maven+Hibernate)

1.3 first hibernate program (IDEA+Maven+Hibernate) 1.3.1 create project 1. Create a Maven project first .2. Improve the project We need to create the successful project directory structure manually. Create the java and resources folders in the main directory.       &em ...

Posted by cinos11 on Sat, 07 Mar 2020 23:33:30 -0800

[java framework] JPA -- Introduction to JPA

1. JPA understanding JPA is the abbreviation of Java Persistence API. It is a Java EE 5.0 platform standard open source object relationship mapping (ORM) specification developed by Sun company on the basis of fully absorbing the existing ORM framework (Hibernate). The relationship between Hibernate and JPA: Hibernate is an open-source object re ...

Posted by pfoger on Sat, 07 Mar 2020 21:51:03 -0800

Storing one to many object relationships using Hibernate

There are often relationships between objects in life, such as one-to-one, one to many, many to many. For example, there are many students in a Course class who are one to many. In the database, you can add a foreign key to the Student table to point to the class id to indicate that the Student conta ...

Posted by monkuar on Thu, 27 Feb 2020 03:24:00 -0800

hibernate tutorial note 3

Why to learn HQL (hibernate query language) - > this is an official recommendation with powerful functions ? delete Session.delete (object) - > batch delete Add? session.save session.persist Modify - > batch modify Sessin.update (object) Query object obj obj.setXXX(); Query? load get Query all ...

Posted by trilbyfish on Mon, 17 Feb 2020 00:38:56 -0800

Infinite recursion and Jackson JSON and Hibernate JPA problems

When trying to convert a JPA object with two-way associations to JSON, I kept org.codehaus.jackson.map.JsonMappingException: Infinite recursion (StackOverflowError) All I found was The thread , basically ending with a recommendation to avoid two-way Association. Who knows the wrong solution this spring? ------Edited on July 24, 2010 16 ...

Posted by Xzone5 on Fri, 14 Feb 2020 06:14:15 -0800

Spring MVC application (data binding - custom type converter, data format, data verification)

1, Ask questions When spring MVC encapsulates custom type objects, JavaBean s are bound to the data submitted by the page one by one. Here's what you need to know: 1) all data submitted by the page are strings 2) attributes in JavaBean s, such as Integer age; When binding data, the following oper ...

Posted by saeed42 on Wed, 05 Feb 2020 22:31:22 -0800

Spring Boot: web application development and CRUD implementation

1, Developing web applications Spring Boot Web development is very simple, including common json output, filters, property, log, etc 2, json interface development In the past, when using spring to develop projects, what needs to be done when you need to provide json interfaces? 1. Add related jar packages such as jackjson 2. Configure spri ...

Posted by Mikedean on Tue, 04 Feb 2020 23:11:06 -0800