更改 ValidationMessages.properties 个位置

Change ValidationMessages.properties location

是否可以更改 ValidationMessages.properties 文件的名称和位置?默认情况下,它应该位于 war 文件(类路径的根目录)的 目录中。

我正在使用 Hibernate ValidatorRestEasy 作为我的 JavaBean ValidationJAX-RS 供应商。

您可以覆盖配置中定义的 MessageInterpolator 并将其传递给不同的资源包定位器。

我们在参考文档的 this section 中解释了所有内容。