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

Let's take a bird's-eye view of the concurrency framework in Java!

Author: Tang Youhua https://dzone.com/articles/a-birds-eye-view-on-java-concurrency-frameworks-1 1. Why to write this article When NoSQL became popular a few years ago, like other teams, our team was keen on exciting new things and planned to replace an application's database. However, when we go deep into details, we think of what a wise man ...

Posted by Tatara on Mon, 27 Apr 2020 09:07:29 +0200

Generics and annotations in Java

1, Use of enumeration classes 1. Description of enumeration class: Understanding of enumeration class: there are only a limited number of objects in the class, which are certain. We call this class an enumeration class Enumeration classes are strongly recommended when you need to define a set of constants Implementation of enumerat ...

Posted by surajkandukuri on Sun, 26 Apr 2020 07:02:31 +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

Integration of ssm based on annotation

ps: it's relatively simple. It's used to lay the foundation for us to use springboot 1: Objectives Integration: springmvc+spring+mybatis+maven Small function: query all user information 2: Integration ideas: pom dependency configuration file Run through a small function 3: Integration steps: (1) New maven project (2) pom dependency ...

Posted by dbradbury on Thu, 23 Apr 2020 12:14:24 +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

How to solve repeated commit in pringboot 2.x (practice of local lock)

Have you ever encountered such a situation: the response of the web page is very slow, you find no response after submitting a form, and then you click the submit button crazily (12306 is often so angry). If you have done anti duplicate submission, it's OK, otherwise it's a disaster of what level... This paper mainly uses custom annotation, sp ...

Posted by abigbluewhale on Wed, 22 Apr 2020 11:22:39 +0200

Detailed design of scheduled tasks

Detailed design of scheduled tasks Timing task is implemented by QuartZ, and QuartZ document reference https://www.w3cschool.cn/quartz_doc/ QuartZ configuration Create a new QuartZ data table in the database. The corresponding SQL table is in the QuartZ.sql file in the current directory Add the quartz.properties file, which provides the relate ...

Posted by Johnm on Tue, 21 Apr 2020 16:40:36 +0200

It's amazing that the implementation of Servlet Filter and Spring MVC Interceptor is so simple

Preface Creation mode: Singleton mode, factory mode, builder mode, prototype mode Structural type: bridge mode, agent mode, decorator mode, adapter mode, facade mode, combination mode, enjoyment mode Behavioral: observer mode, template mode, strategy mode, responsibility chain mode, state mode, iterator mode, visitor mode introduce In our wor ...

Posted by samyl on Mon, 20 Apr 2020 18:58:08 +0200