Update ExpressionUrlAuthorizationConfigurer Error Message
Update error message
This commit is contained in:
parent
40208127e8
commit
b6800bdb4d
|
@ -174,7 +174,7 @@ public final class ExpressionUrlAuthorizationConfigurer<H extends HttpSecurityBu
|
|||
.createRequestMap();
|
||||
if (requestMap.isEmpty()) {
|
||||
throw new IllegalStateException(
|
||||
"At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())");
|
||||
"At least one mapping is required (i.e. authorizeRequests().anyRequest().authenticated())");
|
||||
}
|
||||
return new ExpressionBasedFilterInvocationSecurityMetadataSource(requestMap,
|
||||
getExpressionHandler(http));
|
||||
|
@ -393,4 +393,4 @@ public final class ExpressionUrlAuthorizationConfigurer<H extends HttpSecurityBu
|
|||
return ExpressionUrlAuthorizationConfigurer.this.REGISTRY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ public class ExpressionUrlAuthorizationConfigurerTests extends BaseSpringSpec {
|
|||
loadConfig(NoRequestsConfig)
|
||||
then: "A meaningful exception is thrown"
|
||||
BeanCreationException success = thrown()
|
||||
success.message.contains "At least one mapping is required (i.e. authorizeRequests().anyRequest.authenticated())"
|
||||
success.message.contains "At least one mapping is required (i.e. authorizeRequests().anyRequest().authenticated())"
|
||||
}
|
||||
|
||||
@EnableWebSecurity
|
||||
|
|
Loading…
Reference in New Issue