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