用户登录验证 和 配置文件更新
This commit is contained in:
parent
47677c0416
commit
e85374d104
|
|
@ -24,7 +24,7 @@ import java.util.List;
|
|||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@Profile({"dev","test"})
|
||||
@Profile({"dev","test","prod"})
|
||||
public class Swagger2Config {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -74,8 +74,11 @@ public class UserLoginService {
|
|||
if (Objects.isNull(sysEnterprise) || sysEnterprise.getState().equals(SysEnterpriseState.DISABLE)){
|
||||
throw new CustomException("企业不存在或已经禁用");
|
||||
}
|
||||
String madPasswd = MD5.md5(password);
|
||||
System.out.println("madPasswd --> "+madPasswd);
|
||||
|
||||
//这里可能会不对,因为我们是MD5,这个是spring security 中的 encoder加密
|
||||
if (!passwordEncoder.matches(MD5.md5(password), userDetails.getPassword())) {
|
||||
if (!passwordEncoder.matches(madPasswd, userDetails.getPassword())) {
|
||||
throw new CustomException("密码不正确");
|
||||
}
|
||||
//spring security context insert
|
||||
|
|
|
|||
|
|
@ -3,16 +3,27 @@ server:
|
|||
|
||||
spring:
|
||||
redis:
|
||||
#redis数据库索引(默认为0)
|
||||
database: 0
|
||||
#redis服务器地址
|
||||
host: 42.193.40.239
|
||||
port: 6378
|
||||
#redis端口
|
||||
port: 6937
|
||||
#Redis服务器连接密码(默认为空)
|
||||
password: zysoft2023@com
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池最大连接数(使用负值表示没有限制)
|
||||
max-active: 8
|
||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
max-wait: 100
|
||||
shutdown-timeout: 50000
|
||||
Auth: redis@rzyc123456
|
||||
# 连接超时时间毫秒
|
||||
timeout: 5000
|
||||
|
||||
servlet:
|
||||
multipart:
|
||||
enabled: true
|
||||
|
|
@ -39,9 +50,9 @@ spring:
|
|||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://121.40.106.103:3306/inventory_copy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
url: jdbc:mysql://120.53.125.61:3306/inventory_23?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
username: rzyc
|
||||
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
||||
password: rzyc123456
|
||||
tomcat:
|
||||
max-active: 10
|
||||
min-idle: 10
|
||||
|
|
@ -70,11 +81,11 @@ logging:
|
|||
#文件上传的配置
|
||||
onstants:
|
||||
#上传文件存放地址
|
||||
file_location: /mnt/rzyc/resource/inventory/uploadFile/
|
||||
file_location: /mnt/resource/inventory/uploadFile/
|
||||
#上传文件公共地址
|
||||
file_header: /resource/inventory/uploadFile/
|
||||
#上传文件基础路径
|
||||
service_file_header: http://42.193.40.239/
|
||||
service_file_header: http://120.53.125.61:8881/
|
||||
#父级地区id
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: yun #设定打包配置文件
|
||||
active: prod #设定打包配置文件
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class LoginAspect {
|
|||
|
||||
|
||||
//token验证
|
||||
// verificationToken(userToken);
|
||||
verificationToken(userToken);
|
||||
|
||||
return proceedingJoinPoint.proceed();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
@Profile({"dev","test"})
|
||||
@Profile({"dev","test","prod"})
|
||||
public class Swagger2Config {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ spring:
|
|||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://121.40.106.103:3306/inventory_copy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
url: jdbc:mysql://120.53.125.61:3306/inventory_23?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
username: rzyc
|
||||
password: admin@rzyc2022.com##
|
||||
password: rzyc123456
|
||||
testOnBorrow: true
|
||||
validationQuery: SELECT 1
|
||||
tomcat:
|
||||
|
|
@ -62,21 +62,21 @@ logging:
|
|||
#文件上传的配置
|
||||
onstants:
|
||||
#上传文件存放地址
|
||||
file_location: /mnt/rzyc/resource/inventory/uploadFile/
|
||||
file_location: /mnt/resource/inventory/uploadFile/
|
||||
#上传文件公共地址
|
||||
file_header: /resource/inventory/uploadFile/
|
||||
#上传文件基础路径
|
||||
service_file_header: http://42.193.40.239/
|
||||
service_file_header: http://120.53.125.61:8881/
|
||||
#父级地区id
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://42.193.40.239:7010/
|
||||
html_header: http://120.53.125.61:7010/
|
||||
#logourl
|
||||
logo_url: http://42.193.40.239/resource/inventory/citysafe_logo.png
|
||||
#政府端帮助文档url
|
||||
help_url: http://42.193.40.239:7010/appGovHelp
|
||||
help_url: http://120.53.125.61:7010/appGovHelp
|
||||
#企业端帮助文档url
|
||||
ent_help_url: http://42.193.40.239:7010/appGovHelp
|
||||
ent_help_url: http://120.53.125.61:7010/appGovHelp
|
||||
#行业部门id
|
||||
unit_id: 5bd164aa-dd43-45e3-a5a2-649bb2fd9fb9
|
||||
#镇街功能区
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ spring:
|
|||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://42.193.40.239:33063/inventory_23?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
username: zyjy
|
||||
password: eaNCBySJdHLb23GW
|
||||
url: jdbc:mysql://172.27.181.52:3306/inventory_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&autoReconnect=true
|
||||
username: root
|
||||
password: gzQdz2023
|
||||
tomcat:
|
||||
max-active: 10
|
||||
min-idle: 10
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
package com.common.utils.httpClient;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.common.utils.Constants;
|
||||
import com.common.utils.StringUtils;
|
||||
import org.apache.http.Consts;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
|
|
@ -11,27 +7,17 @@ import org.apache.http.client.methods.CloseableHttpResponse;
|
|||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.entity.ContentType;
|
||||
import org.apache.http.entity.mime.MultipartEntityBuilder;
|
||||
import org.apache.http.entity.mime.content.FileBody;
|
||||
import org.apache.http.entity.mime.content.StringBody;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.params.HttpConnectionParams;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/**
|
||||
* jdk11 网络请求
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user