提交 9776fcfa 编写于 作者: G gkdgkdgkdgkd

Rename customed -> custom

上级 15ae85d9
......@@ -7,7 +7,7 @@
- 基本使用(包`base`
- 快速失败(包`failfast`
- 组序列(包`group`
- 自定义注解(包`customed`
- 自定义注解(包`custom`
- AOP(包`aop`
# 环境
......
package com.example.demo.customed.annotation;
package com.example.demo.custom.annotation;
import com.example.demo.custom.validator.MyPhoneValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
......
package com.example.demo.customed.controller;
package com.example.demo.custom.controller;
import com.example.demo.customed.entity.User;
import com.example.demo.custom.entity.User;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -9,8 +9,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
@RestController
public class CustomedController {
@PostMapping("/customed")
public class CustomController {
@PostMapping("/custom")
public String test(@RequestBody @Valid User user, BindingResult result) {
if (!result.hasErrors()) {
return "valid";
......
package com.example.demo.customed.entity;
package com.example.demo.custom.entity;
import com.example.demo.customed.annotation.MyPhone;
import com.example.demo.custom.annotation.MyPhone;
import lombok.Getter;
import lombok.Setter;
......
package com.example.demo.customed.annotation;
package com.example.demo.custom.validator;
import com.example.demo.custom.annotation.MyPhone;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册