mirror of
https://gitee.com/farsunset/cim.git
synced 2025-06-17 15:45:24 +08:00
升级组件版本
This commit is contained in:
parent
7a9a369960
commit
a0ddbe47c5
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.farsunset</groupId>
|
<groupId>com.farsunset</groupId>
|
||||||
<artifactId>cim-boot-server</artifactId>
|
<artifactId>cim-boot-server</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>4.2.0</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@ -17,10 +17,10 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<netty.version>4.1.70.Final</netty.version>
|
<netty.version>4.1.79.Final</netty.version>
|
||||||
<protobuf.version>3.19.2</protobuf.version>
|
<protobuf.version>3.21.5</protobuf.version>
|
||||||
<mysql.jdbc.version>8.0.22</mysql.jdbc.version>
|
<mysql.jdbc.version>8.0.30</mysql.jdbc.version>
|
||||||
<common.pool.version>2.8.0</common.pool.version>
|
<common.pool.version>2.11.1</common.pool.version>
|
||||||
<swagger.version>3.0.0</swagger.version>
|
<swagger.version>3.0.0</swagger.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.11.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -1 +1 @@
|
|||||||
java -Dcom.sun.akuma.Daemon=daemonized -Dspring.profiles.active=pro -jar ./cim-boot-server-4.0.0.jar
|
java -Dcom.sun.akuma.Daemon=daemonized -Dspring.profiles.active=pro -jar ./cim-boot-server-4.2.0.jar
|
@ -1,3 +1,3 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
java -Dcom.sun.akuma.Daemon=daemonized -Dspring.profiles.active=pro -jar ./cim-boot-server-4.0.0.jar &
|
java -Dcom.sun.akuma.Daemon=daemonized -Dspring.profiles.active=pro -jar ./cim-boot-server-4.2.0.jar &
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
***************************************************************************************
|
||||||
|
* *
|
||||||
|
* Website : http://www.farsunset.com *
|
||||||
|
* *
|
||||||
|
***************************************************************************************
|
||||||
|
*/
|
||||||
|
package com.farsunset.cim.component.event;
|
||||||
|
|
||||||
|
import com.farsunset.cim.model.Message;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
public class MessageEvent extends ApplicationEvent {
|
||||||
|
public MessageEvent(Message message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Message getSource() {
|
||||||
|
return (Message) source;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
***************************************************************************************
|
||||||
|
* *
|
||||||
|
* Website : http://www.farsunset.com *
|
||||||
|
* *
|
||||||
|
***************************************************************************************
|
||||||
|
*/
|
||||||
|
package com.farsunset.cim.component.event;
|
||||||
|
|
||||||
|
import com.farsunset.cim.entity.Session;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
public class SessionEvent extends ApplicationEvent {
|
||||||
|
public SessionEvent(Session session) {
|
||||||
|
super(session);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Session getSource() {
|
||||||
|
return (Session) source;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -23,8 +23,8 @@ package com.farsunset.cim.component.handler;
|
|||||||
|
|
||||||
import com.farsunset.cim.component.handler.annotation.CIMHandler;
|
import com.farsunset.cim.component.handler.annotation.CIMHandler;
|
||||||
import com.farsunset.cim.component.redis.SignalRedisTemplate;
|
import com.farsunset.cim.component.redis.SignalRedisTemplate;
|
||||||
import com.farsunset.cim.entity.Session;
|
|
||||||
import com.farsunset.cim.constant.ChannelAttr;
|
import com.farsunset.cim.constant.ChannelAttr;
|
||||||
|
import com.farsunset.cim.entity.Session;
|
||||||
import com.farsunset.cim.group.SessionGroup;
|
import com.farsunset.cim.group.SessionGroup;
|
||||||
import com.farsunset.cim.handler.CIMRequestHandler;
|
import com.farsunset.cim.handler.CIMRequestHandler;
|
||||||
import com.farsunset.cim.model.ReplyBody;
|
import com.farsunset.cim.model.ReplyBody;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -22,8 +22,8 @@
|
|||||||
package com.farsunset.cim.component.handler;
|
package com.farsunset.cim.component.handler;
|
||||||
|
|
||||||
import com.farsunset.cim.component.handler.annotation.CIMHandler;
|
import com.farsunset.cim.component.handler.annotation.CIMHandler;
|
||||||
import com.farsunset.cim.entity.Session;
|
|
||||||
import com.farsunset.cim.constant.ChannelAttr;
|
import com.farsunset.cim.constant.ChannelAttr;
|
||||||
|
import com.farsunset.cim.entity.Session;
|
||||||
import com.farsunset.cim.group.SessionGroup;
|
import com.farsunset.cim.group.SessionGroup;
|
||||||
import com.farsunset.cim.handler.CIMRequestHandler;
|
import com.farsunset.cim.handler.CIMRequestHandler;
|
||||||
import com.farsunset.cim.model.SentBody;
|
import com.farsunset.cim.model.SentBody;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,11 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
***************************************************************************************
|
||||||
|
* *
|
||||||
|
* Website : http://www.farsunset.com *
|
||||||
|
* *
|
||||||
|
***************************************************************************************
|
||||||
|
*/
|
||||||
package com.farsunset.cim.component.message;
|
package com.farsunset.cim.component.message;
|
||||||
|
|
||||||
import com.farsunset.cim.entity.Session;
|
import com.farsunset.cim.component.event.SessionEvent;
|
||||||
import com.farsunset.cim.constant.ChannelAttr;
|
import com.farsunset.cim.constant.ChannelAttr;
|
||||||
|
import com.farsunset.cim.entity.Session;
|
||||||
import com.farsunset.cim.group.SessionGroup;
|
import com.farsunset.cim.group.SessionGroup;
|
||||||
import com.farsunset.cim.model.Message;
|
import com.farsunset.cim.model.Message;
|
||||||
import com.farsunset.cim.util.JSONUtils;
|
import com.farsunset.cim.util.JSONUtils;
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.data.redis.connection.MessageListener;
|
import org.springframework.data.redis.connection.MessageListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@ -43,10 +66,21 @@ public class BindMessageListener implements MessageListener {
|
|||||||
conflictMap.put(Session.CHANNEL_MAC,new String[]{Session.CHANNEL_WINDOWS,Session.CHANNEL_WEB,Session.CHANNEL_MAC});
|
conflictMap.put(Session.CHANNEL_MAC,new String[]{Session.CHANNEL_WINDOWS,Session.CHANNEL_WEB,Session.CHANNEL_MAC});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventListener
|
||||||
|
public void onMessage(SessionEvent event) {
|
||||||
|
this.handle(event.getSource());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(org.springframework.data.redis.connection.Message redisMessage, byte[] bytes) {
|
public void onMessage(org.springframework.data.redis.connection.Message redisMessage, byte[] bytes) {
|
||||||
|
|
||||||
Session session = JSONUtils.fromJson(redisMessage.getBody(), Session.class);
|
Session session = JSONUtils.fromJson(redisMessage.getBody(), Session.class);
|
||||||
|
|
||||||
|
this.handle(session);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handle(Session session) {
|
||||||
|
|
||||||
String uid = session.getUid();
|
String uid = session.getUid();
|
||||||
String[] conflictChannels = conflictMap.get(session.getChannel());
|
String[] conflictChannels = conflictMap.get(session.getChannel());
|
||||||
|
|
||||||
|
@ -1,8 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
***************************************************************************************
|
||||||
|
* *
|
||||||
|
* Website : http://www.farsunset.com *
|
||||||
|
* *
|
||||||
|
***************************************************************************************
|
||||||
|
*/
|
||||||
package com.farsunset.cim.component.message;
|
package com.farsunset.cim.component.message;
|
||||||
|
|
||||||
|
import com.farsunset.cim.component.event.MessageEvent;
|
||||||
import com.farsunset.cim.group.SessionGroup;
|
import com.farsunset.cim.group.SessionGroup;
|
||||||
import com.farsunset.cim.model.Message;
|
import com.farsunset.cim.model.Message;
|
||||||
import com.farsunset.cim.util.JSONUtils;
|
import com.farsunset.cim.util.JSONUtils;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.data.redis.connection.MessageListener;
|
import org.springframework.data.redis.connection.MessageListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@ -24,9 +47,19 @@ public class PushMessageListener implements MessageListener {
|
|||||||
|
|
||||||
Message message = JSONUtils.fromJson(redisMessage.getBody(), Message.class);
|
Message message = JSONUtils.fromJson(redisMessage.getBody(), Message.class);
|
||||||
|
|
||||||
|
this.onMessage(message);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventListener
|
||||||
|
public void onMessage(MessageEvent event) {
|
||||||
|
this.onMessage(event.getSource());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMessage(Message message) {
|
||||||
|
|
||||||
String uid = message.getReceiver();
|
String uid = message.getReceiver();
|
||||||
|
|
||||||
sessionGroup.write(uid,message);
|
sessionGroup.write(uid,message);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
***************************************************************************************
|
||||||
|
* *
|
||||||
|
* Website : http://www.farsunset.com *
|
||||||
|
* *
|
||||||
|
***************************************************************************************
|
||||||
|
*/
|
||||||
package com.farsunset.cim.component.predicate;
|
package com.farsunset.cim.component.predicate;
|
||||||
|
|
||||||
import com.farsunset.cim.handshake.HandshakeEvent;
|
import com.farsunset.cim.handshake.HandshakeEvent;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -21,17 +21,31 @@
|
|||||||
*/
|
*/
|
||||||
package com.farsunset.cim.component.redis;
|
package com.farsunset.cim.component.redis;
|
||||||
|
|
||||||
|
import com.farsunset.cim.component.event.MessageEvent;
|
||||||
|
import com.farsunset.cim.component.event.SessionEvent;
|
||||||
import com.farsunset.cim.constants.Constants;
|
import com.farsunset.cim.constants.Constants;
|
||||||
import com.farsunset.cim.entity.Session;
|
import com.farsunset.cim.entity.Session;
|
||||||
import com.farsunset.cim.model.Message;
|
import com.farsunset.cim.model.Message;
|
||||||
import com.farsunset.cim.util.JSONUtils;
|
import com.farsunset.cim.util.JSONUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class SignalRedisTemplate extends StringRedisTemplate {
|
public class SignalRedisTemplate extends StringRedisTemplate {
|
||||||
|
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String env;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ApplicationContext applicationContext;
|
||||||
|
|
||||||
|
|
||||||
public SignalRedisTemplate(LettuceConnectionFactory connectionFactory) {
|
public SignalRedisTemplate(LettuceConnectionFactory connectionFactory) {
|
||||||
super(connectionFactory);
|
super(connectionFactory);
|
||||||
connectionFactory.setValidateConnection(true);
|
connectionFactory.setValidateConnection(true);
|
||||||
@ -42,6 +56,10 @@ public class SignalRedisTemplate extends StringRedisTemplate {
|
|||||||
* @param message
|
* @param message
|
||||||
*/
|
*/
|
||||||
public void push(Message message) {
|
public void push(Message message) {
|
||||||
|
if (isDev()){
|
||||||
|
applicationContext.publishEvent(new MessageEvent(message));
|
||||||
|
return;
|
||||||
|
}
|
||||||
super.convertAndSend(Constants.PUSH_MESSAGE_INNER_QUEUE, JSONUtils.toJSONString(message));
|
super.convertAndSend(Constants.PUSH_MESSAGE_INNER_QUEUE, JSONUtils.toJSONString(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,6 +68,19 @@ public class SignalRedisTemplate extends StringRedisTemplate {
|
|||||||
* @param session
|
* @param session
|
||||||
*/
|
*/
|
||||||
public void bind(Session session) {
|
public void bind(Session session) {
|
||||||
|
if (isDev()){
|
||||||
|
applicationContext.publishEvent(new SessionEvent(session));
|
||||||
|
return;
|
||||||
|
}
|
||||||
super.convertAndSend(Constants.BIND_MESSAGE_INNER_QUEUE, JSONUtils.toJSONString(session));
|
super.convertAndSend(Constants.BIND_MESSAGE_INNER_QUEUE, JSONUtils.toJSONString(session));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地调试环境下不走redis,避免lettuce 经常command timeout。
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean isDev(){
|
||||||
|
return Objects.equals(env,"dev");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
***************************************************************************************
|
||||||
|
* *
|
||||||
|
* Website : http://www.farsunset.com *
|
||||||
|
* *
|
||||||
|
***************************************************************************************
|
||||||
|
*/
|
||||||
package com.farsunset.cim.config;
|
package com.farsunset.cim.config;
|
||||||
|
|
||||||
import com.farsunset.cim.acceptor.AppSocketAcceptor;
|
import com.farsunset.cim.acceptor.AppSocketAcceptor;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -23,22 +23,20 @@ package com.farsunset.cim.entity;
|
|||||||
|
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "t_hoxin_session")
|
@Table(name = "t_hoxin_session")
|
||||||
public class Session implements Serializable {
|
public class Session{
|
||||||
|
|
||||||
private static final transient long serialVersionUID = 1L;
|
public static final int STATE_ACTIVE = 0;
|
||||||
public static final transient int STATE_ACTIVE = 0;
|
public static final int STATE_APNS = 1;
|
||||||
public static final transient int STATE_APNS = 1;
|
public static final int STATE_INACTIVE = 2;
|
||||||
public static final transient int STATE_INACTIVE = 2;
|
|
||||||
|
|
||||||
public static final transient String CHANNEL_IOS = "ios";
|
public static final String CHANNEL_IOS = "ios";
|
||||||
public static final transient String CHANNEL_ANDROID = "android";
|
public static final String CHANNEL_ANDROID = "android";
|
||||||
public static final transient String CHANNEL_WINDOWS = "windows";
|
public static final String CHANNEL_WINDOWS = "windows";
|
||||||
public static final transient String CHANNEL_MAC = "mac";
|
public static final String CHANNEL_MAC = "mac";
|
||||||
public static final transient String CHANNEL_WEB = "web";
|
public static final String CHANNEL_WEB = "web";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据库主键ID
|
* 数据库主键ID
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -23,8 +23,6 @@ package com.farsunset.cim.mvc.controller.admin;
|
|||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2013-2019 Xia Jun(3979434@qq.com).
|
* Copyright 2013-2022 Xia Jun(3979434@qq.com).
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
server.port=8080
|
server.port=8080
|
||||||
|
|
||||||
|
#单台服务器可设置为dev,广播消息走本地消息事件(参见SignalRedisTemplate.java)
|
||||||
|
#多台服务器集群环境设置为prd,广播消息走三方消息队列
|
||||||
spring.profiles.active=dev
|
spring.profiles.active=dev
|
||||||
|
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# JDBC Config #
|
# JDBC Config #
|
||||||
##################################################################
|
##################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user