业务层验证异常ConstraintViolation
我试图在 spring mvc 的表示层上使用验证异常来向用户显示。我想要 ConstraintViolation 信息作为对象。据我了解,MessageSourceAware 不适合我。
我希望将 ConstraintViolation 的 propertyPath 本地化。春天在那里支持我吗?
I'm trying to use a validation-exception on the presentation layer in spring mvc to show to the user. I'd like the ConstraintViolation information as objects. As much as I understand it, the MessageSourceAware is not the right thing for me.
I would like to have the propertyPath of the ConstraintViolation localized. Does spring support me there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论