Many to one one one-way association mapping of hibernate in java

1. I learned crud operation of single table before. In practical applications, most of them are multi table Association operations. This article will learn how to deal with the relationship between multi tables. 2. Investigate the relationship between book list and book classification table. There is a many to one relationship between the book ...

Posted by nuying117 on Wed, 23 Oct 2019 18:03:28 +0200

JVM core knowledge class loading mechanism

The life cycle of a class in a JVM includes seven stages: loading, preparing, validating, parsing, initializing, using, and unloading. Among them, preparation, verification and resolution are classified as connection stage. Load What the jvm does at this stage Get the binary byte stream of the class by the class name Convert the static s ...

Posted by llanitedave on Wed, 23 Oct 2019 12:48:57 +0200

Spring Cloud OAuth2 for user authentication and single sign on

The article is long, recommend, recommend forwarding, suggest collecting, suggest paying attention to the public account. There are four authorization modes in OAuth 2, namely authorization code mode, implicit mode, resource owner password credentials and client credentials. For details, please refer to this chapter. (http://www.ruanyifeng.co ...

Posted by TPerez on Wed, 23 Oct 2019 04:39:12 +0200

Spring Security OAuth2 authentication server custom exception handling

The default data format returned by the authentication server is as follows: { "error": "unsupported_grant_type", "error_description": "Unsupported grant type: password1" } The above return result is very unfriendly, and the front-end code is also difficult to determine what the error is, so we ...

Posted by gypmaster on Tue, 22 Oct 2019 21:43:38 +0200

spring boot combined with redis monitoring to realize message timeout processing

**The project has a function to monitor whether a service is online. * * *The service will send "heartbeat" to the back-end every 5 seconds (the heartbeat can be a string, a value, etc.). Once the service fails to send "heartbeat" to the back-end for more than 30 seconds, the back-en ...

Posted by plisken on Tue, 22 Oct 2019 18:32:33 +0200

Mybatis environment construction: self study essay

Environment: IDEA MySQL 1. Build maven project, import coordinates: edit pom.xml, and create mybatis constraint. stay https://mybatis.org/mybatis-3/zh/getting-started.html View the latest version of mybatis and the beginning of the constraint. <!-- x.x.x by mybaits Version number --> <dependency> <groupId>org.mybatis& ...

Posted by arhunter on Tue, 22 Oct 2019 16:56:18 +0200

Start Java again -- Reflection

concept reflection: Introspection Reflection: mirrors reflect sunlight A java class or object recognizes itself by looking in the mirror How to realize the mirror in Java language? The java.lang.reflect package provides the mirror API (application interface) If you want to use an object of a certain type in the java.lang.reflect package, you ...

Posted by sloede on Tue, 22 Oct 2019 09:02:05 +0200

Four references in Java

We mentioned GC before, but when more and more objects are referenced in Java, there will be insufficient memory space, resulting in the error OutOfMemoryError and application termination. So why can't GC collect more objects at this time? This is related to the reference types mentioned today.<!-- more --> First of all, starting from JDK ...

Posted by betman_kizo on Tue, 22 Oct 2019 06:42:12 +0200

On the analysis of 8 kinds of SQL errors

Execution order of SQL statement: FROM <left_table> ON <join_condition> <join_type> JOIN <right_table> WHERE <where_condition> GROUP BY <group_by_list> HAVING <having_condition> SELECT DISTINCT <select_list> ORDER BY <order_by_condition> LIMIT <limit_number> 1. LIMIT stateme ...

Posted by Notoriouswow on Tue, 22 Oct 2019 03:12:33 +0200

Linked list: judge whether a linked list has links and find the intersection of two linked lists

Problem 1: return the intersection of two linked lists1. Get the length of two linked lists respectively2. Get the length difference,3. Let the head node of the long list go (length difference) first.4. at this time. The short chain header node is still in place, and the two start to walk together. When the val of the two is equal, the node is ...

Posted by neave on Mon, 21 Oct 2019 17:56:59 +0200