![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
狐帝
山不在高,有仙则名;窝不怕破,有狐则灵。
展开
-
SpringMVC注记方式验证学习笔记——在注记消息中使用注记参数
例如:public class ProductWithDate implements Serializable{ @Size(min = 1, max = 16) private String name; @Length(min = 5, max = 128) private String description; }对应的消息样式可以是这样的:原创 2016-12-09 22:59:08 · 368 阅读 · 0 评论 -
SpringMVC注记式验证学习笔记——指定验证出错提示信息资源文件及其编码
提示消息资源文件及其编码均位于spring的bean配置文件中,样式如下: 其中basename属性指定消息资源文件的位置,spring会自动为其加上区域代码和properties扩展名。defaultEncoding属性指定该文件的编码。原创 2016-12-07 19:08:29 · 800 阅读 · 0 评论