Spring boot enables dynamic loading of remote configuration files
demand
There is an independent API project, which mainly provides API interfaces for external systems. In order to ensure the security of the call, the request needs to be verified, including the call frequency, access IP, cross domain and Token. The IP and cross domain configuration will be modified according to the receiver, In order to avoi ...
Added by Transwarp-Tim on Thu, 10 Mar 2022 14:15:27 +0200
Spring principle and source code analysis series - Spring IoC container startup process analysis
preface
Spring's IoC container is a lightweight container that provides IoC support. BeanFactory provides two containers: BeanFactory and BeanFactory ApplicationContext. The inheritance relationship between the two is as follows:
• BeanFactory: the basic IoC container adopts the lazy load strategy by default, that is, only when ...
Added by tdelobe on Thu, 10 Mar 2022 05:06:05 +0200
Solution to invalid spring session configuration serialization for redis
The reason for the problem: after using springsession to automatically add the setting attribute to redis, it will appear hexadecimal garbled code in front of the value. Even if redis serialization configuration is configured, it is useless, because spring session creates a redis itself, and the default is new JdkSerializationRedisSerializer(); ...
Added by mobiuz on Wed, 09 Mar 2022 16:25:54 +0200
(learning notes) priority and value of SpringBoot2 configuration file
Priority of profile
For springboot, three configuration files are provided to operate its configuration. yaml is officially recommended, but the default is properties, which is in the priority,
properties > yml > yaml
Basic syntax of yaml
Case sensitive.The data value must be preceded by a space as a separator.Use indents to indicate ...
Added by exally on Wed, 09 Mar 2022 14:56:08 +0200
spring scheduled task @ Component
1 Introduction
spring implements scheduled tasks through annotations, and operates automatically after a fixed time. For example, the mall clears the unreceived orders after a certain time.
2 use
2.1 add annotation @ enableshcheduling
Add a comment @ enableshcheduling on the entry class or Task header to enable support for scheduled ...
Added by melvincr on Wed, 09 Mar 2022 14:34:55 +0200
SpringBoot10: static resource processing for Web development
Research on Web Development
brief introduction
OK, students, next, let's start to learn about SpringBoot and Web development. From this chapter on, it belongs to our practical part;
In fact, the things of SpringBoot are very simple to use, because the biggest feature of SpringBoot is automatic assembly.
Steps to use SpringBoot:
1. Create a ...
Added by manhattanpaul on Wed, 09 Mar 2022 12:50:37 +0200
Automatic configuration of spring boot web application
Automatic configuration of web application
As analyzed in previous articles, @ SpringBootApplication will use the @ Import annotation to introduce AutoConfigurationImportSelector AutoConfigurationImportSelector will return the autoconfiguration class to be loaded through the spi mechanism These include dispatcher servlet autoconfiguration and ...
Added by getgray on Tue, 08 Mar 2022 22:57:36 +0200
springcloud distributed micro service E-commerce mall learn from me about the use of spring cloud gateway filter factory
Gateway filter factory is a filter factory provided in Spring Cloud Gateway. The routing filter of Spring Cloud Gateway allows you to modify the incoming HTTP request or output HTTP response in some way, which only works on specific routes. Spring Cloud Gateway has many built-in filter factories, which can be used directly by configuration. At ...
Added by lancia on Tue, 08 Mar 2022 19:51:30 +0200
Observer mode of 23 design modes
Observer mode of 23 design modes
reference material
Java design patterns: comprehensive analysis of 23 design patterns (super detailed)Han Shunping's Java design pattern (illustration + framework source code analysis) Qin Xiaobo's Zen of design pattern
Please correct any mistakes and omissions below
1, Introduction
definition
It refer ...
Added by allenskd on Tue, 08 Mar 2022 16:18:35 +0200
Spring boot data access
Spring boot(6) data access
Learning video: https://www.bilibili.com/video/BV19K4y1L7MT?p=62&spm_id_from=pageDriver
1. Automatic configuration of data source - HikariDataSource
1.1 importing JDBC scenarios
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spr ...
Added by glenelkins on Tue, 08 Mar 2022 14:27:47 +0200