Spring MVC principle and configuration 1. Spring MVC overview Spring MVC It is a powerful and flexible web framework provided by Spring. With the help of annotations, Spring MVC provides a developm
Category: Spring
Spring is an open source framework. Spring is a lightweight Java development framework that emerged in 2003 and was created by Rod Johnson. Simply put, Spring is a layered JavaSE/EEfull-stack (one-stop) lightweight open source framework
Spring boot 2.0 + Configure log4j logs
1. Maven introduces the package and excludes the default log
1
2 org.springframework.boot
3 spring-boot-starter
4
5
6 org.springframework.boot
7 spring-boot-starter-logging
8
spring-boot – Spring boot – 配置EntityManager
I use Google guice in my project, and now I try to completely convert the framework to SpringBoot.
I configured Bean for persistence.xml, As shown below
@Autowired
@Bean(name = “transac
Spring boot security CORS
I have a problem with the CORS filter of spring security URL.
It will not set Access-Control-Allow-Origin and Other public headers will not be filtered by Spring Security.
This is the config
Spring core technology (4)
Continued from the previous article: Spring core technology (3)
version 5.1.8.RELEASE
As mentioned in the previous section, you can define bean properties and constructor parameters as
Spring MVC uniformly handled three ways
Catalog
Body p> Spring unified exception handling has three methods, namely:
There is a downside to using this annotation: exception handling The method must be in the same Controller
Is the bean in Spring is the thread safe?
Conclusion: Not thread-safe
Is the Bean in the Spring container thread-safe? , The container itself does not provide a bean thread safety strategy, so it can be said that the Bean in the Spri
Spring bean life cycle, how to manage
1. Instantiate a Bean, which is what we usually call new
2. Configure the instantiated Bean according to the Spring context, that is, IOC injection
3. If this Bean implements the BeanNa
Spring boot integrated Rabbit MQ uses a first experience
First experience of using Spring boot integrated Rabbit MQ
First introduce several characteristics of rabbitMQ
Asynchronous Messaging
Supports multiple messaging protocols, message que
Springboot – Prevent repeated submission (lock mechanism — local lock, distributed lock)
To prevent duplicate submissions, it is mainly handled in the form of locks. If it is a stand-alone deployment, you can use a local cache lock (Guava). If it is a distributed deployment, you need t