Ver código fonte

密码正则验证

gaodm 6 anos atrás
pai
commit
9afbfe1feb

+ 2 - 1
user-service/src/main/java/com/diagbot/web/UserController.java

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
+import javax.validation.Valid;
 import java.util.Map;
 
 /**
@@ -43,7 +44,7 @@ public class UserController {
     @PostMapping("/registry")
     @SysLogger("registry")
     @Transactional
-    public RespDTO<User> createUser(@RequestBody UserSaveVO userSaveVO){
+    public RespDTO<User> createUser(@RequestBody @Valid UserSaveVO userSaveVO){
         User user = userFacade.createUser(userSaveVO);
         return RespDTO.onSuc(user);
     }