现在想接收返回值为Set<String> 的列表,结果发现里面没有看到相关的方法,不知这种要如何处理呢?
尝试了
HashSet<String> roles = sqlSessionTemplate.selectList("ShiroUser.findAllRoleNameByUsername",uname)
HashSet<String> roles = sqlSessionTemplate.select("ShiroUser.findAllRoleNameByUsername",uname);
结果都报错,网上搜索也没能看到相关解决方案。
返回参数写
resultType="String"
即可。例如:
mapping.xml文件
mapper文件
获取数据,比如直接写在Controller中