Spring boot implements RESTful API to return unified data format
There are two aspects to Spring's global processing:
Unified data return format
Unified exception handling
General return value class definition:
public class GlobalResponse<T> implements POJO {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty ...
Posted by plugnz on Mon, 02 Mar 2020 19:35:20 -0800
Spring cloud + Nacos configuration center project is published to the server, and nginx is configured
My environment
Windows10
JDK8
SpringCloud: Hoxton.SR1
SpringBoot: 2.2.4.RELEASE
Spring cloud Alibaba dependencies: 2.1.1.RELEASE (Note: package name starts with com.alibaba.cloud)
Nacos-server: NACOS1.1.4
2. Start nacos service (stand-alone mode & embedded database)
0. Premise: configure JAVA_HOME e ...
Posted by microbluechip on Mon, 02 Mar 2020 18:41:11 -0800
[Spring Security + OAuth2 + JWT start to practice] 4. System configuration user-defined login page
brief introduction
Previously, the default authentication process of spring security was used to process user-defined data and password encryption, but in the actual development, it must be to use the page developed by itself, the business processing of login success and failure, etc.
The personalization configuration is completed in the brow ...
Posted by phbock on Mon, 02 Mar 2020 01:33:07 -0800
Spring boot upload picture
Talking about
I always think it's very complicated to upload pictures. In addition to local upload, there are also local area network uploads and public network uploads. I can't understand them and don't want to learn them, because I always think that local upload is useless. Until today, I can see thro ...
Posted by themire on Mon, 02 Mar 2020 00:04:29 -0800
View the configuration file application.yml at startup
Spring Boot Application events and listeners
In the case of multiple environments. You may need to switch a corresponding property of the configuration file to switch the environment
The problem is how to verify the corresponding property value immediately after the spring boot loads the configuration file
SmartApplicationListener realizes mo ...
Posted by MannX on Sun, 01 Mar 2020 20:21:16 -0800
Brief Analysis of Springboot--Container Refresh Process
First, learn about the various post processor extensions
(1) BeanFactoryPostProcessor - bean factory post-processing
Once the BeanFactory standard has been initialized (all BeanDefinition s have been registered after package scanning), this BeanFactory can be postprocessed.
(2) BeanDefinitionRegistryPostProcessor - bean Definition Registry Post ...
Posted by SemiApocalyptic on Sun, 01 Mar 2020 10:54:34 -0800
java learning stage 5 (SpringIoC&DI)
0. framework 1
0.1 what is a framework?
Framework is a kind of combination of toolkits
We know that when I develop a function, if the function is more complex, we are likely to extract common things into tool classes, and if this tool class has many java tool classes to form a certain function, and ...
Posted by py343 on Sun, 01 Mar 2020 03:01:46 -0800
Detailed explanation of observer mode of internal mental skill of architect, publish first and then subscribe
Application scenarios of observer mode
The dynamic notification of wechat friend circle in life, the email notification in work, the broadcast notification on the school playground, the event response of the computer desktop application and so on are all real life scenes of the observer mode. Observer Pattern defines a one to many dependency be ...
Posted by scs on Sun, 01 Mar 2020 02:44:37 -0800
CAS project deployment and basic operation
Article directory
1, Deploy cas
1. Copy cas.war to webapps
2. Login page
2, CAS server configuration
2.1. Add user
2.2. Port modification
2.3. Remove https authentication
1, Deploy cas
1. Copy cas.war to webapps
Put cas.war under the webapps of Tomcat and start Tomcat
2. Login page
2, ...
Posted by noise on Sun, 01 Mar 2020 01:43:30 -0800
JDK9 New Feature Reactive Stream Responsive Stream
_This article focuses on the JDK9 feature Reactive Stream Responsive Stream, describes what the Reactive Stream is and what the backpressure is, and the interface and two use cases for Reactive Stream provided in JDK9, including how to use Processor.
_1.Reactive Stream concept
_Reactive Stream is a set of standards introduced by JDK9 and a set ...
Posted by simjay on Fri, 28 Feb 2020 18:03:33 -0800