Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
dbd41a7d
Commit
dbd41a7d
authored
Jun 10, 2022
by
Shadow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复启动报错
parent
9cdf4571
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
0 deletions
+66
-0
im-biz/pom.xml
+23
-0
im-biz/src/main/java/com/wecloud/im/biz/config/OperatorContextServiceImpl.java
+30
-0
im-server/pom.xml
+13
-0
No files found.
im-biz/pom.xml
View file @
dbd41a7d
...
...
@@ -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>
...
...
im-biz/src/main/java/com/wecloud/im/biz/config/OperatorContextServiceImpl.java
0 → 100644
View file @
dbd41a7d
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
""
;
}
}
im-server/pom.xml
View file @
dbd41a7d
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment