I'm trying to do some spring validation with the error messages in properties files. But the examples I find all seem to have the values hardcoded, or gotten from a properties file but using a validator class and retrieving it there.
My setup is a bit different. I'm using the @Valid annotation in my requestmapping, and my @Valid class uses @NotNull etc. I've seen some examples where people do @NotNull(message = "blablabla"); But that's also hardcoded, and I'd like to put the messages in a properties file so I can easily edit it on the fly and so I can easily implement i18n in the future.
Any input on how to achieve this would be appreciated.