diff --git a/config/src/main/java/org/springframework/security/config/http/AuthorizationFilterParser.java b/config/src/main/java/org/springframework/security/config/http/AuthorizationFilterParser.java index 48967d47cb2..e9cdb2ea776 100644 --- a/config/src/main/java/org/springframework/security/config/http/AuthorizationFilterParser.java +++ b/config/src/main/java/org/springframework/security/config/http/AuthorizationFilterParser.java @@ -76,12 +76,12 @@ class AuthorizationFilterParser implements BeanDefinitionParser { public BeanDefinition parse(Element element, ParserContext parserContext) { if (!isUseExpressions(element)) { parserContext.getReaderContext() - .error("AuthorizationManager must be used with `use-expressions=\"true\"", element); + .error("AuthorizationManager must be used with `use-expressions=\"true\"; Add `use-authorization-manager=\"false\"` or enable use of expressions in `` block", element); return null; } if (StringUtils.hasText(element.getAttribute(ATT_ACCESS_DECISION_MANAGER_REF))) { parserContext.getReaderContext() - .error("AuthorizationManager cannot be used in conjunction with `access-decision-manager-ref`", + .error("AuthorizationManager cannot be used in conjunction with `access-decision-manager-ref`; either remove the reference to AccessDecisionManager or add `use-authorization-manager=\"false\"` to `` block", element); return null; }