IOC operation Bean Management (XML Automatic Assembly)
1. What is automatic assembly
(1) According to the specified assembly rules (attribute name or attribute type), Spring automatically injects the matching attribute values
2. Demonstrate the automatic assembly process
(1) Inject according to attribute name
<!--Realize automatic assem ...
#Unified exception handling
SpringBoot has a unified method of handling exceptions
To put the exception under a specific path, you only need to put the error page under templates/error. The name of the error page should be consistent with the error type code
When the corresponding type error occurs, springboot will automatically jum ...
Added by ialsoagree on Wed, 02 Mar 2022 10:49:47 +0200
?? Author home page: Li Yangyong?
?? Introduction: high quality creator in Java field Java Li Yangyong, author's resume template, learning materials, interview question bank, technical assistance [pay attention to me and give it to you]
?? Welcome to like?? Collect messages??
Video demonstration: get the contact information of the ...
Added by RavenStar on Wed, 02 Mar 2022 07:01:53 +0200
The so-called dependency injection (DI) actually means that when a bean instance references another bean instance, the spring container helps us create a dependent bean instance and inject (pass) it into another bean.
Dependency: the creation of a Bean object depends on the container, and the Bean object depends on resourcesInj ...
Added by nikneven on Wed, 02 Mar 2022 00:06:47 +0200
Power node Mr. Wang he's SpringBoot introductory series of courses, easy to understand, based on SpringBoot 2 4 version explanation.Start with the details and explain POM in each case Important dependencies in XML, followed by application configuration file, and finally code implementation. Let you know why, gradually let you master the automat ...
Added by adamwhiles on Tue, 01 Mar 2022 10:41:32 +0200
The reflection mechanism of Java is to know all the properties and methods of any class in the running state; For any object, we can call any of its methods and properties. Since we can get it, we can modify some type information; This function of dynamically obtaining information and dynamically calling object ...
Added by panic! on Tue, 01 Mar 2022 09:22:31 +0200
Because spring boot usually simplifies the configuration and feels a little handmade, I handwritten JDBC and Mybatis in Mybatis class today. At the same time, there were several problems, which are recorded here.
0x01 JDBC insert Chinese garbled code
The code is as follows
The characters are still normal when the con ...
Added by devstudio on Mon, 28 Feb 2022 17:40:00 +0200
The overall architecture of SpringThe basic implementation of container and the loading of XML file
1, The overall architecture of Spring
Spring is a layered architecture, which mainly includes the following parts
Core ContainerData AccessWebAopTest
Core container, including core, Beans, Context and Expression L ...
Added by zTagged on Mon, 28 Feb 2022 16:39:47 +0200
1. What is AOP
AOP is a feature of java's spring framework. AOP is the abbreviation of aspect oriented programming. What is aspect oriented programming? Aspect oriented programming is to enhance the functions of the source code without modifying the source code. Examples Originally, a program can realize the function of user login, and the ...
Added by MNSarahG on Mon, 28 Feb 2022 14:54:14 +0200
1. Implementation of spring connection database (JDBC)
Spring has done a lot of encapsulation for JDBC, eliminating redundant code and greatly reducing the development cost. Let's learn about the operation of JDBC in spring through an example.
1) Create data table structure
CREATE TABLE user (
id int(1) NOT NULL auto increment,
name v ...