-
Notifications
You must be signed in to change notification settings - Fork 0
Home
JIAN-JUN-MENG edited this page Jul 23, 2024
·
8 revisions
<!-- https://mvnrepository.com/artifact/com.mambaart/validate-param -->
<dependency>
<groupId>com.mambaart</groupId>
<artifactId>validate-param</artifactId>
<version>1.0.0</version>
</dependency>
增加@RemoveSpace注解,移除前后空格
<!-- https://mvnrepository.com/artifact/com.mambaart/validate-param -->
<dependency>
<groupId>com.mambaart</groupId>
<artifactId>validate-param</artifactId>
<version>1.1.1</version>
</dependency>
前言:
没有返回参数验证错误提示的接口不是好接口
没有验证参数的接口不算接口
引入本项目可以实现
-
验证接口参数的合法性(验证字段除对象,必须为String类型)
-
打印接口参数日志,接口返回结果日志
-
接口公共验签
使用注意
-
Spring 扫描 @ComponentScan({"com.github.星号星号","自己项目包的扫描路径.星号星号"})
-
接口加上 @ValidateParameter 注解
-
接口返回值为 ValidateResult;