0
@In
Identity identity;
Boolean newValue = identity.hasPermission(target, action);
對上述方法的任何調用也會執行「從角色r中選擇角色」調用,該調用將從底層接縫引擎調用。如何將此調用的查詢緩存設置爲查詢提示(例如org.hibernate.cacheable標誌),以便它不會再次調用。如何在接縫引擎發出的呼叫上設置查詢緩存
注意:角色信息永遠不會改變,因此我認爲這是一個不必要的sql調用。