Skip to content

Commit 76ca0ee

Browse files
Merge branch '6.2.x'
Closes gh-15065
2 parents e932387 + 963cdc7 commit 76ca0ee

File tree

1 file changed

+3
-1
lines changed
  • docs/modules/ROOT/pages/reactive/authorization

1 file changed

+3
-1
lines changed

Diff for: docs/modules/ROOT/pages/reactive/authorization/method.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Java::
105105
[source,java,role="primary"]
106106
----
107107
@Bean
108+
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
108109
static GrantedAuthorityDefaults grantedAuthorityDefaults() {
109110
return new GrantedAuthorityDefaults("MYPREFIX_");
110111
}
@@ -113,7 +114,8 @@ static GrantedAuthorityDefaults grantedAuthorityDefaults() {
113114

114115
[TIP]
115116
====
116-
We expose `GrantedAuthorityDefaults` using a `static` method to ensure that Spring publishes it before it initializes Spring Security's method security `@Configuration` classes
117+
We expose `GrantedAuthorityDefaults` using a `static` method to ensure that Spring publishes it before it initializes Spring Security's method security `@Configuration` classes.
118+
Since the `GrantedAuthorityDefaults` bean is part of internal workings of Spring Security, we should also expose it as an infrastructural bean effectively avoiding some warnings related to bean post-processing (see https://github.com/spring-projects/spring-security/issues/14751[gh-14751]).
117119
====
118120

119121
[[jc-reactive-method-security-custom-authorization-manager]]

0 commit comments

Comments
 (0)