JavaLib | use AOP to help you log
This time, let's go straight to the point.
First step
Using this module, you need to add package dependency:
The second step
You need to tell me your pointcut (inherit LBaseWebLogAspect, implement pointCut() method, and configure your pointcut)
@Aspect
@Component
class WebLogAspect extends LBaseWebLogAspect {
@Pointcut("execution(* com.fe ...
Posted by ryanlwh on Sat, 04 Jan 2020 11:04:36 +0100
Spring Data JPA learning
1, Spring Data JPA
1, introduction
(1) Official website address: https://spring.io/projects/spring-data-jpaReference documents: https://docs.spring.io/spring-data/jpa/docs/2.2.3.RELEASE/reference/html/#preface
(2) Basic introduction:Spring Data JPA is a set of JPA framework based on ORM framework and JPA specification encapsulation of spr ...
Posted by DanAuito on Thu, 02 Jan 2020 03:24:15 +0100
Spring Boot 2: how to customize Servlet Filter
1. Preface
Sometimes we need to declare some custom servlet filters in the Spring Boot Servlet Web application to handle some logic. For example, simple permission system, request header filtering, XSS attack prevention, etc. This article explains how to declare custom servlet filters in Spring Boot applications and define their respective sco ...
Posted by lokie538 on Mon, 30 Dec 2019 10:52:03 +0100
About recursive calling, realizing the style of tree menu
I. demand
The existing requirement is to show all comments of a post.
Two: analysis
Comments on posts are divided into main comments and sub comments. Main comments are direct comments on posts, and sub comments are comments on comments.
Three: train of thought
First, get all the main comments of a post, recursively judge whether there are ...
Posted by jawapro on Sat, 28 Dec 2019 21:02:20 +0100
java Concurrent Programming - 12 atomic classes
background
Multithreading updates the value of variables, which may not get the expected value. Of course, adding the synchronized keyword can solve the problem of thread concurrency.
Another solution is provided here, that is, the atomic operation class under the java.util.concurrent.atomic package, which provides a simple, efficient and thre ...
Posted by gonsman on Sun, 08 Dec 2019 20:08:06 +0100
Origin 003 | Get on the SpringBoot Transaction Ideas Campaign
Special Car Introduction
This is a special bus going to the Spring Boot Transaction Ideas. In the last article, we detailed the principles of Spring Boot Transaction implementation in the Spring Boot Transaction Source Analysis Train [1], which is based on the previous one.
Before the battle, let's review the main points of the last article:
...
Posted by julien on Sat, 07 Dec 2019 12:53:44 +0100
Correct posture of Java method retry
1, introduction
In business development, it is likely to be the case of retrying.
Retry is mainly used when the call fails, especially when dubbo related exception and network related exception occur.
The following is a simple encapsulation of this function, and then gives some relatively more open source code addresses.
...
Posted by lachild on Tue, 03 Dec 2019 10:20:26 +0100
Springboot Series Do you really know Swagger documentation?
Preface
At present, it is quite popular to build a microservice using Springboot in Java. When building a microservice, most of us choose to expose a REST API for invocation.Or the company uses a separate front-end and back-end development model where front-end and back-end work is developed by completely different engineers.Maintaining a compl ...
Posted by tristanlee85 on Tue, 26 Nov 2019 02:42:03 +0100
Traffic statistics of MapReduce
Traffic statistics of MapReduce
means of preparation
Open hadoop
pojo level
mapper level
reducer level
partition layer
job level
Package it into jar package and upload it to the server
summary
Sort by total flow
pojo level
mapper level
reducer level
Zoning layer
job level
means of preparation
A virtual machine with ha ...
Posted by Hellomonkey on Tue, 19 Nov 2019 18:39:37 +0100
Java custom annotation usage
First, explain
1. Definition of notes
The Java file is called Annotation, which is represented by @ interface.
2. yuan annotation
There are some notes on @ interface as needed, including @ Retention, @ Target, @ Document, @ Inherited.
3. Retention policy of notes
@ Retention(RetentionPolicy.SOURCE) / / the annotation only ...
Posted by doug007 on Fri, 08 Nov 2019 16:55:41 +0100