亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何解決 Interface not visible from class loader in

如何解決 Interface not visible from class loader in

猛跑小豬 2023-04-19 16:30:56
使用 keycloak 管理客戶端依賴項從 keycloak 獲取組,該依賴項在module.xml. 但是出現錯誤,例如java.lang.IllegalArgumentException:接口 org.keycloak.admin.client.resource.RealmsResource 在類加載器中不可見我正在處理事件監聽器 sysout 項目Keycloak keycloak = Keycloak.getInstance("http://localhost:8080/auth", "nodesjs-example", "admin-cli", token);             List<GroupRepresentation> groupRepresentation2= keycloak.realm("nodejs-example").groups().groups();             System.out.println(groupRepresentation2);
查看完整描述

1 回答

?
月關寶盒

TA貢獻1772條經驗 獲得超5個贊

現在我知道你在做什么了。不需要admin Client,可以從KeycloakSession獲?。?code>EventListenerProviderFactory創建時可用)

@Override
    public EventListenerProvider create(KeycloakSession session) { 
           return new SysoutEventListenerProvider(excludedEvents, excludedAdminOperations,session);
    }

然后在您的 EventListenerProvider 中,您可以獲得組。

RealmModel realm = session.getContext().getRealm();
 List<GroupModel> groups = realm.getGroups();


查看完整回答
反對 回復 2023-04-19
  • 1 回答
  • 0 關注
  • 170 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號