Skip to content

Commit 63556b6

Browse files
committed
Polish java.adoc
Issue gh-14384
1 parent e11ed2d commit 63556b6

File tree

1 file changed

+4
-4
lines changed
  • docs/modules/ROOT/pages/servlet/configuration

1 file changed

+4
-4
lines changed

docs/modules/ROOT/pages/servlet/configuration/java.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public class SecurityWebApplicationInitializer
112112
}
113113
----
114114

115-
This onlys register the `springSecurityFilterChain` for every URL in your application.
115+
This only registers the `springSecurityFilterChain` for every URL in your application.
116116
After that, we need to ensure that `WebSecurityConfig` was loaded in our existing `ApplicationInitializer`.
117117
For example, if we use Spring MVC it is added in the `getServletConfigClasses()`:
118118

@@ -131,7 +131,7 @@ public class MvcWebApplicationInitializer extends
131131
}
132132
----
133133

134-
The reason for this is that Spring Security needs to be able to inspect some Spring MVC configuration in order to appropriately configure xref:servlet/authorization/authorize-http-requests.adoc#_request_matchers[underlying request matchers], so they need to be in the same application context.
134+
The reason for this is that Spring Security needs to be able to inspect some Spring MVC configuration in order to appropriately configure xref:servlet/authorization/authorize-http-requests.adoc#authorizing-endpoints[underlying request matchers], so they need to be in the same application context.
135135
Placing Spring Security in `getRootConfigClasses` places it into a parent application context that may not be able to find Spring MVC's `HandlerMappingIntrospector`.
136136

137137
==== Configuring for Multiple Spring MVC Dispatchers
@@ -203,7 +203,7 @@ Note that this configuration is parallels the XML Namespace configuration:
203203

204204
We can configure multiple `HttpSecurity` instances just as we can have multiple `<http>` blocks in XML.
205205
The key is to register multiple `SecurityFilterChain` ``@Bean``s.
206-
The following example has a different configuration for URL's that start with `/api/`.
206+
The following example has a different configuration for URLs that start with `/api/`.
207207

208208
[source,java]
209209
----
@@ -224,7 +224,7 @@ public class MultiHttpSecurityConfig {
224224
@Order(1) <2>
225225
public SecurityFilterChain apiFilterChain(HttpSecurity http) throws Exception {
226226
http
227-
.securityMatcher("/api/**") <3>
227+
.securityMatcher("/api/**") <3>
228228
.authorizeHttpRequests(authorize -> authorize
229229
.anyRequest().hasRole("ADMIN")
230230
)

0 commit comments

Comments
 (0)