java 如何使用 spring security 进行用户角色管理?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12049319/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to use spring security for user role management?
提问by zlas
I need to design a user role management module for online examine tool application, There are several users in the system (Admin, Moderator, Contributor, Examiner). These users have different privileges for the system. I need to use the Spring framework and spring security for the user access system. How do I use the spring security for this module. Can anyone direct me to a good tutorial and your ideas allways welcome.
我需要为在线考试工具应用设计一个用户角色管理模块,系统中有几个用户(管理员,版主,贡献者,员)。这些用户对系统具有不同的权限。我需要为用户访问系统使用 Spring 框架和 spring security。我如何为此模块使用 spring 安全性。任何人都可以指导我学习一个好的教程,欢迎您的想法。
采纳答案by Less
Based on your description, I think that you might be looking at a custom implementation of UserDetailsService
.
It's worth checking out Stephan Gerth's ZK sample project, that integrates Spring, Hibernate, customized Spring security, ZK Ajax, etc. Hereyou have the announcement post, that has links to source and documentation. I suggest reading the chapter 13.2. Spring-Security(and related), that should help you navigate the source code.
根据您的描述,我认为您可能正在查看UserDetailsService
.
值得一看 Stephan Gerth 的ZK 示例项目,它集成了 Spring、Hibernate、定制的 Spring 安全、ZK Ajax 等。这里有公告帖子,其中包含指向源代码和文档的链接。我建议阅读第13.2章。Spring-Security(和相关的),应该可以帮助你浏览源代码。
回答by user1613360
Try this one Spring Authorization and Authentication.A very simple tutorial for beginners.
试试这个Spring Authorization and Authentication。一个非常简单的初学者教程。