springboot uses filters and interceptors to design login-state interfaces

Scenario: You need to write a login-enabled interface to inject the token-to-object request into the Controller's method, similar to @RequestBody, where token is inside the header where the request exists. Design idea: use a filter to get the token inside the request, get the token into a user object, then save the object into the attribute s ...

Added by gwh on Sun, 12 Sep 2021 20:07:15 +0300

Custom MVC framework

1, Mind map   2, Custom MVC 1. What is MVC?           MVC: ① Model layer is used to encapsulate; ② view layer is used to display   ③ Control layer                       Used to accept browser requests for processing 2. Deficiency of previous Codes: & ...

Added by insanityonline on Sat, 04 Sep 2021 05:15:54 +0300

Handwritten spring Chapter 2 - writing extensible containers using design patterns

preface Based on the previous chapter Handwritten spring Chapter 1 - Basic container construction , we have made a simple spring container to complete bean injection, but we still have many deficiencies in function and architecture design. requirement analysis In terms of framework design, we believe that the architecture must ensure th ...

Added by TEENFRONT on Fri, 03 Sep 2021 07:34:44 +0300

Comprehensive analysis of advanced core knowledge in Java, nginx architecture diagram

<servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet </servlet-class> <!-- If not set init-param Label, you must/WEB-INF/Create under xxx-servlet.xml File, where xxx yes servlet-name The name of the configuration in. --> <init-param> <param-name>co ...

Added by mistercoffee on Thu, 02 Sep 2021 23:37:18 +0300

REDIS12_ Overview of spring cache, @ Cacheable, @ CacheEvict, @ Caching, @ CachePut

① . Spring Cache overview ① . how to find the official documentation of Spring Cache (https://docs.spring.io/spring-framework/docs/5.2.17.BUILD-SNAPSHOT/spring-framework-reference/integration.html#cache) ② . Spring has defined org.springframework.cache.Cache and org.springframework.cache.Cache Manager interfaces since 3.1 to unify diffe ...

Added by dfr574 on Thu, 02 Sep 2021 07:18:55 +0300

[Spring MVC learning notes 3] deeply practice Spring MVC controller

In the previous Blog, we implemented the first framework program of Spring MVC based on configuration and annotation respectively. Next, this Blog makes an in-depth study and Discussion on our Controller. Since it is a Controller, it must contain two topics: receiving requests and returning responses. We will make an in-depth study on these two ...

Added by HaLo2FrEeEk on Wed, 01 Sep 2021 21:45:32 +0300