UserInfoService { public UserInfo getUserInfo(UserInfo userInfo) throws Exception { if (StringUtils.isEmpty(userInfo.getLoginName())) return null; return redisDaoTemplate.execute(new RedisCallback<UserInfo>() { public UserInfo doInRedis(Jedis jedis) throws Exception { String key = redisKeyConfiguration.getUserInfoLoginName() + userInfo.getLoginName(); String userInfoJson = jedis.get(key); if (userInfoJson != null) return JSON.parseObject(userInfoJson, UserInfo.class); return null; } }); }  UserInfo getLoginUserInfo(UserInfo userInfo); UserInfo getUserInfo(UserInfo userInfo); @Transactional(readOnly = false) void addUserInfo(UserInfo userInfo); UserInfo getUserInfo(Integer id); List<UserInfo> findAll();  }
@Test public void getUserInfo() throws Exception { }