Three methods of instantiating beans
preface
The core of the Spring framework is the concept of Bean. Here we will talk about three methods to create Bean instances.
At present, there are three methods to create beans. (1) Configuring beans through XML (2) Declare beans through annotations (3) Configuring beans through JavaConfig
XML configuration Bean
Disadvantages: (1) XML ...
Posted by surfinglight on Thu, 30 Sep 2021 15:46:59 -0700
Three or four examples of Java reflection
Annotation provides a secure annotation like mechanism to associate any information or metadata with program elements (classes, methods, member variables, etc.).
Some predefined annotations in JDK
@Override: check whether the method marked by the annotation inherits from the parent class (Interface)
@Deprecated: the method marked by the ...
Posted by flaquito on Thu, 30 Sep 2021 12:49:23 -0700
Spring Boot must know
Spring Boot must know
1, What is it? What can you do?
Is a rapid development of scaffolding Role: quickly create independent, production level Spring based applications SpringBoot is a framework based on Spring to improve efficiency. It can make coding simpler, configuration management simpler and deployment more convenient. characteristic ...
Posted by joshmmo on Wed, 29 Sep 2021 14:53:11 -0700
Agent mode, AOP
Learning website: station b mania
proxy pattern
Why learn proxy mode? Because this is the bottom level of Spring AOP! [Spring AOP and Spring MVC are important]
Classification of agent modes:
Static ProxyDynamic Proxy
Static Proxy
Role Analysis:
Abstract Role: An interface or abstract class is typically used to solve the problem ...
Posted by alienmojo on Wed, 29 Sep 2021 10:25:17 -0700
AOP concept and operation
AOP concept
What is AOP? Aspect oriented programming, AOP can isolate all parts of business logic, so as to reduce the coupling between all parts of business logic, improve the reusability of programs, and improve the development efficiency. Generally speaking, it is to enhance the main functions without modifying the source code AOP underly ...
Posted by bob on Tue, 28 Sep 2021 21:04:30 -0700
Spring boot integrates the plumelog logging system
1, Introduction to PlumeLog
The intrusion free distributed log system collects logs based on log4j, log4j2 and logback, and sets the link ID to facilitate the query of associated logsBased on elastic search as query engineHigh throughput and query efficiencyThe whole process does not occupy the local disk space of the appl ...
Posted by jaylearning on Tue, 28 Sep 2021 20:37:15 -0700
Simple operation using maven framework
1. Two methods of creating Maven project
1.1 the first is to use spring initializr. This configuration is the simplest, but the operation process is a little cumbersome when building a project.
If there is no image, default is selected by default; Click next, Group package organization, artifact project name,
1.2 factors of packaging: jar an ...
Posted by sellfisch on Tue, 28 Sep 2021 20:27:01 -0700
Spring MVC type Converter
Spring MVC type Converter
In the spring MVC framework, you need to collect user request parameters and pass them to the application controller component. All request parameters can only be string data types. The spring MVC framework must Convert these strings into corresponding data types. Generally, JSP+Servlet requires the developer to perfo ...
Posted by taddis on Tue, 28 Sep 2021 18:34:31 -0700
The plaintext password in jdbc.properties is encrypted and decrypted in the spring project
background
When using spring to develop applications, you need to connect to the database. Generally, the database information is placed in a property configuration file, such as jdbc.properties, which stores the sensitive information of the database in clear te ...
Posted by bdlang on Mon, 27 Sep 2021 21:37:56 -0700
Have you stepped on these pits of failure
In normal development, you will encounter the need to add transactions. The annotation @ Transactional is often used, but sometimes it is found that it is added explicitly, but it does not take effect. Why?
Today, let's talk about several transaction failure scenarios that we usually encounter to avoid stepping on the pit in the future. Clic ...
Posted by jason_kraft on Mon, 27 Sep 2021 17:32:11 -0700