springboot2配置redis,键key上为什么有两个冒号::


user::1

{"id":"1","name":"张三","age":18}

RedisCachel类createCacheKey方法
CacheKeyPrefix接口

	/**
	 * Creates a default {@link CacheKeyPrefix} scheme that prefixes cache keys with {@code cacheName} followed by double
	 * colons. A cache named {@code myCache} will prefix all cache keys with {@code myCache::}.
	 *
	 * @return the default {@link CacheKeyPrefix} scheme.
	 */
	static CacheKeyPrefix simple() {
		return name -> name + "::";
	}

猜你喜欢

转载自blog.csdn.net/haveqing/article/details/86524523