<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Validation on 极客老墨</title>
    <link>https://blog.hankmo.com/tags/validation/</link>
    <description>Recent content in Validation on 极客老墨</description>
    <generator>Hugo -- 0.138.0</generator>
    <language>zh-cn</language>
    <lastBuildDate>Fri, 12 Oct 2018 16:52:20 +0000</lastBuildDate>
    <atom:link href="https://blog.hankmo.com/tags/validation/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Spring Boot参数验证（下）——Bean Validation在Web中的应用</title>
      <link>https://blog.hankmo.com/posts/tech/spring-boot-validation-2/</link>
      <pubDate>Fri, 12 Oct 2018 16:52:20 +0000</pubDate>
      <guid>https://blog.hankmo.com/posts/tech/spring-boot-validation-2/</guid>
      <description>Spring Boot的Web Starter已经加入了Bean Validation(JSR303)的依赖，可以直接使用。在使用时，只需在需要校验的方法上加上@Valid或者@Validated注解即可，如果需要编码自定义校验结果，则在校验的参数后加上BindingResult参数，注意对应关系；否则，为了模块化需要，也可以屏蔽校验失败业务逻辑，编写全局校验器，校验失败自动返回JSON校验结果即可。</description>
    </item>
    <item>
      <title>Spring Boot参数验证（上）——Bean Validation及其Hibernate实现</title>
      <link>https://blog.hankmo.com/posts/tech/spring-boot-validation-1/</link>
      <pubDate>Wed, 10 Oct 2018 15:15:34 +0000</pubDate>
      <guid>https://blog.hankmo.com/posts/tech/spring-boot-validation-1/</guid>
      <description>Bean Validation，是JCP(Java Community Process)定义的标准化的JavaBean校验API，基于注解，并且具有良好的易用性和扩展性，1.0版本定义为JSR 303，而现在发布了2.0版本，定义为JSR 380。Hibernate Validator是JSR 380的一种标准实现，同时还对其进行了扩展，如增加了部分验证约束。目前，最新的稳定版本为6.0.13.Final。</description>
    </item>
  </channel>
</rss>
