今天看spring-data-redis 的源码时,有两个方法
1. public BoundHashOperations boundHashOps(K key)
2. public HashOperations opsForHash()
这两个方法的返回值都是interface,但是前面还有一个 这个是啥意思呢?
网上查了半天也没个眉目。。!
class :org.springframework.data.redis.core.RedisTemplate
代码截图
初步理解了下,该方法是要求HK HV 的类型必须在调用的时候就声明好
前面是泛型的参数,后面是作为泛型返回值的泛型参数