- 后端:修改配置文件,指向服务器
- 增加 .gitattributes ,解决 github 识别项目错误问题
This commit is contained in:
@@ -7,24 +7,24 @@ package cn.iocoder.mall.user.sdk.context;
|
||||
*/
|
||||
public class UserSecurityContextHolder {
|
||||
|
||||
private static final ThreadLocal<UserSecurityContext> securityContext = new ThreadLocal<UserSecurityContext>();
|
||||
private static final ThreadLocal<UserSecurityContext> SECURITY_CONTEXT = new ThreadLocal<UserSecurityContext>();
|
||||
|
||||
public static void setContext(UserSecurityContext context) {
|
||||
securityContext.set(context);
|
||||
SECURITY_CONTEXT.set(context);
|
||||
}
|
||||
|
||||
public static UserSecurityContext getContext() {
|
||||
UserSecurityContext ctx = securityContext.get();
|
||||
UserSecurityContext ctx = SECURITY_CONTEXT.get();
|
||||
// 为空时,设置一个空的进去
|
||||
if (ctx == null) {
|
||||
ctx = new UserSecurityContext(null);
|
||||
securityContext.set(ctx);
|
||||
SECURITY_CONTEXT.set(ctx);
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
|
||||
public static void clear() {
|
||||
securityContext.remove();
|
||||
SECURITY_CONTEXT.remove();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.88.14:3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
@@ -24,6 +24,7 @@ dubbo:
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.user.biz.service
|
||||
provider:
|
||||
filter: -exception
|
||||
MobileCodeService:
|
||||
version: 1.0.0
|
||||
OAuth2Service:
|
||||
|
||||
Reference in New Issue
Block a user