You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/servlet/configuration/java.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ public class SecurityWebApplicationInitializer
112
112
}
113
113
----
114
114
115
-
This onlys register the `springSecurityFilterChain` for every URL in your application.
115
+
This only registers the `springSecurityFilterChain` for every URL in your application.
116
116
After that, we need to ensure that `WebSecurityConfig` was loaded in our existing `ApplicationInitializer`.
117
117
For example, if we use Spring MVC it is added in the `getServletConfigClasses()`:
118
118
@@ -131,7 +131,7 @@ public class MvcWebApplicationInitializer extends
131
131
}
132
132
----
133
133
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.
135
135
Placing Spring Security in `getRootConfigClasses` places it into a parent application context that may not be able to find Spring MVC's `HandlerMappingIntrospector`.
136
136
137
137
==== Configuring for Multiple Spring MVC Dispatchers
@@ -203,7 +203,7 @@ Note that this configuration is parallels the XML Namespace configuration:
203
203
204
204
We can configure multiple `HttpSecurity` instances just as we can have multiple `<http>` blocks in XML.
205
205
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/`.
207
207
208
208
[source,java]
209
209
----
@@ -224,7 +224,7 @@ public class MultiHttpSecurityConfig {
224
224
@Order(1) <2>
225
225
public SecurityFilterChain apiFilterChain(HttpSecurity http) throws Exception {
0 commit comments