Closed snicoll closed 6 years ago
For more background on this issue, see #7500 and #7598.
The ParameterMessageInterpolator
is the fallback implementation chosen by our MessageInterpolatorFactory
when no EL implementation is available. The ParameterMessageInterpolator
is logging that statement in its constructor and it's been the case since its inception in 5.2.0 (and even before, when it was named NonElMessageInterpolator
).
It's a bit strange to 1) warn users when it was a conscious choice, and 2) not say anything when validation requiring EL is used, leading to cases like https://github.com/spring-projects/spring-boot/issues/8400#issuecomment-298511491.
This log is part of the interpolator constructor and there's no way to remove it on our side. I've raised HV-1323 to discuss this with the Hibernate team.
This has been fixed in Hibernate Validator 6.0.4.Final, with Spring Boot 2.0.0.M6. Duplicates gh-10788.
When upgrading to the latest hibernate validator we've configured a special
MessageInterpolatorFactory
that would provide a fallbackMessageInterpolator
if the default one can't be created.This works as expected but in case EL is on the classpath, you get those warnings in the logs anyway:
We get the warning twice because we have that trick in the general
ValidationAutoConfiguration
and the special validator we use to bind@ConfigurationProperties
bean.It would be nice if we could find a way to get rid of that warning. Not creating the interpolator at all if EL isn't on the classpath might be an idea.