Daily use: spring boot parameter verification, based on JSR303 specification

When we write Controller or Service, we often write a large number of data verification codes in methods, as follows if(StringUtils.isEmpty(pass)){ return Result.error(ErrorCodeEnum.PASSWORD_EMPTY); }else if(!ValidatorUtil.isMobile(mobile)){ return Result.error(ErrorCodeEnum.MOBILE_PATTERN_WRONG); ...

Added by LiamG on Fri, 15 Nov 2019 08:16:27 +0200

Solve the problem of multi-field joint logic checking [Enjoy Spring MVC]

Every sentence Don't complain about life and think about resigning every day like Sister Xianglin. The point of offence is to say, "degenerate" to work with such a person, is there no reason in oneself? Preface I thought I had said so much about Java/Spring data (binding) checking, which is basically over. But today at noon, a small ...

Added by uatec on Wed, 21 Aug 2019 06:48:00 +0300

GroupSequence Provider and GroupSequence control the order of data validation and solve the problem of multi-field joint logic validation [Enjoy Spring MVC]

Every sentence Don't complain about life and think about resigning every day like Sister Xianglin. The point of offence is to say, "degenerate" to work with such a person, is there no reason in oneself? Preface I thought I had said so ...

Added by Stanley90 on Tue, 20 Aug 2019 16:34:01 +0300

Deep understanding of the role of data validation @Valid (cascade validation)

Every sentence There are two big jokes in the NBA: Kobe Bryant is not talented, and James is not skilled. Relevant Reading [Xiaojia Java] Deep understanding of data validation: Java Bean Validation 2.0 (JSR303, JSR349, JSR380) Hibernate-Validation 6.x use case[Home Spring] Let Controller support data validation of tiling parameters (default Spr ...

Added by Im Jake on Wed, 31 Jul 2019 18:48:02 +0300