君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理

2012年3月13日 #

摘要: 简介:JSR 303 – Bean Validation 是一个数据验证的规范,2009 年 11 月确定最终方案。2009 年 12 月 Java EE 6 发布,Bean Validation 作为一个重要特性被包含其中。本文将对 Bean Validation 的主要功能进行介绍,并通过一些示例来演示如何在 Java 开发过程正确的使用 Bean Validation。关于 Bean Validation在任何时候,当你要处理一个应用程序的业务逻辑,数据校验是你必须要考虑和面对的事情。应用程序必须通过某种手段来确保输入进来的数据从语义上来讲是正确的。在通常的情况下,应用程序是分层的,不同 阅读全文
posted @ 2012-03-13 21:02 刺猬的温驯 阅读(763) 评论(0) 推荐(0) 编辑

摘要: kaptcha 是一个非常实用的验证码生成工具。有了它,你可以生成各种样式的验证码,因为它是可配置的。kaptcha工作的原理是调用 com.google.code.kaptcha.servlet.KaptchaServlet,生成一个图片。同时将生成的验证码字符串放到 HttpSession中。使用kaptcha可以方便的配置:验证码的字体验证码字体的大小验证码字体的字体颜色验证码内容的范围(数字,字母,中文汉字!)验证码图片的大小,边框,边框粗细,边框颜色验证码的干扰线(可以自己继承com.google.code.kaptcha.NoiseProducer写一个自定义的干扰线)验证码的样式 阅读全文
posted @ 2012-03-13 01:26 刺猬的温驯 阅读(7427) 评论(0) 推荐(1) 编辑

摘要: 关于Spring Web Services框架Spring web services(以下简称:Spring WS)框架是springframework东家SpringSource公司旗下的一个子项目。目前的版本是1.5M1,最新版本可以从spirngframework网站下载,项目地址是:http://www.springframework.org/node/567由于怀着对spring框架的热爱,于是打算学习下这个框架。Spring Web Services框架的特点Spring框架的支持,你可以重用Spring的所有特性。Spring WS使用Contract First(自顶向下)的设 阅读全文
posted @ 2012-03-13 01:22 刺猬的温驯 阅读(599) 评论(0) 推荐(0) 编辑

摘要: In this tutorial we are create RegistrationForm in Spring 3.0. In this tutorial we are using annotation based Controller and another related files.Spring 3 MVC Registration Form ExampleIn this tutorial we are create RegistrationForm in Spring 3.0. In this tutorial we are using annotation based Contr 阅读全文
posted @ 2012-03-13 00:50 刺猬的温驯 阅读(1125) 评论(0) 推荐(0) 编辑

摘要: i am having trouble with binding my data from a form : I have two class@Entity @Table(name = "ROLES") public class Role implements GenericDomain { private Long id; private String code; private String name; private Set<Privilege> privileges = new HashSet<Privilege>(0); public Ro 阅读全文
posted @ 2012-03-13 00:45 刺猬的温驯 阅读(390) 评论(0) 推荐(0) 编辑

摘要: In this tutorial we are going to create annotation based file upload example using Spring 3.0 MVC module.Spring 3 MVC File UploadCreating file upload example using Spring 3 MVCLearn how to create file upload application using Spring MVC module of the Spring 3 framework.In this tutorial we are going 阅读全文
posted @ 2012-03-13 00:16 刺猬的温驯 阅读(3891) 评论(0) 推荐(0) 编辑