Commit dbd41a7d by Shadow

修复启动报错

parent 9cdf4571
......@@ -17,6 +17,7 @@
<properties>
<spring-boot.version>2.2.5.RELEASE</spring-boot.version>
<rocket.version>4.3.2</rocket.version>
</properties>
<dependencies>
......@@ -150,6 +151,28 @@
</dependency>
<!-- RocketMq start -->
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
<version>1.0.11</version>
</dependency>
<!--mybatis-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- druid 连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
<build>
......
package com.wecloud.im.biz.config;
import org.springframework.stereotype.Component;
import com.wecloud.can.datasource.mybatisplus.OperatorContextService;
import com.wecloud.can.security.jwt.JwtToken;
import com.wecloud.can.security.signature.SignatureAuthToken;
import com.wecloud.can.security.util.JwtUtil;
/**
*
* @Author luozh
* @Date 2022年06月09日 19:22
* @Version 1.0
*/
@Component
public class OperatorContextServiceImpl implements OperatorContextService<String> {
@Override
public String getOperateBy() {
Object principal = org.apache.shiro.SecurityUtils.getSubject().getPrincipal();
if (principal instanceof SignatureAuthToken) {
// 应用端调用
return "-1";
} else if (principal instanceof JwtToken) {
// 客户端调用
return JwtUtil.getCurrentJwtToken().getFkClientId() + "";
}
return "";
}
}
......@@ -64,6 +64,7 @@
<artifactId>dubbo-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
......@@ -71,6 +72,18 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
<properties>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment