java - Java EE Specify Role to a System Method
问题描述
So basically I got Method-A that runs on Systemside (has no user assigned). Method-A uses Method-B that only allows specific Roles: @RolesAllowed({RoleConstants.ADMINISTRATOR,...})
The problem was that Method-A is not allowed to use Method-B.
So I came up with the idea of just declaring a Role (@DeclareRoles) to my Method-A but still it will just not work.
Is there anything I havent thought of?
解决方案
您可以说要Method-A
作为一个允许的角色运行。在官方文档下方:
https://docs.oracle.com/cd/E19316-01/819-3669/bncbh/index.html
推荐阅读
- css - Angular 的实用 css 框架/库 - Angular Material - Flex Layout 项目
- arrays - 如何获取 mongo 中所有嵌套数组的计数?
- flutter - 状态栏的高度总是返回 0
- android - 错误应为 BEGIN_OBJECT,但在第 1 行第 2 列是 BEGIN_ARRAY
- python - 在类中调用方法时遇到问题
- javacc - Javacc 错误报告导致“扩展可以由空字符串匹配”。
- excel - 使用宏/脚本在 Excel 中打开超链接 - 如何绕过打开文件的安全性?
- python - python中的正则表达式拆分字符串
- python - 无法通过 websocket 连接流式传输传入的股票/股票代码数据?
- javascript - 下拉更改后在多个 Highcharts 上调整大小不起作用