Search code examples
internationalizationjax-rsresteasyhibernate-validator

Change ValidationMessages.properties location


Is it possible to change the name and location of the ValidationMessages.properties file? By default, it should be inside the classes directory of the war file (root of the classpath).

I am using Hibernate Validator and RestEasy as my JavaBean Validation and JAX-RS providers.


Solution

  • You can override the MessageInterpolator defined in the configuration and pass it a different resource bundle locator.

    We have everything explained in this section of the reference documentation.