Customize Spring Error Message

后端 未结 1 1296
悲&欢浪女
悲&欢浪女 2020-12-16 17:03

I want to change the default error messages being thrown by Spring.

I basically have this form. Format of the date should follow \"mm/dd/yyyy\"

<         


        
相关标签:
1条回答
  • 2020-12-16 17:45

    You need to define a MessageSource to resolve error code to the message. Error codes are built as described here (so you'll have typeMismatch.<objectName>.dteStartDate).

    0 讨论(0)
提交回复
热议问题