Java notes -- process control

Java notes -- process control 1. Sequential structure The basic structure in Java is sequential structure. Unless otherwise specified, it will be executed sentence by sentence in order. Sequential structure is the simplest algorithm structure. Between statements and between boxes, it is carried out in the order from top to bottom. It is co ...

Posted by oakld on Tue, 21 Sep 2021 02:47:34 -0700

Hibernate JPA complex query

Hibernate JPA complex query 1. JPQL statement Full name of JPQL: Java Persistence Query Language EJB query language (EJB QL) and Java persistent query language (JPQL) introduced in EJB 2.0 are portable query languages. They aim to bind SQL syntax and simple query semantics with the expression of object-oriented expression language. Quer ...

Posted by Meissa on Fri, 10 Sep 2021 02:39:57 -0700

Hiberante reverse-generates database tables

1,hibernate.cfg.xml Comment out this section of configuration <!--Update database level automatically--> <!--<property name="hbm2ddl.auto">create</property>--> 2. New Generate Database Table Tool Class public class HibernateSchemaExport { static Session session; static Configuration ...

Posted by rigi2 on Sat, 18 Jul 2020 08:49:13 -0700

[Spring] Pure java for Spring-hibernate integration

First import the corresponding jar package for Spring-hibernate Then prepare the file for the database connectionHibernate.propertiesAlsoJdbc.properties Hibernate.propertiesFile: Configure the hibernate dialect and automatic table building hibernate.dialect=org.hibernate.dialect.H2Dialect hibernate.hbm2ddl.auto=create Jdbc.propertiesFi ...

Posted by mjgdunne on Wed, 08 Jul 2020 07:43:57 -0700

Two implementation methods of java Dynamic agent

Last article we wrote about static agents Agent mode of design mode [1] static agent Let's talk about java's dynamic proxy today. 1, Why use dynamic proxy In fact, the dynamic agent makes up for the shortcomings of the static agent. The static agent needs to write a proxy class for each proxy object, ...

Posted by shiznatix on Sun, 28 Jun 2020 20:14:24 -0700

BaseModel based on ActiveAndroid framework

brief introduction Based on the ActiveAndroid framework, the Self-encapsulated BaseModel class, and some other operation classes simply need to inherit from BaseModel to have a method of database operation, which is very convenient to use. On how to use ActiveAndroid, I wrote in another of my blogs: http://blog.csdn.n ...

Posted by Misticx on Sun, 28 Jun 2020 09:56:14 -0700

Hibernate Validator - object grouping validation (probably the most comprehensive explanation in the old world)

Then I broke it down last time. I didn't see the children's shoes in the first chapter Click here Play back the content of the previous chapter Entity class @Data @AgeSalaryType public class Student { private Long id; @NotBlank(message = "Name cannot be empty") private String name; @ ...

Posted by apol on Fri, 19 Jun 2020 04:52:25 -0700

A preliminary solution to the working principle of spring framework

1: Basic concepts of spring 1) Struts 2 is web framework, hibernate is orm framework 2) spring is a container framework, which creates beans and maintains the relationship between beans 3) Spring can manage the web layer, persistence layer, business layer, dao layer, spring can configure the components of each layer, and maintain the relati ...

Posted by werty37 on Tue, 09 Jun 2020 23:13:17 -0700

Spring boot from scratch integrates spring data JPA to realize simple application

This paper introduces the simple application of spring boot integrating spring data JPA What is spring data jpa? We can't help thinking about it. In fact, spring data jpa uses hibernate by default and spring data jpa technology, which implements the template Dao layer. It only needs to inherit an interface in Dao to easily complete "add, d ...

Posted by k4pil on Fri, 22 May 2020 02:53:32 -0700

C#Data Operations Series - 10 NHibernate Trial

0. Preface In the last article, you basically completed the introductory tutorial for EF Core.Starting with this article, we'll try to explore more ORM frameworks on the.net core platform.So let's start with NHibernate. 1. Introduction to NHibernate NHibernate is the C#version of Hibernate, known as the pillar of ORM in Java (at least once).Hib ...

Posted by Josh18657 on Tue, 19 May 2020 18:04:34 -0700