Analysis of some methods of WebUtils tool class in spring

If spring is used in your project (of course, for larger projects), the operation of session is much more convenient. If you need to take a value in the session, you can use the getSessionAttribute(HttpServletRequestrequest, String name) method of WebUtils tool (org.springframework.web.util.WebUtils) (1)getSessionAttrib ...

Posted by mlewczuk on Wed, 01 Apr 2020 23:00:18 -0700

Spring MVC environment construction

Spring MVC execution principle When the page sends the request, the controller finds the corresponding mapping (method) according to the request. After the function is executed, the controller jumps to the corresponding page and presents the processing result after the view parser processing according to the returned result. ...

Posted by andybrooke on Wed, 01 Apr 2020 20:24:39 -0700

Event implementation of Spring

The event mechanism is divided into three steps: 1. Custom events 2. Listening events 3. Release event Before spring 4.2: 1. Custom events Note: custom events need to inherit ApplicationEvent import org.springframework.context.ApplicationEvent; public class BlackListEvent extends ApplicationEvent { //Custom even ...

Posted by crees on Wed, 01 Apr 2020 18:31:13 -0700

Solution to get httpsession in spring webSocket

If you don't know the basic usage of spring webSocket, please refer to: webSocket implementation of code scanning login Handshake Interceptor: the implementation class of HttpSessionHandshakeInterceptor overrides the beforeHandshake method, as follows @Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse res ...

Posted by ejaboneta on Wed, 01 Apr 2020 16:45:10 -0700

Seven notes of ssh integration combined with xml

1. In the previous pure xml mode, we have many configuration files. We can use annotation and xml to develop. In this way, our configuration files will be much less. At the same time, we can directly see the configuration in the class, so that we can quickly build a ssh integration project First of all, we should consider: what do we need to re ...

Posted by FraXTC on Wed, 01 Apr 2020 16:31:22 -0700

Authority verification based on Spring Boot

Preface: There is a part of background management system, which needs to divide the roles of users, and then restrict the access content according to the corresponding permissions of roles; or some portal sites, only special personnel can see the corresponding page information. These all need permission control.   Technical points: Spring ...

Posted by Louis-Platt on Wed, 01 Apr 2020 10:38:23 -0700

Simple use of memcached java client

Simple use of memcached java client Start Memcached server ./memcached -d -m10 -u root -l 192.168.1.106 -p 2222 -c 256 -P /tmp/memcached.pid -The d option is to start a Daemons -m is the amount of memory allocated to Memcache, in MB, here is 10MB -u is the user running Memcache, here is r oot -l is the IP address ...

Posted by parkej60 on Wed, 01 Apr 2020 10:24:20 -0700

Spring learning journey (7) comparison of AOP programming based on XML configuration and AspectJ annotation configuration

This blog uses a slightly complex case to compare the differences between AOP programming based on XML configuration and AspectJ annotation configuration. Related to the introduction of packages and other Spring AOP programming preparation, please refer to other blog posts in the small edition. Case requirements: Write a simple calculator to re ...

Posted by Kinneh on Wed, 01 Apr 2020 06:21:33 -0700

Integrating Spring Session with Redis

There are so many specific features of Spring Session. The specific content can be learned from the document. The author makes a summary. The features of Spring Session include but are not limited to the following: Use GemFire to build httpSession of C/S architecture (not concerned) Use the third-party warehouse to realize the cluster sessi ...

Posted by ron814 on Wed, 01 Apr 2020 06:13:29 -0700

[SpringBoot WEB series] summary of asynchronous request knowledge points and usage postures

[SpringBoot WEB series] summary of asynchronous request knowledge points and usage postures In servlet 3.0, asynchronous request support has been introduced, but in actual business development, there are not many children's shoes that may have used this feature? As a literacy and usage tutorial for asynchronous requests, this blog post will ...

Posted by greip on Tue, 31 Mar 2020 22:54:18 -0700