From f15ebd74fad4aaeba56836ed8bd577daaa735420 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E9=B9=8F?= <1154799293@qq.com>
Date: Fri, 5 Aug 2022 17:45:16 +0800
Subject: [PATCH] =?UTF-8?q?8.5=E4=BB=8A=E6=97=A5=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 1 -
.../course/config/SpringMvcConfiguration.java | 19 -------------------
.../service/api/impl/UsersServiceImpl.java | 3 +--
3 files changed, 1 insertion(+), 22 deletions(-)
delete mode 100644 src/main/java/com/snhanyue/course/config/SpringMvcConfiguration.java
diff --git a/pom.xml b/pom.xml
index 1afec2c..f58b9ef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -151,7 +151,6 @@
${commons.fileupload.version}
-
org.springframework.boot
diff --git a/src/main/java/com/snhanyue/course/config/SpringMvcConfiguration.java b/src/main/java/com/snhanyue/course/config/SpringMvcConfiguration.java
deleted file mode 100644
index 5716e3e..0000000
--- a/src/main/java/com/snhanyue/course/config/SpringMvcConfiguration.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.snhanyue.course.config;
-
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-public class SpringMvcConfiguration implements WebMvcConfigurer {
-
- @Override
- public void addCorsMappings(CorsRegistry registry) {
- registry.addMapping("/**")
- .allowedOriginPatterns("*")
- .allowedMethods("*")
- .allowedHeaders("*")
- .allowCredentials(true)
- .maxAge(3600);
- }
-
-}
-
diff --git a/src/main/java/com/snhanyue/course/service/api/impl/UsersServiceImpl.java b/src/main/java/com/snhanyue/course/service/api/impl/UsersServiceImpl.java
index 5ce798c..13d825d 100644
--- a/src/main/java/com/snhanyue/course/service/api/impl/UsersServiceImpl.java
+++ b/src/main/java/com/snhanyue/course/service/api/impl/UsersServiceImpl.java
@@ -55,6 +55,7 @@ public class UsersServiceImpl implements IUsersService {
UsersVO usersVO = usersMapper.getByName(name);
//判断获取到的是否为空
if (usersVO == null) {
+ System.out.println(loginDTO);
throw new ServiceException(State.ERR_USER_NAME_DOES_NOT_EXIST, "用户名不存在登陆失败");
}
String password = loginDTO.getPassword();
@@ -66,8 +67,6 @@ public class UsersServiceImpl implements IUsersService {
if (password.equals(sqlPassword)) {
return JsonResult.ok("登录成功");
}
- System.out.println(password + "password");
- System.out.println(sqlPassword + "passwords");
throw new ServiceException(State.ERR_PASSWORD, "密码错误");
--
Gitee