cascade and inverse of hibernate in java

1.Cascade is a cascade action. In many_to_one, if cascade is used to cascade related objects, the following code can cascade to save Category objects. Mapping File Settings in Book <many-to-one name="category" column="cid" cascade="save-update"/> When saving a book, if the corresponding category of the book is not saved, save the c ...

Posted by zeberdeee on Thu, 18 Jul 2019 09:43:44 -0700

Struts 2 Learning Notes (Day 3)

1. Tasks for Today · OGNL expression · Combination of OGNL and Struts 2 · Use Struts 2 to optimize customer queries 2. Relevant knowledge 2.1 OGNL Overview of 2.1.1 OGNL OGNL expression OGNL, known as Object-Graph Navigation Language, is a powerful expression language for acquiring and setting attributes of Java ...

Posted by Ionisis on Mon, 08 Jul 2019 14:14:44 -0700

java design pattern-proxy pattern

Definition of proxy pattern Provide a proxy for other objects to control access to this object Roles in the proxy model Subject abstract topic role: abstract topic class can be abstract class or interface, is the most common definition of business type, without special requirements. RealSubject Specific Theme Roles: Also known as del ...

Posted by kpowning on Sun, 30 Jun 2019 16:15:38 -0700

J2EE Series of Spring MVC Learning Notes (1) --Introduction to Spring MVC

The last blog talked about Spring's integration of Struts 2 and Hibernate (the S2SH framework). The function of Struts 2 in the framework of S2SH is to intercept front-end requests, complete the transfer of values between front-end pages and back-end logic processing codes. Hibernate's function is to complete database operations. Spring's funct ...

Posted by shaunrigby on Mon, 24 Jun 2019 12:28:45 -0700

Common design patterns in java

Brief Introduction to Design Patterns Before understanding design patterns, we must know the role of design patterns. The purpose of using design patterns is to reuse code, make it easier for others to understand code, and ensure code reliability. Design patterns make coding truly engineering; design patterns are the cornerstone of software e ...

Posted by mattyvx on Tue, 18 Jun 2019 14:38:14 -0700

Struts2 Learning: Use of interceptor

For websites that require login validation, privilege validation and other functions, each action writes a piece of validation code for each request, which is redundant and difficult to maintain.Strts2 provides interceptors to provide a facet, or common component, for these pages for easy maintenance and code reuse.There are many default interc ...

Posted by p2003morris on Sat, 08 Jun 2019 10:22:18 -0700

Struts 2 Note_Interceptor

A. What is the interceptor? Interceptor: Interceptor, which acts as an interceptor for Action. Filter: A filter that filters requests sent from the client to the server. Interceptor: Interceptor. Interceptor is the client's access to Action. Finer-grained interception. (Intercepting specific methods in Action). The core functions of Struts 2 ...

Posted by dcooper on Wed, 15 May 2019 05:54:19 -0700

Spring Source Parsing-Singleton Scope (singleton) and Prootype Scope (multiple cases)

Scopes of Bean s We are familiar with the scope of Bean s in Spring. In Spring, the most common scopes encountered in normal development are singleton and prototype. But besides singleton and prototype, Spring has other scopes. But these scopes have not been used in development. Spring has complete scopes: Singleton: Singlet ...

Posted by Bennettman on Fri, 03 May 2019 06:10:38 -0700

SSH Integration Mode I

SSH Integration (Struts 2 + Spring + Hibernate) SSH integration, Struts 2 as the web layer, Spring as the business layer, Hibernate as the persistence layer, the situation is roughly illustrated as follows: 1. Import the Jar package The first step in integration is to create a web project and import the jar packages require ...

Posted by numan82 on Wed, 24 Apr 2019 15:24:35 -0700

Working Principle of Struts 2

Before learning struts 2, we need to understand the purpose of using struts 2. What benefits can it bring us? design goal The first goal of Struts design is to apply MVC pattern to web programming. The benefits of MVC mode are not mentioned here. Technological superiority Struts 2 has two technical advantages. First, all Struts ...

Posted by dino345 on Fri, 19 Apr 2019 18:51:35 -0700