@Post construct annotation, you should have a good look

In recent work, get a very useful annotation and share it with you. Pain spot The children's shoes that have been paid by WeChat or Alipay may have encountered this problem, that is, fill in the result of the callback. After the payment is successful, the Alipay will give us notice according to the address we give to inform our users whether th ...

Posted on Tue, 07 Apr 2020 11:20:11 -0400 by SheetWise

Specific architecture and implementation of token, timestamp and sign in the design of API interface of Java fresh e-commerce platform (APP / applet, transmission security)

Design and implementation of token, timestamp and sign in Java fresh e-commerce platform API interface design Note: in the actual business, it is inevitable to interact and transfer data with the third-party system, so how to ensure the security of data in the transmission process (anti stealing)? In addition to the https protocol, can we add a ...

Posted on Tue, 07 Apr 2020 04:44:44 -0400 by pasychosheep

Redis series -- implementation of distributed lock based on redis in SpringBoot

Distributed lock application scenario The application of lock often appears in some multithreaded and highly concurrent scenarios, such as seckill, rush to buy, 12306 rush to ticket, and some commodity inventory management. In general monomer applications, we usually use synchronized, ReentrantLock and so on to manage shared variables, so as to ...

Posted on Mon, 06 Apr 2020 07:54:26 -0400 by zytex

Cache design summary

1, Cache update policy Cache update needs to consider data consistency and update cost. I. eliminating old data through memory overflow control strategy The data of LRU can be discarded by setting maxmemory policy to free up memory for new data to be cached. Summary: the data consistency of this met ...

Posted on Sun, 05 Apr 2020 20:09:26 -0400 by daanoz

Spring boot connects Redis to implement HMSET operation

This article records using spring boot starter Redis to access Redis. The Redis related configuration files are placed in the application.yml file in the Resources directory, as shown below: spring: profiles: dev,default,test redis: database: 1 host: 192.168.107.253 #redis test server port: 6379 First, add dependency in pom.xml: ...

Posted on Sat, 04 Apr 2020 16:47:28 -0400 by bigwatercar

How to improve the performance of Asterisk script execution

When we do Asterisk function development, in addition to writing modules directly in C, the more commonly used method is to develop our own business logic in a familiar language. At this time, we need to use AGI functions. Generally, there are many choices: PHP, Perl and JAVA. JAVA is a FASTAGI way, so the effect is better than PHP and Per ...

Posted on Sat, 04 Apr 2020 11:07:24 -0400 by asfaw

KubeSphere troubleshooting practice

Next two: KubeSphere's real battle of troubleshooting KubeSphere troubleshooting Practice II In the later use of kubesphere, some usage problems are also recorded, hoping to be helpful to others, and a container management platform with silky smooth experience. XIV deletion of abnormal containers Before using helm to deploy consumer, delet ...

Posted on Fri, 03 Apr 2020 19:34:48 -0400 by kbc1

Redis introduction and implementation of lock and count

1, About RedisRedis (Remote Dictionary Server), that is, remote dictionary service, is an open-source log and key value database written in ANSI C language, supporting network, memory based and persistent, and provides API s in multiple languages.Redis supports more value types, including string, list, set, Zset and hash. These data types supp ...

Posted on Fri, 03 Apr 2020 11:42:01 -0400 by ThoughtRiot

Strings of Redis data structure

set 127.0.0.1:6379> set mystr showtime OK 127.0.0.1:6379> keys * 1) "mystr" 127.0.0.1:6379> get mystr "showtime" When the same key is set again, the existing value will be overwritten 127.0.0.1:6379> set mystr showtimeagain OK 127.0.0.1:6379> keys * 1) "mystr" 127.0.0.1:6379> get mystr "showtimeagain" setn ...

Posted on Fri, 03 Apr 2020 00:15:40 -0400 by stevehossy

Load Laravel with Nginx

Project environment php7.2, nginx, Laravel, developed by WeChat official account. At present, with the increase of traffic, a single server can not meet the demand, so nginx is used as the load. The following is a feasible scheme, which is currently in use. Problem reference of session sharing Laravel uses Redis to share Session There are two w ...

Posted on Wed, 01 Apr 2020 19:47:45 -0400 by prashanth