java hook function (hook) take spring source code as an example
1, What is a hook function
In Spring, if the JVM terminates abnormally, how does Spring ensure that the occupied resources, such as database connections, will be released? The hook function is so simple that you can just extract a piece of Spring code.
2, Question
When does the Bean in the Spring container execute the destruction method? We ...
Added by darrensw on Thu, 23 Dec 2021 05:30:09 +0200
Bean in Spring container
The Spring container is a super factory, and the Bean in the Spring container is the product of the factory. For developers, the Spring framework mainly does two things: (1) Develop Bean (2) Configure Bean
1. Definition and alias of Bean
A bean is an object that is instantiated, assembled, and managed through the Spring IoC container. It is ...
Added by rcatal02 on Wed, 22 Dec 2021 16:24:22 +0200
Use @ ConfigurationProperties for configuration binding in SpringBoot
Use Java to read The contents of the properties file are and encapsulated into JavaBean s
New Maven project: demo1.Modify POM XML, add dependencies.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" ...
Added by byronwells on Wed, 22 Dec 2021 13:21:39 +0200
Understand the details of using spring framework in web Environment (facilitate the integration after understanding)
Summary:
Containers are no longer created every time, that is, spring configuration files or configuration classes no longer need to be loaded multiple times It is designed to create app objects as soon as the web application startsThe configuration name can be ignored, that is, the configuration name is different, and you only need to modify ...
Added by Tryfan on Wed, 22 Dec 2021 08:59:20 +0200
[Spring Boot] 032 - configure AOP
[Spring Boot] 032 - configure AOP
1, AOP
1. Overview
In the following reference articles, AOP has been introduced in detail, but I am very unfamiliar because I don't often use (never used) AOP, so I take this opportunity to learn about AOP again,
2. Reference articles
[Spring]009-AOP
https://blog.csdn.net/qq_29689343/article/details/10841 ...
Added by DarkHavn on Wed, 22 Dec 2021 05:46:04 +0200
Day_61 Java Spring framework -- Introduction
1. What is Spring?
Spring is an open source framework. Spring is a lightweight Java development framework rising in 2003. It is derived from some concepts and prototypes described by Rod Johnson in his book expert one on one J2EE development and design.
It is created to solve the complexity of enterprise application development. One of the ma ...
Added by Muses on Tue, 21 Dec 2021 18:22:09 +0200
[java spring] annotation automatic assembly
Common annotations in Spring are as follows: 1)@Component This annotation can be used to describe beans in Spring, but it is a generalized concept, which only represents a component (Bean) and can act at any level. When using, you only need to mark the annotation on the corresponding class. 2)@Repository The class used to identify the data acce ...
Added by SueHubert on Tue, 21 Dec 2021 13:47:18 +0200
Redis sentinel and cluster configuration and use under centos7
catalogue
About redisinstallSimple configuration and use of sentrySimple cluster configuration and use
1. About Redis
What is Redis
-redis is a key value storage system (NoSQL). -redis provides five data types:
`string,hash,list,set and zset(sorted set) `.
Advantages of Redis (compared with traditional relational databases)High performan ...
Added by henka on Tue, 21 Dec 2021 11:41:42 +0200
[SpringMVC starts from 0] SpringMVC RESTFul actual case -- implementation of modification function
1, Echo function
Before the actual modification, you need to have an echo function, that is, you can see the data after clicking the edit page.
1. Modify operation hyperlink
The request address here is the same as the deleted address. You need to bring the id because you want to echo the data of this id.
<td>
<a @click="del ...
Added by rubberjohn on Tue, 21 Dec 2021 09:37:29 +0200
Spring Boot Learning Notes
Video source: Power Node springboot Video Tutorial
Why use Spring Boot?
Using Spring and Spring MVC requires a large number of xml configuration files, configuring various objects, and putting the objects in the Spring container to use them is cumbersome. At the same time, when integrating other frameworks with Spring, you need to understand ...
Added by JayBachatero on Tue, 21 Dec 2021 09:27:19 +0200