SEC-2407: Better error message for missing securityFilterChainBuilders
This commit is contained in:
parent
e97758dd3a
commit
13c5af5b91
|
@ -280,7 +280,10 @@ public final class WebSecurity extends
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Filter performBuild() throws Exception {
|
protected Filter performBuild() throws Exception {
|
||||||
Assert.state(!securityFilterChainBuilders.isEmpty(), "At least one SecurityFilterBuilder needs to be specified. Invoke FilterChainProxyBuilder.securityFilterChains");
|
Assert.state(!securityFilterChainBuilders.isEmpty(),
|
||||||
|
"At least one SecurityBuilder<? extends SecurityFilterChain> needs to be specified. Typically this done by adding a @Configuration that extends WebSecurityConfigurerAdapter. More advanced users can invoke "
|
||||||
|
+ WebSecurity.class.getSimpleName()
|
||||||
|
+ ".addSecurityFilterChainBuilder directly");
|
||||||
int chainSize = ignoredRequests.size() + securityFilterChainBuilders.size();
|
int chainSize = ignoredRequests.size() + securityFilterChainBuilders.size();
|
||||||
List<SecurityFilterChain> securityFilterChains = new ArrayList<SecurityFilterChain>(chainSize);
|
List<SecurityFilterChain> securityFilterChains = new ArrayList<SecurityFilterChain>(chainSize);
|
||||||
for(RequestMatcher ignoredRequest : ignoredRequests) {
|
for(RequestMatcher ignoredRequest : ignoredRequests) {
|
||||||
|
|
Loading…
Reference in New Issue