Customize spring boot validation message from database -
i using spring validation validate rest controller input, appreciate if 1 can tell me there possibility of throwing custom message in case of exception , custom message should come database rather properties file.
you can achieve setting custom validation message source on spring's localvalidatorfactorybean
.
your message source needs implement messagesource
interface , read messages database.
reference:
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/messagesource.html
Comments
Post a Comment