File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
spring-context/src/main/java/org/springframework/validation/beanvalidation Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2002-2017 the original author or authors.
2+ * Copyright 2002-2018 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -157,6 +157,11 @@ public void setMessageInterpolator(MessageInterpolator messageInterpolator) {
157157 * not both. If you would like to build a custom MessageInterpolator, consider deriving from
158158 * Hibernate Validator's {@link ResourceBundleMessageInterpolator} and passing in a
159159 * Spring-based {@code ResourceBundleLocator} when constructing your interpolator.
160+ * <p>In order for Hibernate's default validation messages to be resolved still, your
161+ * {@link MessageSource} must be configured for optional resolution (usually the default).
162+ * In particular, the {@code MessageSource} instance specified here should not apply
163+ * {@link org.springframework.context.support.AbstractMessageSource#setUseCodeAsDefaultMessage
164+ * "useCodeAsDefaultMessage"} behavior. Please double-check your setup accordingly.
160165 * @see ResourceBundleMessageInterpolator
161166 */
162167 public void setValidationMessageSource (MessageSource messageSource ) {
You can’t perform that action at this time.
0 commit comments