Dubbo consumer catches custom exceptions thrown by service provider provider
Define an exception class in a common package that inherits from RuntimeException.
public class BusinessException extends RuntimeException {
/**
* Abnormal code
*/
private String code;
public BusinessException() {
super();
}
public BusinessException(String message) {
super(message);
...
Posted by echo64 on Wed, 25 Sep 2019 00:58:17 -0700
JAVA Concurrent Container - Concurrent SkipListMap, Concurrent SkipListSet
Concurrent SkipListMap is actually a concurrent version of TreeMap. TreeMap uses red and black trees and is sorted in the order of key s (natural order, custom order), but it is non-thread-safe. In concurrent environments, it is recommended to use Concurrent HashMap or ConcurrentSkipListMap.
Concurrent SkipListSet is actually a concurrent vers ...
Posted by radarhill on Tue, 24 Sep 2019 21:50:57 -0700
Vue Koa Builds ACM OJ
It took me more than two months. lazzzis Completed the second version of Putong OJ, because in the middle of the busy spring recruitment and graduation design, the project was officially launched recently.
Project Online Address: http://acm.cjlu.edu.cn/
Project Front End Address: https://github.com/acm3 ...
Posted by mazsolt on Tue, 24 Sep 2019 20:29:17 -0700
Linux Centos 7 - Redis Offline Installation
Install Redis in a disconnected environment.
1. Reference Articles
Ali Cloud Mirror centos7 rpm package download address http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/
Redis download address http://download.redis.io/releases/
https://blog.csdn.net/u010177412/article/details/81780844
https://www.cnblogs.com/yy3b2007com/p/1 ...
Posted by cmancone on Tue, 24 Sep 2019 09:58:43 -0700
Bloom Filter
I. overview
Simply put, a Bloom filter is a way to determine whether an element exists in a list. Usually in JAVA to determine whether there is a Map, Set and other containers. But when the amount of data is very large, using Map and Set will take up too much memory. At this point you'll consider us ...
Posted by hmogan on Mon, 23 Sep 2019 04:17:13 -0700
Spring Boot Cache Actual Redis sets the effective time and automatically refreshes the cache, time support is configured in the configuration file
Problem description
The @Cacheable annotation provided by Spring Cache does not support configuring expiration times and automatic refresh of caches.
We can configure the default expiration time by configuring CacheManneg and configure the expiration time separately for each cache container (value), but it always feels less flexible. Here is an ...
Posted by lcoscare on Sun, 22 Sep 2019 20:36:02 -0700
[Redis5 Source Learning] An Analysis of the expire of redis command
Grape
Command syntax
Command Meaning: Set a lifetime for a given key, and when the key expires (lifetime is 0), it will be automatically deleted.Command format:
EXPIRE key secondsCommand actual combat:
redis> EXPIRE cache_page 30000 # Update expiration time
(integer) 1
Return value:
Setting successfully returns 1.When the key does not ex ...
Posted by PGTibs on Sun, 22 Sep 2019 01:15:34 -0700
Redis serialization methods String RedisSerializer, FastJson RedisSerializer, and KryoRedisSerializer
When our data is stored in Redis, our key s and value s are serialized to the database through the Serializer provided by Spring.RedisTemplate uses JdkSerializationRedisSerializer by default, StringRedisTemplate uses StringRedisSerializer by default.
Spring Data JPA provides us with the following Serializers: GenericToStringSerializer, Jackson2 ...
Posted by JCF22Lyoko on Sun, 22 Sep 2019 00:59:04 -0700
Chapter XVI. Primary Knowledge Database
Catalog
Chapter XVI. Primary Knowledge Database
I. Database
II. Composition of database
Classification of databases
IV. Unloading database
5. Installation of databases
6. Connecting database
7. Viewing User Information
8. Basic operation of database
9. Basic ope ...
Posted by Akinraze on Fri, 20 Sep 2019 05:44:01 -0700
Redis database detailing and parameter tuning
Redis cluster configuration example:1. The difference between relational and non-relational databases:
Redis database is a non-relational database, not the same type as oracle, mysql, sql server and other relational databases. NoSQL is the general name of non-relational databases. The mainstream NOSQL databases include redis, MongBD and so on. ...
Posted by chooseodie on Fri, 20 Sep 2019 04:11:29 -0700