Advanced Security of springboot - Integrating spring security

Case: According to the different level of martial arts, people can see different secret books of martial arts. 1. Create a small project: Project structure 2. Project code (without security certification): Controller layer: @Controller public class TestController { @GetMapping("/") public String i ...

Posted on Mon, 14 Oct 2019 10:39:07 -0700 by timandkitty

Spring Cloud Feign summarizes problems, points of attention, performance tuning, switching okhttp3

Summary of Feign Frequent Questions If FeignClient interface uses @ PathVariable, value attribute must be specified //In some early versions, @PathVariable("id") has the "id", which is the value attribute, which must be specified and cannot be omitted. @FeignClient("microservice-provider-user") public interface UserFeignClie ...

Posted on Mon, 14 Oct 2019 06:15:33 -0700 by screamer141

IoC Loaded Bean: Summary

In the previous section, we have loaded the beans into the IOC container. Next, we will load the IOC beans out for code parsing remarks: (some explanations refer to the relevant explanations of other blogs). Let's discuss together, Please add me QQ:1051980588. The initialization node of a bean is opened by the first (explicit or implicit) call ...

Posted on Sun, 13 Oct 2019 20:46:10 -0700 by fewtrem

Spring 5 source code deep parsing - how is spring transaction implemented through AOP? (100% understanding of Spring transactions)

This article needs a Spring AOP foundation, knowing the underlying principles of AOP can better understand Spring's transaction processing. Custom Label For the code analysis of transaction functions in Spring, we start with the configuration file, which has such a configuration: <tx: annotation-driven/>. It can be said that the configu ...

Posted on Sun, 13 Oct 2019 20:43:39 -0700 by ankurcse

Parameter Check - validator

Catalog background Importance Best Practice - springboot pom file Entity class (domain model) Controller layer Type comparison Reference articles background Background parameter validation is essential during development, so you often see code like the following There's nothing wrong with this ...

Posted on Sun, 13 Oct 2019 14:31:16 -0700 by neutra

springboot2 properties file dynamic loading

1. A better solution is to use file monitoring to rely on commons-io2. <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version> </dependency> 2. Writing listeners import java.io.File; import com.di ...

Posted on Sun, 13 Oct 2019 10:43:31 -0700 by majik92

Invalid use of @Value in the interceptor in Spring Boot

scene Interceptors are often used when using the Spring Book framework. Sometimes, however, we encounter the failure of @Value annotation in the interceptor to obtain configuration parameters in the configuration file, which has always been for null. Past Previous configurations are as follows: /** ...

Posted on Sun, 13 Oct 2019 10:23:14 -0700 by marsupillami

Three Injection Modes and Set Type Injection of Learning Spring Together

This article mainly explains three different injection methods in Spring development, and the injection of aggregate data types. It is only for learning and sharing. If there are any shortcomings, please correct them. Summary There are three ways to inject Spring, as follows: Through the set attribute injection, that is, through the Geter o ...

Posted on Sun, 13 Oct 2019 08:18:26 -0700 by lew14

Use of Thymeleaf objects: string objects

Thymeleaf mainly uses the class org.thymeleaf.expression.Strings to process strings, and the # strings object to process strings in templates. Development environment: IntelliJ IDEA 2019.2.2Spring Boot version: 2.1.8 Create a new Spring Book project named demo. 1,pom.xmlAdding Thymeleaf dependencies <dependency> ...

Posted on Sun, 13 Oct 2019 04:45:47 -0700 by msandersen

Dubbo remote call solr problem

Dubbo remote call solr problem Using Dubbo to call the solr query of the server remotely, there is a return value, but the mapping to the bean is null. Server-side local tests, return values are normally mapped to beans @Service public class ItemSearchServiceImpl implements ItemSearchService { @Autow ...

Posted on Sat, 12 Oct 2019 11:29:57 -0700 by l053r