From c9cddf55d59308515edadb43346e71da769c17e2 Mon Sep 17 00:00:00 2001
From: youqb <1518925432@qq.com>
Date: Sun, 20 Sep 2020 17:09:18 +0800
Subject: [PATCH 1/6] update pom.xml.
---
pom.xml | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 60 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 729cd20f..e83c8c23 100755
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,66 @@
+
+ v1-dev
+
+ true
+
+
+ v1_dev
+
+
+
+ v1-test
+
+ v1_test
+
+
+
+ v1-pre
+
+ v1_pre
+
+
+
+ v1-stress
+
+ v1_stress
+
+
+
+ v1-prod
+
+ v1_prod
+
+
+
+ v2-dev
+
+ v2_dev
+
+
+
+ v2-test
+
+ v2_test
+
+
+
+ v2-pre
+
+ v2_uat
+
+
+
+ v2-prod
+
+ v2_prod
+
+
+
+
--
Gitee
From ceb491ca1edd3d8fc4cacfea8ed4b01394ae2cad Mon Sep 17 00:00:00 2001
From: youqb <1518925432@qq.com>
Date: Sun, 20 Sep 2020 17:10:20 +0800
Subject: [PATCH 2/6] add distribution/src/main/resources/v1_dev.
---
distribution/src/main/resources/v1_dev | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 distribution/src/main/resources/v1_dev
diff --git a/distribution/src/main/resources/v1_dev b/distribution/src/main/resources/v1_dev
new file mode 100644
index 00000000..e69de29b
--
Gitee
From 089b348b30c9b7e39f9b77687e29e61ab8f55567 Mon Sep 17 00:00:00 2001
From: youqibin
Date: Sun, 20 Sep 2020 17:19:14 +0800
Subject: [PATCH 3/6] test
---
distribution/src/main/assembly/assembly.xml | 8 +-
distribution/src/main/resources/v1_dev | 0
.../src/main/resources/v1_dev/c3p0-config.xml | 66 ++++++
.../src/main/resources/v1_dev/hazelcast.xml | 149 +++++++++++++
.../main/resources/v1_dev/log4j.properties | 73 ++++++
.../main/resources/v1_dev/wildfirechat.conf | 209 ++++++++++++++++++
.../src/main/resources/v2_dev/c3p0-config.xml | 66 ++++++
.../src/main/resources/v2_dev/hazelcast.xml | 149 +++++++++++++
.../main/resources/v2_dev/log4j.properties | 73 ++++++
.../main/resources/v2_dev/wildfirechat.conf | 209 ++++++++++++++++++
10 files changed, 998 insertions(+), 4 deletions(-)
delete mode 100644 distribution/src/main/resources/v1_dev
create mode 100644 distribution/src/main/resources/v1_dev/c3p0-config.xml
create mode 100644 distribution/src/main/resources/v1_dev/hazelcast.xml
create mode 100644 distribution/src/main/resources/v1_dev/log4j.properties
create mode 100644 distribution/src/main/resources/v1_dev/wildfirechat.conf
create mode 100644 distribution/src/main/resources/v2_dev/c3p0-config.xml
create mode 100644 distribution/src/main/resources/v2_dev/hazelcast.xml
create mode 100644 distribution/src/main/resources/v2_dev/log4j.properties
create mode 100644 distribution/src/main/resources/v2_dev/wildfirechat.conf
diff --git a/distribution/src/main/assembly/assembly.xml b/distribution/src/main/assembly/assembly.xml
index d1ed9f87..f07a9c5b 100755
--- a/distribution/src/main/assembly/assembly.xml
+++ b/distribution/src/main/assembly/assembly.xml
@@ -40,22 +40,22 @@
- src/main/resources/log4j.properties
+ src/main/resources/${profile.active}/log4j.properties
config/
log4j.properties
- src/main/resources/wildfirechat.conf
+ src/main/resources/${profile.active}/wildfirechat.conf
config/
- src/main/resources/hazelcast.xml
+ src/main/resources/${profile.active}/hazelcast.xml
config/
- src/main/resources/c3p0-config.xml
+ src/main/resources/${profile.active}/c3p0-config.xml
config/
diff --git a/distribution/src/main/resources/v1_dev b/distribution/src/main/resources/v1_dev
deleted file mode 100644
index e69de29b..00000000
diff --git a/distribution/src/main/resources/v1_dev/c3p0-config.xml b/distribution/src/main/resources/v1_dev/c3p0-config.xml
new file mode 100644
index 00000000..7bcc172d
--- /dev/null
+++ b/distribution/src/main/resources/v1_dev/c3p0-config.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ 10
+ 30
+ 100
+ 10
+ 200
+
+
+
+
+
+
+ com.mysql.cj.jdbc.Driver
+
+ jdbc:mysql://localhost:3356/wfchat?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8
+
+ root
+
+ 123456
+
+ 10
+
+ 30
+
+ 100
+
+ 10
+
+ 200
+
+ 3000
+
+ 2
+
+ 0
+
+ 1000
+
+ false
+
+
+
+ false
+
+ 60
+
+
+
+
+
+
+
+ oracle.jdbc.driver.OracleDriver
+ jdbc:oracle:thin:@localhost:1521:orcl
+ scott
+ liang
+ 10
+ 30
+ 100
+ 10
+ 200
+
+
diff --git a/distribution/src/main/resources/v1_dev/hazelcast.xml b/distribution/src/main/resources/v1_dev/hazelcast.xml
new file mode 100644
index 00000000..65295e75
--- /dev/null
+++ b/distribution/src/main/resources/v1_dev/hazelcast.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/src/main/resources/v1_dev/log4j.properties b/distribution/src/main/resources/v1_dev/log4j.properties
new file mode 100644
index 00000000..ab749f92
--- /dev/null
+++ b/distribution/src/main/resources/v1_dev/log4j.properties
@@ -0,0 +1,73 @@
+# Set root logger level to DEBUG and its only appender to A1.
+#log4j.rootLogger=ERROR, A1
+#log4j.rootLogger=INFO, stdout, file
+log4j.rootLogger=INFO, file, messagelog
+
+log4j.logger.io.moquette=INFO
+log4j.logger.io.moquette.spi.impl.ProtocolProcessor=INFO
+log4j.logger.io.moquette.spi.impl.ProtocolProcessorBootstrapper=WARN
+
+#Protocol parsing
+log4j.logger.io.moquette.server.netty.NettyMQTTHandler=WARN
+#log4j.logger.io.moquette.server.netty.NettyMQTTHandler=DEBUG
+log4j.logger.io.moquette.parser.netty=WARN
+#Storage server
+#log4j.logger.io.moquette.spi.impl.subscriptions.SubscriptionsDirectorytory=DEBUG
+#log4j.logger.io.moquette.spi.impl.HawtDBStorageService=DEBUG
+
+# stdout appender is set to be a ConsoleAppender.
+#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+#log4j.appender.stdout.Threshold=WARN
+#log4j.appender.stdout.Threshold=INFO
+#log4j.appender.stdout.Threshold=DEBUG
+#log4j.appender.stdout.Threshold=TRACE
+#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n
+
+#file appender
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.Threshold=INFO
+log4j.appender.file.File=logs/wildfirechat.log
+log4j.appender.file.MaxFileSize=20MB
+log4j.appender.file.MaxBackupIndex=100
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n
+log4j.appender.file.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %L %x - %m%n
+
+####################################
+# Message Logger Configuration #
+#####################################
+log4j.appender.messagelog=org.apache.log4j.RollingFileAppender
+log4j.appender.messagelog.Threshold=WARN
+log4j.appender.messagelog.File=logs/wildfirechat_messages.log
+log4j.appender.messagelog.MaxFileSize=100MB
+log4j.appender.messagelog.MaxBackupIndex=3
+log4j.appender.messagelog.layout=org.apache.log4j.PatternLayout
+log4j.appender.messagelog.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %L %x - %m%n
+
+log4j.category.messageLogger=WARN, messagelog
+
+
+log4j.logger.cn.wildfirechat.push=INFO, push_log
+log4j.additivity.cn.wildfirechat.push=false
+log4j.appender.push_log=org.apache.log4j.RollingFileAppender
+log4j.appender.push_log.File=logs/push.log
+log4j.appender.push_log.Append=true
+log4j.appender.push_log.MaxFileSize=10MB
+log4j.appender.push_log.MaxBackupIndex=5
+log4j.appender.push_log.layout=org.apache.log4j.PatternLayout
+log4j.appender.push_log.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] [%t] - %m%n
+log4j.appender.push_log.encoding=UTF-8
+
+
+log4j.logger.com.xiaoleilu.loServer=INFO, http_log
+log4j.additivity.com.xiaoleilu.loServer=false
+log4j.appender.http_log=org.apache.log4j.RollingFileAppender
+log4j.appender.http_log.File=logs/http.log
+log4j.appender.http_log.Append=true
+log4j.appender.http_log.MaxFileSize=10MB
+log4j.appender.http_log.MaxBackupIndex=5
+log4j.appender.http_log.layout=org.apache.log4j.PatternLayout
+log4j.appender.http_log.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] [%t] - %m%n
+log4j.appender.http_log.encoding=UTF-8
+
diff --git a/distribution/src/main/resources/v1_dev/wildfirechat.conf b/distribution/src/main/resources/v1_dev/wildfirechat.conf
new file mode 100644
index 00000000..977f6e96
--- /dev/null
+++ b/distribution/src/main/resources/v1_dev/wildfirechat.conf
@@ -0,0 +1,209 @@
+#*********************************************************************
+# Server configuration v1_dev
+#*********************************************************************
+#服务器的接入IP。给客户端提供是${server.ip}和${http_port}。
+#客户端会从${http_port}端口获取到长链接端口。这个地址一定要改成客户端可以访问到的IP地址
+# (如果您部署云服务器上或者具有独立公网出口的服务器上,请改为对应的公网IP;如果您部署在在内网环境下,在内网使用,这个地方改成内网地址)
+server.ip 192.168.237.100
+
+##原生客户端长链接端口
+port 1883
+
+##客户端短链接端口
+http_port 80
+
+##WEB客户端长链接端口
+websocket_port 8083
+
+#管理端口
+http.admin.port 18080
+
+##节点ID,当集群部署时,一定不能有重复。
+node_id 1
+
+##绑定IP,保持不变即可
+host 0.0.0.0
+
+##本地绑定端口
+local_port 80
+
+##是否使用内置DB。0使用mysql;1使用h2db;2使用mysql+mongodb。社区版只支持0和1,专业版支持2
+embed.db 1
+
+##服务器管理接口密钥
+http.admin.secret_key 123456
+
+##服务器API接口参数是否检查时间。当设置为false时,所有的请求会检查时间的有效性;当设置为true时,可以在http.admin.secret_key保持不变的情况下,使用固定的服务API签名
+##nonce = "76616", timestamp = "1558350862502", sign = "b98f9b0717f59febccf1440067a7f50d9b31bdde"
+http.admin.no_check_time false
+
+##客户端协议栈密钥,需要与客户端协议栈文件libemqq.cc文件中的aes_key值保持一致,16进制byte用逗号分割。这个密钥不能修改!!!
+client.proto.secret_key 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F
+
+##用来生产im token的私钥,只在服务器使用,客户端不用。正式使用时为了安全一定要修改这个值,切记切记
+token.key testim
+
+##token的过期时间,单位为毫秒,默认为无限期。如果需要设置无限期,客户端上一定需要加上token过期的处理。token过期的处理请参考文档的常见问题
+##token.expire_time 2592000000
+
+##首次登录,是否接收之前的历史消息。
+##0 不接收历史消息,只接收5分钟以内的消息,由于服务器没有保存已经收取记录,所以如果有超过5分钟之前未收取的消息也不会收取下拉;
+##1接收,会接收 message.max_queue 配置的条数的历史消息
+message.roaming 0
+
+##是否开启拉取远程历史消息。如果为1,客户端在会话内如果本地消息读取完了,可以下拉继续加载在服务器上的该会话的消息;如果为0则不能。
+message.remote_history_message 0
+
+##服务器为每个用户缓存的消息数量。这个值改得太大,拉取消息时间变长,另外会占用大量内存。
+message.max_queue 1024
+
+##是否禁止陌生人聊天
+message.disable_stranger_chat false
+
+##黑名单策略,0 发送失败,返回被拉黑的错误码;1 发送成功但消息被服务器直接丢弃
+message.blacklist.strategy 0
+
+##是否禁止服务器端消息搜索,该功能暂未实现。目前的影响是如果打开,则存储消息时不单独保存_searchable_content字段
+message.disable_remote_search false
+
+##允许客户端撤回消息时限,单位是秒。群组管理员或群主撤回群成员消息、server api不受此限制,可以撤回任意时限内的消息
+message.recall_time_limit 120
+
+##禁止搜索用户
+friend.disable_search false
+
+##禁止按照昵称搜索用户。
+friend.disable_nick_name_search false
+
+##禁止发送好友邀请,通过server api添加好友不受此限制
+friend.disable_friend_request false
+
+##好友请求重复发送的间隔,单位是毫秒,默认是7天,0为不限制
+friend.repeat_request_duration 604800000
+
+##好友请求被拒绝后再次发送的间隔,单位是毫秒,默认是30天,0为不限制
+friend.reject_request_duration 2592000000
+
+##好友请求过期时间,单位是毫秒,默认是7天,0为不限制
+friend.request_expiration_duration 604800000
+
+##添加好友后会发送欢迎消息,比如"你们已经是好友了,可以聊天了"。这个开关控制是用旧的方式还是用新的方式。
+##旧的方式会发送notification消息(contenttype是80),内容会根据好友接收者的语言选择对应的语言,如果双方语言不一致会导致另外一方看到的不是本地语言。
+##新的方式会发送添加好友消息(contenttype是93)和欢迎消息(contenttype是92),需要客户端实现这两种消息。
+##如果客户端已经实现这两种消息可以打开这个开关
+friend.new_welcome_message false
+
+## 聊天室观众空闲退出时间,单位为毫秒,默认为15分钟,0为永远不退出
+chatroom.participant_idle_time 900000
+
+## 用户向聊天室发送消息,自动加入聊天室
+chatroom.rejoin_when_active true
+
+#*********************************************************************
+# hazelcase configuration
+#*********************************************************************
+hazelcast.configuration config/hazelcast.xml
+
+#*********************************************************************
+# Media server configuration
+#*********************************************************************
+##是否使用七牛云存储。1使用七牛;0使用内存文件服务器。默认的七牛账户信息不可用,请在七牛官网申请账户并配置
+## https://docs.wildfirechat.cn/server/media_server.html
+media.server.use_qiniu 0
+
+##媒体类型分类
+#Media_Type_GENERAL = 0,
+#Media_Type_IMAGE = 1,
+#Media_Type_VOICE = 2,
+#Media_Type_VIDEO = 3,
+#Media_Type_FILE = 4,
+#Media_Type_PORTRAIT = 5,
+#Media_Type_FAVORITE = 6
+
+# qiniu media server configuration
+## 上传地址,不同的区域,上传地址也不同,请注意现在正确的地址
+qiniu.server_url http://up.qbox.me
+qiniu.access_key tU3vdBK5BL5j4N7jI5N5uZgq_HQDo170w5C9Amnn
+qiniu.secret_key YfQIJdgp5YGhwEw14vGpaD2HJZsuJldWtqens7i5
+## bucket名字及Domain
+qiniu.bucket_general_name media
+qiniu.bucket_general_domain http://cdn.wildfirechat.cn
+qiniu.bucket_image_name media
+qiniu.bucket_image_domain http://cdn.wildfirechat.cn
+qiniu.bucket_voice_name media
+qiniu.bucket_voice_domain http://cdn.wildfirechat.cn
+qiniu.bucket_video_name media
+qiniu.bucket_video_domain http://cdn.wildfirechat.cn
+qiniu.bucket_file_name media
+qiniu.bucket_file_domain http://cdn.wildfirechat.cn
+qiniu.bucket_sticker_name media
+qiniu.bucket_sticker_domain http://cdn.wildfirechat.cn
+qiniu.bucket_moments_name media
+qiniu.bucket_moments_domain http://cdn.wildfirechat.cn
+qiniu.bucket_portrait_name storage
+qiniu.bucket_portrait_domain http://cdn2.wildfirechat.cn
+qiniu.bucket_favorite_name storage
+qiniu.bucket_favorite_domain http://cdn2.wildfirechat.cn
+
+
+# local media server configuration
+# 本地媒体服务器配置。
+local.media.storage.root ./media
+
+
+# 是否支持多端登陆,为true时支持任意平台任意多个客户端同时登录;为false时每个平台只支持一个端登录,但不同平台可以同时登录。
+server.multi_endpoint false
+
+# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
+server.multi_platform_notification false
+
+#*********************************************************************
+# Push server configuration
+#*********************************************************************
+##安卓推送服务器地址
+push.android.server.address http://localhost:8085/android/push
+##苹果推送服务器地址
+push.ios.server.address http://localhost:8085/ios/push
+
+
+#*********************************************************************
+# User online status event callback
+#*********************************************************************
+##用户在线状态事件回调地址
+#user.online_status_callback http://localhost:8888/user/online_event
+
+
+#*********************************************************************
+# MongoDB configuration
+#*********************************************************************
+#专业版支持,社区版请忽略
+#mongodb.client_uri mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
+#mongodb.client_uri mongodb://host1:27017,host2:27017,host3:27017/wfchat?replicaSet=myReplicaSet
+mongodb.client_uri mongodb://wfc:123456@localhost:27017/wfchat
+mongodb.database wfchat
+mongodb.data_expire_days 1096
+
+#*********************************************************************
+# Netty Configuration
+#
+# Linux systems can use epoll instead of nio. To get a performance
+# gain and reduced GC.
+# http://netty.io/wiki/native-transports.html for more information
+#*********************************************************************
+# 如果是linux系统,一定要打开下面这个参数,能大幅度提高性能
+netty.epoll true
+
+#*********************************************************************
+# Sensitive configuration
+#*********************************************************************
+##文本敏感词过滤处理方法,0 发送失败;1 发送成功但消息被服务器直接丢弃;2 命中的敏感词被替换成***
+sensitive.filter.type 0
+
+#*********************************************************************
+# Message forward configuration
+#*********************************************************************
+##消息转发地址
+#message.forward.url http://localhost:8087/message/forward
+
+##设备信息转发地址
+#device.forward.url http://localhost:8087/device/forward
diff --git a/distribution/src/main/resources/v2_dev/c3p0-config.xml b/distribution/src/main/resources/v2_dev/c3p0-config.xml
new file mode 100644
index 00000000..7bcc172d
--- /dev/null
+++ b/distribution/src/main/resources/v2_dev/c3p0-config.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ 10
+ 30
+ 100
+ 10
+ 200
+
+
+
+
+
+
+ com.mysql.cj.jdbc.Driver
+
+ jdbc:mysql://localhost:3356/wfchat?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8
+
+ root
+
+ 123456
+
+ 10
+
+ 30
+
+ 100
+
+ 10
+
+ 200
+
+ 3000
+
+ 2
+
+ 0
+
+ 1000
+
+ false
+
+
+
+ false
+
+ 60
+
+
+
+
+
+
+
+ oracle.jdbc.driver.OracleDriver
+ jdbc:oracle:thin:@localhost:1521:orcl
+ scott
+ liang
+ 10
+ 30
+ 100
+ 10
+ 200
+
+
diff --git a/distribution/src/main/resources/v2_dev/hazelcast.xml b/distribution/src/main/resources/v2_dev/hazelcast.xml
new file mode 100644
index 00000000..65295e75
--- /dev/null
+++ b/distribution/src/main/resources/v2_dev/hazelcast.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/src/main/resources/v2_dev/log4j.properties b/distribution/src/main/resources/v2_dev/log4j.properties
new file mode 100644
index 00000000..ab749f92
--- /dev/null
+++ b/distribution/src/main/resources/v2_dev/log4j.properties
@@ -0,0 +1,73 @@
+# Set root logger level to DEBUG and its only appender to A1.
+#log4j.rootLogger=ERROR, A1
+#log4j.rootLogger=INFO, stdout, file
+log4j.rootLogger=INFO, file, messagelog
+
+log4j.logger.io.moquette=INFO
+log4j.logger.io.moquette.spi.impl.ProtocolProcessor=INFO
+log4j.logger.io.moquette.spi.impl.ProtocolProcessorBootstrapper=WARN
+
+#Protocol parsing
+log4j.logger.io.moquette.server.netty.NettyMQTTHandler=WARN
+#log4j.logger.io.moquette.server.netty.NettyMQTTHandler=DEBUG
+log4j.logger.io.moquette.parser.netty=WARN
+#Storage server
+#log4j.logger.io.moquette.spi.impl.subscriptions.SubscriptionsDirectorytory=DEBUG
+#log4j.logger.io.moquette.spi.impl.HawtDBStorageService=DEBUG
+
+# stdout appender is set to be a ConsoleAppender.
+#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+#log4j.appender.stdout.Threshold=WARN
+#log4j.appender.stdout.Threshold=INFO
+#log4j.appender.stdout.Threshold=DEBUG
+#log4j.appender.stdout.Threshold=TRACE
+#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n
+
+#file appender
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.Threshold=INFO
+log4j.appender.file.File=logs/wildfirechat.log
+log4j.appender.file.MaxFileSize=20MB
+log4j.appender.file.MaxBackupIndex=100
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n
+log4j.appender.file.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %L %x - %m%n
+
+####################################
+# Message Logger Configuration #
+#####################################
+log4j.appender.messagelog=org.apache.log4j.RollingFileAppender
+log4j.appender.messagelog.Threshold=WARN
+log4j.appender.messagelog.File=logs/wildfirechat_messages.log
+log4j.appender.messagelog.MaxFileSize=100MB
+log4j.appender.messagelog.MaxBackupIndex=3
+log4j.appender.messagelog.layout=org.apache.log4j.PatternLayout
+log4j.appender.messagelog.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %L %x - %m%n
+
+log4j.category.messageLogger=WARN, messagelog
+
+
+log4j.logger.cn.wildfirechat.push=INFO, push_log
+log4j.additivity.cn.wildfirechat.push=false
+log4j.appender.push_log=org.apache.log4j.RollingFileAppender
+log4j.appender.push_log.File=logs/push.log
+log4j.appender.push_log.Append=true
+log4j.appender.push_log.MaxFileSize=10MB
+log4j.appender.push_log.MaxBackupIndex=5
+log4j.appender.push_log.layout=org.apache.log4j.PatternLayout
+log4j.appender.push_log.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] [%t] - %m%n
+log4j.appender.push_log.encoding=UTF-8
+
+
+log4j.logger.com.xiaoleilu.loServer=INFO, http_log
+log4j.additivity.com.xiaoleilu.loServer=false
+log4j.appender.http_log=org.apache.log4j.RollingFileAppender
+log4j.appender.http_log.File=logs/http.log
+log4j.appender.http_log.Append=true
+log4j.appender.http_log.MaxFileSize=10MB
+log4j.appender.http_log.MaxBackupIndex=5
+log4j.appender.http_log.layout=org.apache.log4j.PatternLayout
+log4j.appender.http_log.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] [%t] - %m%n
+log4j.appender.http_log.encoding=UTF-8
+
diff --git a/distribution/src/main/resources/v2_dev/wildfirechat.conf b/distribution/src/main/resources/v2_dev/wildfirechat.conf
new file mode 100644
index 00000000..92b573fd
--- /dev/null
+++ b/distribution/src/main/resources/v2_dev/wildfirechat.conf
@@ -0,0 +1,209 @@
+#*********************************************************************
+# Server configuration v2_dev
+#*********************************************************************
+#服务器的接入IP。给客户端提供是${server.ip}和${http_port}。
+#客户端会从${http_port}端口获取到长链接端口。这个地址一定要改成客户端可以访问到的IP地址
+# (如果您部署云服务器上或者具有独立公网出口的服务器上,请改为对应的公网IP;如果您部署在在内网环境下,在内网使用,这个地方改成内网地址)
+server.ip 192.168.237.100
+
+##原生客户端长链接端口
+port 1883
+
+##客户端短链接端口
+http_port 80
+
+##WEB客户端长链接端口
+websocket_port 8083
+
+#管理端口
+http.admin.port 18080
+
+##节点ID,当集群部署时,一定不能有重复。
+node_id 1
+
+##绑定IP,保持不变即可
+host 0.0.0.0
+
+##本地绑定端口
+local_port 80
+
+##是否使用内置DB。0使用mysql;1使用h2db;2使用mysql+mongodb。社区版只支持0和1,专业版支持2
+embed.db 1
+
+##服务器管理接口密钥
+http.admin.secret_key 123456
+
+##服务器API接口参数是否检查时间。当设置为false时,所有的请求会检查时间的有效性;当设置为true时,可以在http.admin.secret_key保持不变的情况下,使用固定的服务API签名
+##nonce = "76616", timestamp = "1558350862502", sign = "b98f9b0717f59febccf1440067a7f50d9b31bdde"
+http.admin.no_check_time false
+
+##客户端协议栈密钥,需要与客户端协议栈文件libemqq.cc文件中的aes_key值保持一致,16进制byte用逗号分割。这个密钥不能修改!!!
+client.proto.secret_key 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F
+
+##用来生产im token的私钥,只在服务器使用,客户端不用。正式使用时为了安全一定要修改这个值,切记切记
+token.key testim
+
+##token的过期时间,单位为毫秒,默认为无限期。如果需要设置无限期,客户端上一定需要加上token过期的处理。token过期的处理请参考文档的常见问题
+##token.expire_time 2592000000
+
+##首次登录,是否接收之前的历史消息。
+##0 不接收历史消息,只接收5分钟以内的消息,由于服务器没有保存已经收取记录,所以如果有超过5分钟之前未收取的消息也不会收取下拉;
+##1接收,会接收 message.max_queue 配置的条数的历史消息
+message.roaming 0
+
+##是否开启拉取远程历史消息。如果为1,客户端在会话内如果本地消息读取完了,可以下拉继续加载在服务器上的该会话的消息;如果为0则不能。
+message.remote_history_message 0
+
+##服务器为每个用户缓存的消息数量。这个值改得太大,拉取消息时间变长,另外会占用大量内存。
+message.max_queue 1024
+
+##是否禁止陌生人聊天
+message.disable_stranger_chat false
+
+##黑名单策略,0 发送失败,返回被拉黑的错误码;1 发送成功但消息被服务器直接丢弃
+message.blacklist.strategy 0
+
+##是否禁止服务器端消息搜索,该功能暂未实现。目前的影响是如果打开,则存储消息时不单独保存_searchable_content字段
+message.disable_remote_search false
+
+##允许客户端撤回消息时限,单位是秒。群组管理员或群主撤回群成员消息、server api不受此限制,可以撤回任意时限内的消息
+message.recall_time_limit 120
+
+##禁止搜索用户
+friend.disable_search false
+
+##禁止按照昵称搜索用户。
+friend.disable_nick_name_search false
+
+##禁止发送好友邀请,通过server api添加好友不受此限制
+friend.disable_friend_request false
+
+##好友请求重复发送的间隔,单位是毫秒,默认是7天,0为不限制
+friend.repeat_request_duration 604800000
+
+##好友请求被拒绝后再次发送的间隔,单位是毫秒,默认是30天,0为不限制
+friend.reject_request_duration 2592000000
+
+##好友请求过期时间,单位是毫秒,默认是7天,0为不限制
+friend.request_expiration_duration 604800000
+
+##添加好友后会发送欢迎消息,比如"你们已经是好友了,可以聊天了"。这个开关控制是用旧的方式还是用新的方式。
+##旧的方式会发送notification消息(contenttype是80),内容会根据好友接收者的语言选择对应的语言,如果双方语言不一致会导致另外一方看到的不是本地语言。
+##新的方式会发送添加好友消息(contenttype是93)和欢迎消息(contenttype是92),需要客户端实现这两种消息。
+##如果客户端已经实现这两种消息可以打开这个开关
+friend.new_welcome_message false
+
+## 聊天室观众空闲退出时间,单位为毫秒,默认为15分钟,0为永远不退出
+chatroom.participant_idle_time 900000
+
+## 用户向聊天室发送消息,自动加入聊天室
+chatroom.rejoin_when_active true
+
+#*********************************************************************
+# hazelcase configuration
+#*********************************************************************
+hazelcast.configuration config/hazelcast.xml
+
+#*********************************************************************
+# Media server configuration
+#*********************************************************************
+##是否使用七牛云存储。1使用七牛;0使用内存文件服务器。默认的七牛账户信息不可用,请在七牛官网申请账户并配置
+## https://docs.wildfirechat.cn/server/media_server.html
+media.server.use_qiniu 0
+
+##媒体类型分类
+#Media_Type_GENERAL = 0,
+#Media_Type_IMAGE = 1,
+#Media_Type_VOICE = 2,
+#Media_Type_VIDEO = 3,
+#Media_Type_FILE = 4,
+#Media_Type_PORTRAIT = 5,
+#Media_Type_FAVORITE = 6
+
+# qiniu media server configuration
+## 上传地址,不同的区域,上传地址也不同,请注意现在正确的地址
+qiniu.server_url http://up.qbox.me
+qiniu.access_key tU3vdBK5BL5j4N7jI5N5uZgq_HQDo170w5C9Amnn
+qiniu.secret_key YfQIJdgp5YGhwEw14vGpaD2HJZsuJldWtqens7i5
+## bucket名字及Domain
+qiniu.bucket_general_name media
+qiniu.bucket_general_domain http://cdn.wildfirechat.cn
+qiniu.bucket_image_name media
+qiniu.bucket_image_domain http://cdn.wildfirechat.cn
+qiniu.bucket_voice_name media
+qiniu.bucket_voice_domain http://cdn.wildfirechat.cn
+qiniu.bucket_video_name media
+qiniu.bucket_video_domain http://cdn.wildfirechat.cn
+qiniu.bucket_file_name media
+qiniu.bucket_file_domain http://cdn.wildfirechat.cn
+qiniu.bucket_sticker_name media
+qiniu.bucket_sticker_domain http://cdn.wildfirechat.cn
+qiniu.bucket_moments_name media
+qiniu.bucket_moments_domain http://cdn.wildfirechat.cn
+qiniu.bucket_portrait_name storage
+qiniu.bucket_portrait_domain http://cdn2.wildfirechat.cn
+qiniu.bucket_favorite_name storage
+qiniu.bucket_favorite_domain http://cdn2.wildfirechat.cn
+
+
+# local media server configuration
+# 本地媒体服务器配置。
+local.media.storage.root ./media
+
+
+# 是否支持多端登陆,为true时支持任意平台任意多个客户端同时登录;为false时每个平台只支持一个端登录,但不同平台可以同时登录。
+server.multi_endpoint false
+
+# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
+server.multi_platform_notification false
+
+#*********************************************************************
+# Push server configuration
+#*********************************************************************
+##安卓推送服务器地址
+push.android.server.address http://localhost:8085/android/push
+##苹果推送服务器地址
+push.ios.server.address http://localhost:8085/ios/push
+
+
+#*********************************************************************
+# User online status event callback
+#*********************************************************************
+##用户在线状态事件回调地址
+#user.online_status_callback http://localhost:8888/user/online_event
+
+
+#*********************************************************************
+# MongoDB configuration
+#*********************************************************************
+#专业版支持,社区版请忽略
+#mongodb.client_uri mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
+#mongodb.client_uri mongodb://host1:27017,host2:27017,host3:27017/wfchat?replicaSet=myReplicaSet
+mongodb.client_uri mongodb://wfc:123456@localhost:27017/wfchat
+mongodb.database wfchat
+mongodb.data_expire_days 1096
+
+#*********************************************************************
+# Netty Configuration
+#
+# Linux systems can use epoll instead of nio. To get a performance
+# gain and reduced GC.
+# http://netty.io/wiki/native-transports.html for more information
+#*********************************************************************
+# 如果是linux系统,一定要打开下面这个参数,能大幅度提高性能
+#netty.epoll true
+
+#*********************************************************************
+# Sensitive configuration
+#*********************************************************************
+##文本敏感词过滤处理方法,0 发送失败;1 发送成功但消息被服务器直接丢弃;2 命中的敏感词被替换成***
+sensitive.filter.type 0
+
+#*********************************************************************
+# Message forward configuration
+#*********************************************************************
+##消息转发地址
+#message.forward.url http://localhost:8087/message/forward
+
+##设备信息转发地址
+#device.forward.url http://localhost:8087/device/forward
--
Gitee
From 46fe24eafd72f56a6f406393d1885f0c6a6a6f97 Mon Sep 17 00:00:00 2001
From: youqibin
Date: Sun, 20 Sep 2020 17:34:02 +0800
Subject: [PATCH 4/6] test
---
distribution/src/main/resources/v1_test/README.txt | 1 +
distribution/src/main/resources/v2_test/README.txt | 1 +
2 files changed, 2 insertions(+)
create mode 100644 distribution/src/main/resources/v1_test/README.txt
create mode 100644 distribution/src/main/resources/v2_test/README.txt
diff --git a/distribution/src/main/resources/v1_test/README.txt b/distribution/src/main/resources/v1_test/README.txt
new file mode 100644
index 00000000..c575850c
--- /dev/null
+++ b/distribution/src/main/resources/v1_test/README.txt
@@ -0,0 +1 @@
+部署方法请参考野火IM开发文档 http://docs.wildfirechat.cn
diff --git a/distribution/src/main/resources/v2_test/README.txt b/distribution/src/main/resources/v2_test/README.txt
new file mode 100644
index 00000000..c575850c
--- /dev/null
+++ b/distribution/src/main/resources/v2_test/README.txt
@@ -0,0 +1 @@
+部署方法请参考野火IM开发文档 http://docs.wildfirechat.cn
--
Gitee
From 8e76d786bd23c1e12f22c04694b631d841e9cfaf Mon Sep 17 00:00:00 2001
From: youqibin
Date: Wed, 23 Sep 2020 00:40:18 +0800
Subject: [PATCH 5/6] test
---
.../main/resources/v1_test/c3p0-config.xml | 66 ++++++
.../src/main/resources/v1_test/hazelcast.xml | 149 +++++++++++++
.../main/resources/v1_test/log4j.properties | 73 ++++++
.../main/resources/v1_test/wildfirechat.conf | 209 ++++++++++++++++++
4 files changed, 497 insertions(+)
create mode 100644 distribution/src/main/resources/v1_test/c3p0-config.xml
create mode 100644 distribution/src/main/resources/v1_test/hazelcast.xml
create mode 100644 distribution/src/main/resources/v1_test/log4j.properties
create mode 100644 distribution/src/main/resources/v1_test/wildfirechat.conf
diff --git a/distribution/src/main/resources/v1_test/c3p0-config.xml b/distribution/src/main/resources/v1_test/c3p0-config.xml
new file mode 100644
index 00000000..7bcc172d
--- /dev/null
+++ b/distribution/src/main/resources/v1_test/c3p0-config.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ 10
+ 30
+ 100
+ 10
+ 200
+
+
+
+
+
+
+ com.mysql.cj.jdbc.Driver
+
+ jdbc:mysql://localhost:3356/wfchat?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8
+
+ root
+
+ 123456
+
+ 10
+
+ 30
+
+ 100
+
+ 10
+
+ 200
+
+ 3000
+
+ 2
+
+ 0
+
+ 1000
+
+ false
+
+
+
+ false
+
+ 60
+
+
+
+
+
+
+
+ oracle.jdbc.driver.OracleDriver
+ jdbc:oracle:thin:@localhost:1521:orcl
+ scott
+ liang
+ 10
+ 30
+ 100
+ 10
+ 200
+
+
diff --git a/distribution/src/main/resources/v1_test/hazelcast.xml b/distribution/src/main/resources/v1_test/hazelcast.xml
new file mode 100644
index 00000000..65295e75
--- /dev/null
+++ b/distribution/src/main/resources/v1_test/hazelcast.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/src/main/resources/v1_test/log4j.properties b/distribution/src/main/resources/v1_test/log4j.properties
new file mode 100644
index 00000000..ab749f92
--- /dev/null
+++ b/distribution/src/main/resources/v1_test/log4j.properties
@@ -0,0 +1,73 @@
+# Set root logger level to DEBUG and its only appender to A1.
+#log4j.rootLogger=ERROR, A1
+#log4j.rootLogger=INFO, stdout, file
+log4j.rootLogger=INFO, file, messagelog
+
+log4j.logger.io.moquette=INFO
+log4j.logger.io.moquette.spi.impl.ProtocolProcessor=INFO
+log4j.logger.io.moquette.spi.impl.ProtocolProcessorBootstrapper=WARN
+
+#Protocol parsing
+log4j.logger.io.moquette.server.netty.NettyMQTTHandler=WARN
+#log4j.logger.io.moquette.server.netty.NettyMQTTHandler=DEBUG
+log4j.logger.io.moquette.parser.netty=WARN
+#Storage server
+#log4j.logger.io.moquette.spi.impl.subscriptions.SubscriptionsDirectorytory=DEBUG
+#log4j.logger.io.moquette.spi.impl.HawtDBStorageService=DEBUG
+
+# stdout appender is set to be a ConsoleAppender.
+#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+#log4j.appender.stdout.Threshold=WARN
+#log4j.appender.stdout.Threshold=INFO
+#log4j.appender.stdout.Threshold=DEBUG
+#log4j.appender.stdout.Threshold=TRACE
+#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n
+
+#file appender
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.Threshold=INFO
+log4j.appender.file.File=logs/wildfirechat.log
+log4j.appender.file.MaxFileSize=20MB
+log4j.appender.file.MaxBackupIndex=100
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n
+log4j.appender.file.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %L %x - %m%n
+
+####################################
+# Message Logger Configuration #
+#####################################
+log4j.appender.messagelog=org.apache.log4j.RollingFileAppender
+log4j.appender.messagelog.Threshold=WARN
+log4j.appender.messagelog.File=logs/wildfirechat_messages.log
+log4j.appender.messagelog.MaxFileSize=100MB
+log4j.appender.messagelog.MaxBackupIndex=3
+log4j.appender.messagelog.layout=org.apache.log4j.PatternLayout
+log4j.appender.messagelog.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} [%t] %-5p %c{1} %L %x - %m%n
+
+log4j.category.messageLogger=WARN, messagelog
+
+
+log4j.logger.cn.wildfirechat.push=INFO, push_log
+log4j.additivity.cn.wildfirechat.push=false
+log4j.appender.push_log=org.apache.log4j.RollingFileAppender
+log4j.appender.push_log.File=logs/push.log
+log4j.appender.push_log.Append=true
+log4j.appender.push_log.MaxFileSize=10MB
+log4j.appender.push_log.MaxBackupIndex=5
+log4j.appender.push_log.layout=org.apache.log4j.PatternLayout
+log4j.appender.push_log.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] [%t] - %m%n
+log4j.appender.push_log.encoding=UTF-8
+
+
+log4j.logger.com.xiaoleilu.loServer=INFO, http_log
+log4j.additivity.com.xiaoleilu.loServer=false
+log4j.appender.http_log=org.apache.log4j.RollingFileAppender
+log4j.appender.http_log.File=logs/http.log
+log4j.appender.http_log.Append=true
+log4j.appender.http_log.MaxFileSize=10MB
+log4j.appender.http_log.MaxBackupIndex=5
+log4j.appender.http_log.layout=org.apache.log4j.PatternLayout
+log4j.appender.http_log.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%-5p][%c{1}] [%t] - %m%n
+log4j.appender.http_log.encoding=UTF-8
+
diff --git a/distribution/src/main/resources/v1_test/wildfirechat.conf b/distribution/src/main/resources/v1_test/wildfirechat.conf
new file mode 100644
index 00000000..f4c8863b
--- /dev/null
+++ b/distribution/src/main/resources/v1_test/wildfirechat.conf
@@ -0,0 +1,209 @@
+#*********************************************************************
+# Server configuration v1_test
+#*********************************************************************
+#服务器的接入IP。给客户端提供是${server.ip}和${http_port}。
+#客户端会从${http_port}端口获取到长链接端口。这个地址一定要改成客户端可以访问到的IP地址
+# (如果您部署云服务器上或者具有独立公网出口的服务器上,请改为对应的公网IP;如果您部署在在内网环境下,在内网使用,这个地方改成内网地址)
+server.ip 192.168.237.100
+
+##原生客户端长链接端口
+port 1883
+
+##客户端短链接端口
+http_port 80
+
+##WEB客户端长链接端口
+websocket_port 8083
+
+#管理端口
+http.admin.port 18080
+
+##节点ID,当集群部署时,一定不能有重复。
+node_id 1
+
+##绑定IP,保持不变即可
+host 0.0.0.0
+
+##本地绑定端口
+local_port 80
+
+##是否使用内置DB。0使用mysql;1使用h2db;2使用mysql+mongodb。社区版只支持0和1,专业版支持2
+embed.db 1
+
+##服务器管理接口密钥
+http.admin.secret_key 123456
+
+##服务器API接口参数是否检查时间。当设置为false时,所有的请求会检查时间的有效性;当设置为true时,可以在http.admin.secret_key保持不变的情况下,使用固定的服务API签名
+##nonce = "76616", timestamp = "1558350862502", sign = "b98f9b0717f59febccf1440067a7f50d9b31bdde"
+http.admin.no_check_time false
+
+##客户端协议栈密钥,需要与客户端协议栈文件libemqq.cc文件中的aes_key值保持一致,16进制byte用逗号分割。这个密钥不能修改!!!
+client.proto.secret_key 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F
+
+##用来生产im token的私钥,只在服务器使用,客户端不用。正式使用时为了安全一定要修改这个值,切记切记
+token.key testim
+
+##token的过期时间,单位为毫秒,默认为无限期。如果需要设置无限期,客户端上一定需要加上token过期的处理。token过期的处理请参考文档的常见问题
+##token.expire_time 2592000000
+
+##首次登录,是否接收之前的历史消息。
+##0 不接收历史消息,只接收5分钟以内的消息,由于服务器没有保存已经收取记录,所以如果有超过5分钟之前未收取的消息也不会收取下拉;
+##1接收,会接收 message.max_queue 配置的条数的历史消息
+message.roaming 0
+
+##是否开启拉取远程历史消息。如果为1,客户端在会话内如果本地消息读取完了,可以下拉继续加载在服务器上的该会话的消息;如果为0则不能。
+message.remote_history_message 0
+
+##服务器为每个用户缓存的消息数量。这个值改得太大,拉取消息时间变长,另外会占用大量内存。
+message.max_queue 1024
+
+##是否禁止陌生人聊天
+message.disable_stranger_chat false
+
+##黑名单策略,0 发送失败,返回被拉黑的错误码;1 发送成功但消息被服务器直接丢弃
+message.blacklist.strategy 0
+
+##是否禁止服务器端消息搜索,该功能暂未实现。目前的影响是如果打开,则存储消息时不单独保存_searchable_content字段
+message.disable_remote_search false
+
+##允许客户端撤回消息时限,单位是秒。群组管理员或群主撤回群成员消息、server api不受此限制,可以撤回任意时限内的消息
+message.recall_time_limit 120
+
+##禁止搜索用户
+friend.disable_search false
+
+##禁止按照昵称搜索用户。
+friend.disable_nick_name_search false
+
+##禁止发送好友邀请,通过server api添加好友不受此限制
+friend.disable_friend_request false
+
+##好友请求重复发送的间隔,单位是毫秒,默认是7天,0为不限制
+friend.repeat_request_duration 604800000
+
+##好友请求被拒绝后再次发送的间隔,单位是毫秒,默认是30天,0为不限制
+friend.reject_request_duration 2592000000
+
+##好友请求过期时间,单位是毫秒,默认是7天,0为不限制
+friend.request_expiration_duration 604800000
+
+##添加好友后会发送欢迎消息,比如"你们已经是好友了,可以聊天了"。这个开关控制是用旧的方式还是用新的方式。
+##旧的方式会发送notification消息(contenttype是80),内容会根据好友接收者的语言选择对应的语言,如果双方语言不一致会导致另外一方看到的不是本地语言。
+##新的方式会发送添加好友消息(contenttype是93)和欢迎消息(contenttype是92),需要客户端实现这两种消息。
+##如果客户端已经实现这两种消息可以打开这个开关
+friend.new_welcome_message false
+
+## 聊天室观众空闲退出时间,单位为毫秒,默认为15分钟,0为永远不退出
+chatroom.participant_idle_time 900000
+
+## 用户向聊天室发送消息,自动加入聊天室
+chatroom.rejoin_when_active true
+
+#*********************************************************************
+# hazelcase configuration
+#*********************************************************************
+hazelcast.configuration config/hazelcast.xml
+
+#*********************************************************************
+# Media server configuration
+#*********************************************************************
+##是否使用七牛云存储。1使用七牛;0使用内存文件服务器。默认的七牛账户信息不可用,请在七牛官网申请账户并配置
+## https://docs.wildfirechat.cn/server/media_server.html
+media.server.use_qiniu 0
+
+##媒体类型分类
+#Media_Type_GENERAL = 0,
+#Media_Type_IMAGE = 1,
+#Media_Type_VOICE = 2,
+#Media_Type_VIDEO = 3,
+#Media_Type_FILE = 4,
+#Media_Type_PORTRAIT = 5,
+#Media_Type_FAVORITE = 6
+
+# qiniu media server configuration
+## 上传地址,不同的区域,上传地址也不同,请注意现在正确的地址
+qiniu.server_url http://up.qbox.me
+qiniu.access_key tU3vdBK5BL5j4N7jI5N5uZgq_HQDo170w5C9Amnn
+qiniu.secret_key YfQIJdgp5YGhwEw14vGpaD2HJZsuJldWtqens7i5
+## bucket名字及Domain
+qiniu.bucket_general_name media
+qiniu.bucket_general_domain http://cdn.wildfirechat.cn
+qiniu.bucket_image_name media
+qiniu.bucket_image_domain http://cdn.wildfirechat.cn
+qiniu.bucket_voice_name media
+qiniu.bucket_voice_domain http://cdn.wildfirechat.cn
+qiniu.bucket_video_name media
+qiniu.bucket_video_domain http://cdn.wildfirechat.cn
+qiniu.bucket_file_name media
+qiniu.bucket_file_domain http://cdn.wildfirechat.cn
+qiniu.bucket_sticker_name media
+qiniu.bucket_sticker_domain http://cdn.wildfirechat.cn
+qiniu.bucket_moments_name media
+qiniu.bucket_moments_domain http://cdn.wildfirechat.cn
+qiniu.bucket_portrait_name storage
+qiniu.bucket_portrait_domain http://cdn2.wildfirechat.cn
+qiniu.bucket_favorite_name storage
+qiniu.bucket_favorite_domain http://cdn2.wildfirechat.cn
+
+
+# local media server configuration
+# 本地媒体服务器配置。
+local.media.storage.root ./media
+
+
+# 是否支持多端登陆,为true时支持任意平台任意多个客户端同时登录;为false时每个平台只支持一个端登录,但不同平台可以同时登录。
+server.multi_endpoint false
+
+# 多平台连接状态通知(仅当multi_endpoint为false时有效),true时移动端可以收到pc或web端登录的通知。
+server.multi_platform_notification false
+
+#*********************************************************************
+# Push server configuration
+#*********************************************************************
+##安卓推送服务器地址
+push.android.server.address http://localhost:8085/android/push
+##苹果推送服务器地址
+push.ios.server.address http://localhost:8085/ios/push
+
+
+#*********************************************************************
+# User online status event callback
+#*********************************************************************
+##用户在线状态事件回调地址
+#user.online_status_callback http://localhost:8888/user/online_event
+
+
+#*********************************************************************
+# MongoDB configuration
+#*********************************************************************
+#专业版支持,社区版请忽略
+#mongodb.client_uri mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
+#mongodb.client_uri mongodb://host1:27017,host2:27017,host3:27017/wfchat?replicaSet=myReplicaSet
+mongodb.client_uri mongodb://wfc:123456@localhost:27017/wfchat
+mongodb.database wfchat
+mongodb.data_expire_days 1096
+
+#*********************************************************************
+# Netty Configuration
+#
+# Linux systems can use epoll instead of nio. To get a performance
+# gain and reduced GC.
+# http://netty.io/wiki/native-transports.html for more information
+#*********************************************************************
+# 如果是linux系统,一定要打开下面这个参数,能大幅度提高性能
+netty.epoll true
+
+#*********************************************************************
+# Sensitive configuration
+#*********************************************************************
+##文本敏感词过滤处理方法,0 发送失败;1 发送成功但消息被服务器直接丢弃;2 命中的敏感词被替换成***
+sensitive.filter.type 0
+
+#*********************************************************************
+# Message forward configuration
+#*********************************************************************
+##消息转发地址
+#message.forward.url http://localhost:8087/message/forward
+
+##设备信息转发地址
+#device.forward.url http://localhost:8087/device/forward
--
Gitee
From d378eba8119ea9c54226839029bcc80ce51813b5 Mon Sep 17 00:00:00 2001
From: youqibin
Date: Wed, 23 Sep 2020 00:42:24 +0800
Subject: [PATCH 6/6] test
---
distribution/src/main/resources/v1_test/c3p0-config.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/distribution/src/main/resources/v1_test/c3p0-config.xml b/distribution/src/main/resources/v1_test/c3p0-config.xml
index 7bcc172d..c46fc302 100644
--- a/distribution/src/main/resources/v1_test/c3p0-config.xml
+++ b/distribution/src/main/resources/v1_test/c3p0-config.xml
@@ -19,7 +19,7 @@
root
- 123456
+ 1234561
10
--
Gitee