Using maven to create spring project registration bean, running successfully
1: Project creation and configuration
1.
2 if your maven warehouse is not under the default.. / user / directory, modify the settings settings, and then pom.xml Add spring dependency in. Note that you need to re-enter it even if it is not reported as red after adding
3. Create a ...
Added by Hellusius on Mon, 15 Jun 2020 08:56:53 +0300
Analysis of the problem that the custom interceptor cannot intercept zuul requests
1 process
1. Create a custom interceptor class MyInterceptor
2. Register interceptor
@Configuration
public class WebConf extends WebMvcConfigurerAdapter {
@Autowired
MyInterceptor myInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
...
Added by pramodv on Sun, 14 Jun 2020 08:19:44 +0300
Notes on the use of Spring IOC, AOP
Configuration of xml
Create xml file in src directory, named custom
Add code to xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http:/ ...
Added by jonorr1 on Fri, 12 Jun 2020 04:59:06 +0300
SpringBoot 2.3 integrates the latest ShardingJdbc + Druid + MyBatis
Today, the project is not busy. I want to have a look at the sharding JDBC sub database and sub table. I want to achieve the following:
Discard the xml configuration and use. yml or. properties file + java to configure spring.
Use Druid as database connection pool, open monitoring interface at the same time, and support monitoring multiple dat ...
Added by htcilt on Thu, 11 Jun 2020 06:47:20 +0300
21, Spring cloud Alibaba Nacos service registration and configuration center
Spring cloud Alibaba Nacos service registration and configuration center
About Nacos
Why Nacos
The first four letters are Naming and Configuration, and the last s is Service
What is it?
A dynamic service discovery, configuration management and service management center easier to build cloud nat ...
Added by luckybob on Thu, 11 Jun 2020 06:08:17 +0300
As long as you log a lot, locate a BUG shuttle
The complete code covered in this article: GITEE
Or visit: https://gitee.com/topanda/spring-boot-security-quickly-start/tree/jpanda-spring-boot-security-api/src/main/java/cn/jpanda/demo/manager/configuration/log
It is hard to avoid bugs when you write too much code. As a programmer who has been walking all year, it is not a rare thing to talk ...
Added by deejay1111 on Wed, 10 Jun 2020 06:50:17 +0300
spring session + redis to realize distributed session
introduction
In general, in order to solve a single point of failure, web applications in the production environment will be deployed on multiple platforms, so there will be a problem. When we log in, we will store the login information in the session. If we rely on the session in the native web con ...
Added by mouloud2001 on Tue, 09 Jun 2020 05:20:25 +0300
Automatic assembly of Spring source
Introduction
Autowired annotations are often used to inject dependent bean s during Spring development, which is also one of the hot issues in interviews.Today let's delve into the underlying implementation of automatic injection.First, let's start with the previous example, as follows:
@RestController
public class TestController {
@Au ...
Added by Japher on Mon, 08 Jun 2020 03:25:54 +0300
The parsing process of spring xml file's default label
It all starts with kneeling, silver goalkeeper
Now all the articles about spring will be reorganized later. Here is just a record. Until I'm familiar with ioc, I'll string up the previous articles.
Parsing xml tags starts with the parseDefaultElement(Element ele, BeanDefinitionParserDelegate delegate) ...
Added by tridean34 on Sat, 06 Jun 2020 10:33:01 +0300
Spring obtains single instance process
After reading this article, you will get
In the getBean method, Spring handles aliases and the name of factoryBean
How Spring gets beans from multi-level cache according to beanName
How Spring deals with getting common beans and factorybeans from users
introduction
from Initialization of Spring container In, we learned how Spring convert ...
Added by SirEddie on Sat, 06 Jun 2020 08:47:18 +0300