why the 'RedisOperationsSessionRepository.RedisSession' is a inner class?
why the 'RedisOperationsSessionRepository.RedisSession' is a inner class? as a resut I can not use the result of method:
public Map<String, RedisSession> findByIndexNameAndIndexValue(String indexName,
String indexValue)
RedisSession is an implementation of ExpiringSession that's specific to the RedisOperationsSessionRepository. That shouldn't prevent you from using
the FindByIndexNameSessionRepository.
Here's a usage example from find by username sample app guide:
@Autowired
FindByIndexNameSessionRepository<? extends ExpiringSession> sessions;
@RequestMapping("/")
public String index(Principal principal, Model model) {
Collection<? extends ExpiringSession> usersSessions = this.sessions
.findByIndexNameAndIndexValue(
FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME,
principal.getName())
.values();
model.addAttribute("sessions", usersSessions);
return "index";
}
Closing as answered. If you have additional questions or feel that your original question isn't properly answered, please re-open the issue.
How would you approach this if you want to save/update session ??
See #849 (comment).