我嘗試在Vaadin Spring Boot中使用BeanFieldGroup<Entity>
,javax.validator
和Hibernate驗證程序。Vaadin&Spring Boot - 未找到ValidationMessages.properties中的替代翻譯
@NotBlank(message = "{may.not.null}")
@Column(name = "name", unique = true)
private String name;
,我創建了兩個文件:ValidationMessages_en.properties
:
may.not.null=not null
和ValidationMessages_fr.properties
:
may.not.null=non null
但是,即使當我改變了語言爲法語,驗證消息仍是ValidationMessages_en.properties
。
請問您對此有任何想法嗎?