[SpringBoot] SpringBoot+AOP Global Print Log (with source code)
Source code
https://github.com/HelloSummer5/GlobalLogDemo
Traditional Logging Method
Not elegant enough, not beautiful enough, will cause a lot of log code redundancy
@GetMapping("list")
public Result listUser(){
log.info("======Get into Controller=====");
List<User> userList = userSer ...
Added by incubi on Mon, 07 Oct 2019 21:28:39 +0300
SpringBook thread pool configuration and asynchronous task invocation
Way 1: Rewrite spring's default thread pool
1. Configuration of related parameters
#Thread-related configuration
#Number of core threads
task.pool.corePoolSize: 5
#Maximum number of threads in thread pool
task.pool.maxPoolSize: 20
#Maximum idle time of threads
task.pool.keepAliveSeconds: 300
#Maxim ...
Added by g00bster on Sat, 05 Oct 2019 11:16:46 +0300
Retry mechanism: the use of Spring-Retry
In everyday development, there are scenarios where we need to retry a method. For example, when making a network call, because of network fluctuation, it is impossible to access, so it is necessary to retry several times.
I. Introduction
gihub: https://github.com/spring-projects/spring-retry
II. ...
Added by kafmil on Wed, 02 Oct 2019 12:38:35 +0300
redis - cluster Use Tutorial
redis-cluster tutorial
In the case of billiards projects, I want to write some information about users into the redis cache, because redis is stored in key-value mode. Let's save it. Who's afraid of who?
import com.yuyuka.billiards.service.config.DiamondConfigurtion;
import com.yuyuka.billiards.servic ...
Added by markanite on Tue, 01 Oct 2019 02:22:21 +0300
Daily Welfare Draw - JAVA Probability Draw
Because of the need of business, a lottery was held, and the winning prize was quite crooked.
But I still want to tell you secretly that the lottery is an insider ~ (can't be seen by the leaders, will be beaten)
Always see on various app s the ...
Added by bob2588 on Thu, 05 Sep 2019 09:54:52 +0300
Sprinig Boot elegantly implements interface idempotency, which was so simple
1. Concepts
Idempotency, commonly referred to as an interface, makes the same request multiple times and must ensure that the operation can only be performed once
For example:
Order interface, order cannot be created more than once
Payment interface, double payment of the same order can only be deducted once
Alipay callback interface, may hav ...
Added by reivax_dj on Tue, 03 Sep 2019 21:09:11 +0300
Java implements email function - -- Netease mailbox
Catalog
Java implements email function
Preface
development environment
Code
Effect
Concluding remarks
Java implements email function
Preface
The application scenarios of e-mail are very extensive, such as new users joining, sending preferential lists instantly, retrieving ...
Added by elgoog on Mon, 26 Aug 2019 18:42:19 +0300
Spring Cloud Integration RabbitMQ Use
Links to the original text: http://blog.51cto.com/zero01/2173288
Foreword: We now have a system developed with the micro-service architecture model. There is a commodity service and order service in the system, and they are all synchrono ...
Added by SureFire on Fri, 23 Aug 2019 06:37:25 +0300
ServerResponse (Server Unified Response Data Format)
ServerResponse (Server Unified Response Data Format)
Preface:
In fact, strictly speaking, ServerResponse should be categorized in the common package.But I really like it.It's also used so often that I can't help recommending it.
Take this opportunity to make it clear that not all the classes in this series were originally created by me, they we ...
Added by ded on Tue, 20 Aug 2019 05:05:00 +0300
Mybatis Delayed Loading
MyBatis Delayed Loading
I. The Meaning of Delayed Loading
Delayed loading in MyBatis, also known as lazy loading, refers to delaying the select ion query of the associated objects according to the set delay rules when querying the tables. For exa ...
Added by ina on Thu, 15 Aug 2019 17:21:03 +0300