{"action":"created","issue":{"url":"https://api.github.com/repos/thinkgem/jeesite/issues/360","repository_url":"https://api.github.com/repos/thinkgem/jeesite","labels_url":"https://api.github.com/repos/thinkgem/jeesite/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/thinkgem/jeesite/issues/360/comments","events_url":"https://api.github.com/repos/thinkgem/jeesite/issues/360/events","html_url":"https://github.com/thinkgem/jeesite/issues/360","id":196579272,"number":360,"title":"jeesite采用redis缓存的报错UnsupportedOperationException","user":{"login":"yzdying","id":4035284,"avatar_url":"https://avatars.githubusercontent.com/u/4035284?v=3","gravatar_id":"","url":"https://api.github.com/users/yzdying","html_url":"https://github.com/yzdying","followers_url":"https://api.github.com/users/yzdying/followers","following_url":"https://api.github.com/users/yzdying/following{/other_user}","gists_url":"https://api.github.com/users/yzdying/gists{/gist_id}","starred_url":"https://api.github.com/users/yzdying/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzdying/subscriptions","organizations_url":"https://api.github.com/users/yzdying/orgs","repos_url":"https://api.github.com/users/yzdying/repos","events_url":"https://api.github.com/users/yzdying/events{/privacy}","received_events_url":"https://api.github.com/users/yzdying/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-20T03:41:42Z","updated_at":"2016-12-20T04:03:38Z","closed_at":null,"body":"public Collection<V> values() {\r\n\t\t\tCollection<V> vals = Collections.emptyList();;\r\n\t\t\tJedis jedis = null;\r\n\t\t\ttry {\r\n\t\t\t\tjedis = JedisUtils.getResource();\r\n\t\t\t\tCollection<byte[]> col = jedis.hvals(JedisUtils.getBytesKey(cacheKeyName));\r\n\t\t\t\tfor(byte[] val : col){\r\n\t\t\t\t\tObject obj = JedisUtils.toObject(val);\r\n\t\t\t\t\tif (obj != null){\r\n\t\t\t\t\t\tvals.add((V) obj);\r\n\t\t\t\t\t}\r\n\t        \t}\r\n\t\t\t\tlogger.debug(\"values {} {} \", cacheKeyName, vals);\r\n\t\t\t\treturn vals;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(\"values {}\",  cacheKeyName, e);\r\n\t\t\t} finally {\r\n\t\t\t\tJedisUtils.returnResource(jedis);\r\n\t\t\t}\r\n\t\t\treturn vals;\r\n\t\t}\r\n\r\n\r\n如上代码Collection<V> vals = Collections.emptyList();;      vals.add((V) obj); 这两句的调用，直接导致了UnsupportedOperationException报错发生。强烈建议发布个redis的文档或者详细说明"},"comment":{"url":"https://api.github.com/repos/thinkgem/jeesite/issues/comments/268149144","html_url":"https://github.com/thinkgem/jeesite/issues/360#issuecomment-268149144","issue_url":"https://api.github.com/repos/thinkgem/jeesite/issues/360","id":268149144,"user":{"login":"yzdying","id":4035284,"avatar_url":"https://avatars.githubusercontent.com/u/4035284?v=3","gravatar_id":"","url":"https://api.github.com/users/yzdying","html_url":"https://github.com/yzdying","followers_url":"https://api.github.com/users/yzdying/followers","following_url":"https://api.github.com/users/yzdying/following{/other_user}","gists_url":"https://api.github.com/users/yzdying/gists{/gist_id}","starred_url":"https://api.github.com/users/yzdying/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzdying/subscriptions","organizations_url":"https://api.github.com/users/yzdying/orgs","repos_url":"https://api.github.com/users/yzdying/repos","events_url":"https://api.github.com/users/yzdying/events{/privacy}","received_events_url":"https://api.github.com/users/yzdying/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T04:03:38Z","updated_at":"2016-12-20T04:03:38Z","body":"问题解决：<!-- 自定义Session存储容器 -->\r\n \t<bean id=\"sessionDAO\" class=\"com.loofire.noteswall.common.security.shiro.session.JedisSessionDAO\">\r\n \t\t<property name=\"sessionIdGenerator\" ref=\"idGen\" />\r\n \t\t<property name=\"sessionKeyPrefix\" value=\"${redis.keyPrefix}_session_\" /> \r\n \t</bean> \r\n\r\n是没有把sessionDAO更改为 redis所属bean而导致"}}
{"actor":{"display_login":"yzdying"}}