|
@@ -7,6 +7,7 @@ import com.sooka.module.web.system.service.CmsUserService;
|
|
|
import com.sooka.mybatis.model.TCmsUser;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
@@ -37,7 +38,7 @@ public class LoginController {
|
|
|
|
|
|
@PostMapping("/register")
|
|
|
@ResponseBody
|
|
|
- public String register(TCmsUser user) {
|
|
|
+ public String register(@Validated TCmsUser user) {
|
|
|
return userService.insert(user);
|
|
|
}
|
|
|
}
|