I have almost hundred properties like this
NotEmpty.order.languageFrom=Field Language can't be empty
NotEmpty.order.languageTo=Field Language can't be empty
NotEmpty.order.description=Description field can't be empty
NotEmpty.order.formType=FormType field can't be empty
NotEmpty.cart.formType=FormType field can't be empty
NotEmpty.cart.formType=FormType field can't be empty
And I’d like to be able getting these properties (both keys/values) without previous knowledge of keys …something like getPropertyPair(regexp .*.order.[a-z]*=)
Does anybody know if spring or JDK offers something for that ? I suppose I’m gonna have to get the ResourceBundle and get all the keys and regexp them…
I don’t think you can do it in Spring, but here’s some code that might help:
It’s a bit hacky but I’m sure you can tidy it up into something more useful.