SpringCloudAlibaba+Nacos integrates the Gateway gateway to realize the use of Http timeout, cross domain, metadata and global exception configuration
1. Gateway overview
The so-called API gateway refers to the unified entrance of the system. It encapsulates the internal structure of the application and provides unified services for the client. Some public logic independent of the function of the business itself can be realized here, such as authentication, authentication, monitoring, ro ...
Added by worldofcarp on Sat, 26 Feb 2022 04:07:05 +0200
Spring MVC realizes file upload and download
File upload is one of the most common functions in project development. Spring MVC can well support file upload, but MultipartResolver is not installed in the context of spring MVC by default, so it cannot handle file upload by default. If you want to use spring's file upload function, you need to configure MultipartResolver in the context.
Fr ...
Added by eflopez on Fri, 25 Feb 2022 18:59:23 +0200
Study notes of spring MVC
Introduction to spring MVC
Official documents: https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc
First try spring MVC
Three major components that must be configured to use spring MVC:
Process mapper, process adapter, view parser
schematic diagram
Operation steps
Import Java Web and Spring dependenc ...
Added by simona_85 on Fri, 25 Feb 2022 18:58:30 +0200
Java collection framework
This paper summarizes the Java collection framework
Here are some articles about collections https://blog.csdn.net/weixin_42533238/article/details/106651056 https://blog.csdn.net/ThinkWon/article/details/98844796 https://blog.csdn.net/feiyanaffection/article/details/81394745
Take a look at the structure chart first to get a general impres ...
Added by discombobulator on Fri, 25 Feb 2022 18:39:33 +0200
Spring Boot configuration class processing
ConfigurationClassPostProcessor handles all configuration classes, including @ Component, @ Bean, @ Import annotation, etc. Since the configuration class may introduce new configuration classes and the new configuration classes need to be processed, the ConfigurationClassPostProcessor uses a do while loop to process the configuration classes un ...
Added by trinitywave on Fri, 25 Feb 2022 16:26:13 +0200
The spi mechanism of jdk is used to realize the expansion and decoupling of the interface
0. Background
As we all know, SPI has good practice in many places, such as JDBC driver loading, dubbo, etc. The autoConfiguration of SpringBoot project is also a similar principle. It feels good to use it for module decoupling. For example, we do a service of application management, which has the functions of application installation, upgrade ...
Added by Brand Hill on Fri, 25 Feb 2022 15:38:44 +0200
Java is really not difficult to Log4j log
Log4j log:
What is Log4j? log4j is a common logging framework, which is used to record the execution process or exceptions of the application. It is recorded in the log file. The operation and exception information of the application can be known through the log file.
Why log? We know that the program will produce a lot of information during ...
Added by Warptweet on Fri, 25 Feb 2022 14:59:00 +0200
[Spring] principle and implementation of AOP
1, Gossip
I'm a little sleepy today, but I still insist on learning for a while. Today, let's take a look at another major feature of Spring, AOP
2, Basic points
1. Basic concepts AOP means aspect oriented programming. It is a technology to realize the unified maintenance of program functions through precompiled mode and dynamic agent during ...
Added by washbucket on Fri, 25 Feb 2022 14:33:29 +0200
Common annotations of spring MVC
1.@RequestParam
1. It is used to receive the parameters passed by the method before the parameters passed by the method (it is an annotation that accepts common parameters in spring MVC)
2. Attribute: name in value request parameter
required: whether this parameter is provided in the reques ...
Added by Sgt.Angel on Fri, 25 Feb 2022 14:21:11 +0200
SpringBoot upload file
Uploading files should be the most frequently encountered scenario. Today, let's simply do a Spring Boot file uploading function with you. Without much nonsense, let's start directly.
The project structure is as follows:
pom dependency
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId&g ...
Added by MadTechie on Fri, 25 Feb 2022 14:14:08 +0200