fix: 去除聊天室的token校验, 自由使用
This commit is contained in:
parent
e1d59d36e3
commit
419f9e20d1
|
@ -24,8 +24,8 @@ public class WebSocketConfig implements WebSocketConfigurer {
|
|||
.addHandler(chatHandler(), "/rax/chatRoom")
|
||||
.addHandler(addMedicineHandler(), "/rax/addMedicine")
|
||||
.addHandler(machineFeedbackHandler(),"/rax/getMedicine")
|
||||
.addInterceptors(new HttpSessionHandshakeInterceptor())
|
||||
.addInterceptors(webSocketInterceptors())
|
||||
// .addInterceptors(new HttpSessionHandshakeInterceptor())
|
||||
// .addInterceptors(webSocketInterceptors())
|
||||
.setAllowedOrigins("*");
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.io.IOException;
|
|||
import java.sql.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
@ -44,6 +45,8 @@ public class ChatServiceImpl implements ChatService {
|
|||
|
||||
private static final Map<String, String> sessionDatabaseMap = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
|
||||
// MongoDB的地址
|
||||
@Value("${vital-sign.mongodb.host}")
|
||||
private String mongoDBHost;
|
||||
|
@ -158,6 +161,8 @@ public class ChatServiceImpl implements ChatService {
|
|||
CustomDataSource dataSource = datasourceMap.get(session.getId());
|
||||
// String databaseName = patientName + idNum;
|
||||
String databaseName = idNum;
|
||||
|
||||
|
||||
ArrayList<Map> history = new ArrayList<>();
|
||||
|
||||
if (dataSource == null) {
|
||||
|
@ -177,6 +182,8 @@ public class ChatServiceImpl implements ChatService {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
String sql = "select content, create_time \"creatTime\", create_user \"createUser\", create_name \"createName\" from t_chat where deleted = 0 and revoked = 0 order by create_time asc ";
|
||||
Connection connection = dataSource.getConnection();
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user