Spring Principles - Spring's most frequently used feature-dependent injection, the source of which must be known; this is the core of our daily development; understand the source; this is enough;

@TOC # Spring Series Record every step in the program u auth:huf Reply: In the front of the article, I will reply to some students'questions. Note that if the return return value is not written when using InstantiationAwareBeanPostProcessor;This is in the process of creating objects;This will cause the @Autowired injection inside the object ...

Posted by UseeHere on Mon, 20 Sep 2021 18:33:53 +0200

@Constraint Custom Validation Type Comment

/** * Bank card verification */ @Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER}) @Retention(RUNTIME) @Documented @Constraint(validatedBy = {StringChecker.class, ObjectChecker.class}) public @interface BankCard { String message() default "Bad format of bank card number"; Class<?>[] groups() default {}; Class& ...

Posted by dw89 on Sun, 19 Sep 2021 18:53:19 +0200

Encryption of login information and access rights

Encryption of user password: during user registration, query whether the user exists in the database according to the transmitted information. If it does not exist, encrypt its password. The encrypted information is stored in the database. When logging in, encrypt the login password again and verify it with the encrypted information in the data ...

Posted by bettydailey on Sat, 18 Sep 2021 15:04:30 +0200

eureka registry for spring cloud microservices

Example code cloud address https://gitee.com/zhang-xin-1/springcloud1   1, Create Eureka project module Create eureka project   Create a spring Lnitializr project Direct search import Eureka dependency     Configuration dependency pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apac ...

Posted by mabans on Sat, 18 Sep 2021 12:05:43 +0200

The core of Spring - IoC and DI

IoC, the core of Spring IoC control reverses the permission of Inverse of Control to create objects. Objects needed in Java programs are no longer created by programmers, but are created by IoC containers. IoC core idea Implement IoC in the way of Java Web 1,pom.xml <dependencies> <!-- introduce Servlet rely on --> ...

Posted by harman on Sat, 18 Sep 2021 11:06:06 +0200

One move to get the visual monitoring of Spring Boot!

1. Introduction When an application is running in a production environment, it is necessary to monitor its health. By understanding the health of the application in real time, you can get a warning before the problem occurs, and you can solve the problem before the customer notices the problem. In this article, we will create a Spring Boot ap ...

Posted by Bubbagump on Sat, 18 Sep 2021 10:58:46 +0200

Operation principle of SpringBoot

Operation principle of SpringBoot Since I wrote the first SpringBoot program, I have touched the fish for a few days. Now I come back to study the operation principle of SpringBoot! 1. Dependent file pom Previously, SpringBoot created a Maven project, so the corresponding configuration file pom.xml must contain all the dependencies required ...

Posted by DEVILofDARKNESS on Sat, 18 Sep 2021 06:07:19 +0200

Source code analysis of dependency injection in Spring

In the previous section, we talked about the working principle and source code analysis of automatic injection (byName,byType) and @ Autowired annotation in Spring. Today, we will analyze the remaining core methods: @Nullable Object resolveDependency(DependencyDescriptor descriptor, @Nullable String requestingBeanName, @Nullable Set<S ...

Posted by noobcody on Sat, 18 Sep 2021 03:10:59 +0200

SSM mybatis usage process

SSM mybatis usage process Official teaching Mybatis usage process 1. Import the coordinates of jar or mvan <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>provided</scope> </dependency> <dependency> <groupId&gt ...

Posted by RedMaster on Fri, 17 Sep 2021 12:20:37 +0200

Spring -- JDBC and transaction 2021-09-16

JDBC 1. Functions of JDBC module: Responsible for database resource management and error management, which simplifies the operation of developers on the database. 2,JdbcTemplate: The Spring framework provides this class, which is the basis of the data abstraction layer of the Spring framework and the core class of Spring JDBC. 3. The JDBC ...

Posted by fredouille on Fri, 17 Sep 2021 05:25:54 +0200