There was Cheng Yaojin's "three board axes" in ancient times, which shocked Sui and Tang Dynasties.

In many scenarios of distributed system, in order to ensure the final consistency of data, we need many technical solutions to support, such as distributed transactions, distributed locks and so on. Sometimes, we need to ensure that a method can only be executed by the same thread at the same time. In the stand-alone environment, Java actually ...

Posted by bogdaniel on Fri, 25 Oct 2019 08:14:53 +0200

Spring Cloud OAuth2 for user authentication and single sign on

The article is long, recommend, recommend forwarding, suggest collecting, suggest paying attention to the public account. There are four authorization modes in OAuth 2, namely authorization code mode, implicit mode, resource owner password credentials and client credentials. For details, please refer to this chapter. (http://www.ruanyifeng.co ...

Posted by TPerez on Wed, 23 Oct 2019 04:39:12 +0200

Spring Security OAuth2 authentication server custom exception handling

The default data format returned by the authentication server is as follows: { "error": "unsupported_grant_type", "error_description": "Unsupported grant type: password1" } The above return result is very unfriendly, and the front-end code is also difficult to determine what the error is, so we ...

Posted by gypmaster on Tue, 22 Oct 2019 21:43:38 +0200

spring boot combined with redis monitoring to realize message timeout processing

**The project has a function to monitor whether a service is online. * * *The service will send "heartbeat" to the back-end every 5 seconds (the heartbeat can be a string, a value, etc.). Once the service fails to send "heartbeat" to the back-end for more than 30 seconds, the back-en ...

Posted by plisken on Tue, 22 Oct 2019 18:32:33 +0200

Establishment of redis cluster + redis replication

Environmental Science Deployment and construction 192.168.255.250 [root@vt-manager 3010]# grep -vE "^#|^$" redis.conf bind 192.168.255.250 ##Be sure to write the local ip and use this ip to set up the cluster. port 3010 daemonize yes #Daemons mode (background start) pidfile /etc/redis-cluster/3010/redis_3010.pid #pid file logfile "/etc/re ...

Posted by NikLP on Tue, 22 Oct 2019 09:31:21 +0200

Queue usage of Yii2 queue

Less bullshit, mainly documentsOfficial documents https://github.com/yiisoft/yi... Use of yii2 queue 1. installation composer require --prefer-dist yiisoft/yii2-queue 2. Configure in common/config/main.php redis as driver return [ 'bootstrap' => [ 'queue', // Register this component to the console ], 'components' => [ ...

Posted by broc7 on Mon, 21 Oct 2019 20:15:19 +0200

HttpTrace of spring boot admin shows input and output participation monitoring Redisson

Spring Boot admin (hereinafter referred to as SBA) integrates with Spring Boot and Spring cloud projects automatically in the way of starter, including Server side and Client side SBA monitoring includes application basic information, logfile (online real-time browsing or download), JVM information (thread information, heap information, non he ...

Posted by NargsBrood on Sun, 20 Oct 2019 11:12:51 +0200

Understanding Java Network IO Model by Example

Network IO Model and Classification Internet IO model is a frequently mentioned problem. Different books or blogs may have different opinions, so there is no need to cut corners, the key is to understand. Socket connection Regardless of the model, the socket connections used are the same.The following is a typical connection on an application ...

Posted by cbcampbell on Tue, 15 Oct 2019 11:21:47 +0200

Using alicloud ACM configuration center in Springboot

When our project is just a simple Springboot project, it is inconvenient to use Aliyun ACM configuration center to load and read remote database or redis configuration information when Springboot starts. Official sdk packages either need Spring Cloud or just come out of nocos as registries; so they can only be self-reliant. Realization principl ...

Posted by murdocsvan on Tue, 15 Oct 2019 03:56:58 +0200

Spring Security OAuth2 Judges Dynamic Permissions Based on Request URI

GitHub address Code cloud address Usually we control permissions by @PreAuthorize("hasRole('ROLE_USER')) annotation, and configuring permission requirements in HttpSecurity. Here, we control access rights based on the requested URI, and we can use annotations to control access rights. Create a new resource project to allocate resources and ...

Posted by bonekrusher on Sat, 12 Oct 2019 21:21:03 +0200