From 1d806a95e30b2d1861c14b7db7cf6c83f5a6d41f Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期日, 17 九月 2023 17:54:00 +0800
Subject: [PATCH] 增加派发id
---
springboot-vue3/src/main/java/com/example/springboot/controller/DefaultController.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/DefaultController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/DefaultController.java
index dc194f7..2e2a287 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/DefaultController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/DefaultController.java
@@ -24,14 +24,12 @@
import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
@RestController
+
@Slf4j
@Api(tags = "鐧诲綍鍜屾敞鍐�")
public class DefaultController {
@@ -57,6 +55,7 @@
}
@ApiOperation(value = "鐧诲綍")
+ @CrossOrigin(origins = "http://localhost:8080", allowCredentials = "true")
@PostMapping("/login")
public Result login(@RequestBody UserVo userVO) {
ValidatorUtil.validateEntity(userVO);
@@ -82,7 +81,8 @@
} catch (DisabledAccountException e) {
return Result.fail("甯愬彿宸茶绂佺敤");
} catch (ExpiredCredentialsException e) {
- return Result.fail("甯愬彿宸茶繃鏈�");
+ return Result.fail("璇烽噸鏂扮櫥褰�");
+
} catch (UnknownAccountException e) {
return Result.fail("甯愬彿涓嶅瓨鍦�");
} catch (UnauthorizedException e) {
--
Gitblit v1.8.0