简体   繁体   English

如何在Java EE中进行授权以使其在外部可重新配置(不在war-file中)并可以热重新配置?

[英]How to make authorization in Java EE to be externally recofigurable (out of war-file) and to be hot-recofigurable?

Some Java Web-framework put roles on controllers, look to example: 一些Java Web框架将角色放在控制器上,请看以下示例:

@Controller
@RequestMapping("/company")
@RolesAllowed("ROLE_ADMIN")
public class CompanyController { ... }

This requires recompilation of code in order to remap roles and URLs... 这需要重新编译代码才能重新映射角色和URL。

Is there are any standard framework or library which allow mapping of roles and URLs out of war file and allow hot-reconfiguration (without stopping application)? 是否有任何标准框架或库允许将角色和URL映射到war文件之外并允许热重新配置(不停止应用程序)?

Seems that for the EE stack this requires including a custom interceptor. 似乎对于EE堆栈,这需要包括一个自定义拦截器。

Your given example seams the Spring security example. 您给出的示例接缝了Spring安全示例。 Please look at following tutorial. 请看下面的教程。 It is much helpful. 这很有帮助。

http://krams915.blogspot.com/2010/12/spring-security-3-mvc-using-simple-user.html http://krams915.blogspot.com/2010/12/spring-security-3-mvc-using-simple-user.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM