10、JSR303校验
首先需要在Bean类体上加上注解@Validated
然后在Bean的一些属性上面家=加上合适的注解,比如:
@Email
@NotNull
…
正则表达式:@Pattern
这个正则表达式是万能的。
springboot的多环境配置:active
推崇使用yml写配置文件。
微信扫一扫
首先需要在Bean类体上加上注解@Validated
然后在Bean的一些属性上面家=加上合适的注解,比如:
@Email
@NotNull
…
正则表达式:@Pattern
这个正则表达式是万能的。
springboot的多环境配置:active
推崇使用yml写配置文件。
相关推荐