skip to Main Content

RedisTemplate mock is only working in the test class

Class A{ @Autowired private RedisTemplate<String, Object> redisTemplate; private String readFromCache(String bucket, String key) { Object object = redisTemplate.opsForHash().get(bucketName, key); System.out.println("----" + redisTemplate.opsForHash().get("1", "1")); String returnValue = ""; if (Objects.nonNull(object)) returnValue = object.toString(); return returnValue; } } Class B Class B…

VIEW QUESTION
Back To Top
Search