浏览代码

Update architecture.adoc

`RoleHierarchy` doesn't have the `setHierarchy` method, so the snippet doesn't work as is. The method is declared inside `RoleHierarchyImpl`
Nikita Eshkeev 2 年之前
父节点
当前提交
9edbac7233
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/modules/ROOT/pages/servlet/authorization/architecture.adoc

+ 1 - 1
docs/modules/ROOT/pages/servlet/authorization/architecture.adoc

@@ -197,7 +197,7 @@ A typical configuration might look like this:
 ----
 @Bean
 static RoleHierarchy roleHierarchy() {
-    RoleHierarchy hierarchy = new RoleHierarchyImpl();
+    var hierarchy = new RoleHierarchyImpl();
     hierarchy.setHierarchy("ROLE_ADMIN > ROLE_STAFF\n" +
             "ROLE_STAFF > ROLE_USER\n" +
             "ROLE_USER > ROLE_GUEST");