Is it difficult to separate reading from writing?SpringBoot is implemented simply with aop
Preface
It's been a month since I joined the new company, I've finished the work at hand, and the last few days I finally have time to research the code for my old project.During the process of researching the code, I found that Spring Aop was used in the project to separate the database from reading and writing, and to learn in my own way (I d ...
Posted by BraniffNET on Tue, 12 May 2020 18:48:39 +0200
[SpringBoot Basic Series] Implement a custom configuration loader (application)
[SpringBoot Basic Series] Implement a custom configuration loader (application)
The @Value annotation is provided in Spring to bind configurations so that they can be read from the configuration file and assigned to member variables; sometimes, our configurations may not be in the configuration file, if they existDb/redis/other files/third-p ...
Posted by McManCSU on Thu, 07 May 2020 04:00:28 +0200
The use of redis distributed lock in springboot project
Now, the microservice projects developed use more distributed locks, so some records are made for the self-determined implementation of distributed locks.*In the actual project, you can use the RLock lock of the Redisson framework directly.
Create a springboot redis project springboot-redis-demo
Add dependency package
<dependency>
...
Posted by dionsweet on Tue, 28 Apr 2020 16:15:39 +0200
Notes on cross domain access processing of springboot web project
Solve the problem of cross domain access of spring MVC web project
1. Cross origin cross domain annotation springboot has its own cross domain annotation, which can be placed on the RestController's class or method. It can also customize those domain names, which can be cross domain and very flexible @CrossOrigin / / by default @ CrossOrigin a ...
Posted by d.shankar on Sat, 25 Apr 2020 16:29:18 +0200
Example of Springboot integrating Redis as a Repository
1 Introduction
Redis is a high-performance NoSQL database and is often used as a cache in major Internet architectures.This article describes how to integrate Spring Data Redis in Springboot and work with Repository.
The code structure is as follows:
2 Integration process
2.1 Install Redis Database
To save time, install it directly from Docker ...
Posted by wildcolour on Wed, 22 Apr 2020 20:40:52 +0200
Spring boot integrates rabbitmq
Before integration, rabbitMqJAR package should be introduced in springboot. The version number can be customized for you. This project follows the version of springboot
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
...
Posted by animedls on Wed, 22 Apr 2020 16:33:46 +0200
Note development learning notes
Preface
Because of playing the play framework before, I don't know much about springboot; I have many doubts: ① How can custom annotations work in springboot ② How does the annotation plug-in like Lombok change the generated code
Lombok plug-in
Today, I found an online post called "Lombok", and I understood my doubts ...
Posted by mjurmann on Sun, 12 Apr 2020 06:03:40 +0200
springboot uses the PropertyResource annotation to read the properties of the specified configuration file (podcast code)
Chapter one: SpringBoot/Spring uses @ Value for attribute binding (podcast code for wisdom spreading)
The ConfigurationProperties annotation will read the properties from the global configuration file by default. When there are many properties, the main configuration file(application.yml, application.properties) will be bloated, so it is ne ...
Posted by Nimbuz on Mon, 06 Apr 2020 19:01:17 +0200
[SpringBoot MQ Series] Introduction to basic usage posture of RabbitListener
[MQ Series] Introduction to basic use posture of RabbitListener
The message sending posture of rabbitmq was introduced before. Since there is sending, there must be consumers. In the spring boot environment, consumption is relatively simple. With @ RabbitListener annotation, you can basically meet more than 90% of your business development n ...
Posted by karnegyhall on Mon, 30 Mar 2020 15:05:00 +0200
spring boot transaction does not work
Configured with springboot
@EnableTransactionManagement
@Transactional
But things don't work at all.
First, the first point: Spring's AOP transaction management is rollback for runtimeException by default, which is unchecked exceptions. unchecked exception exceptions are subclasses of runtimeException. Do not roll back if you encounter check ...
Posted by activeserver on Sun, 29 Mar 2020 17:11:06 +0200