Browse Source

rename openzaly to windchat & fix bug

develop
an.guoyue 2 years ago
parent
commit
9cc735e7a5
  1. 2
      .gitignore
  2. 50
      README.md
  3. 2
      windchat-admin/src/main/java/com/windchat/im/web/OpenzalyAdminApplication.java
  4. 14
      windchat-boot/src/main/java/com/windchat/im/boot/config/AkxProject.java
  5. 58
      windchat-boot/src/main/java/com/windchat/im/boot/config/ConfigKey.java
  6. 9
      windchat-boot/src/main/java/com/windchat/im/boot/config/WindProject.java
  7. 14
      windchat-boot/src/main/java/com/windchat/im/boot/main/Bootstrap.java
  8. 19
      windchat-boot/src/main/resources/logo.txt
  9. 85
      windchat-boot/src/main/resources/openzaly-server.config
  10. 2
      windchat-common/src/main/java/com/windchat/common/logs/LogUtils.java

2
.gitignore

@ -11,4 +11,4 @@ target/
windchat-server.jar
site-file/
site-logs/
openzaly-server.config
windchat-boot/openzaly-server.config

50
README.md

@ -16,7 +16,7 @@
简介
----
WindChat 是一款开源免费私有IM聊天软件,原身是Akaxin即时通讯开源软件,由原开发者SAM2O2O个人维护,主要面向企业定制IM。
WindChat 是一款开源免费私有IM聊天软件,原身是Akaxin即时通讯开源软件,由原开发者SAM2O2O个人维护,主要面向企业定制IM,全端开源,免费
特性:
@ -40,40 +40,40 @@ WindChat 是一款开源免费私有IM聊天软件,原身是Akaxin即时通讯
* git clone https://gitee.com/wind-chat/wind-im.git
openzlay 0.10.6开始支持personal(个人版)与team版,默认状态下使用personal
WindChat 开始支持personal(个人版)与team版,默认状态下使用personal
支持的启动参数:`java -jar windchat-server.jar -h`
openzaly Personal版本 命令:
WindChat Personal版本 命令:
* 版本升级:`java -jar windchat-server.jar -upgrade` ,此命令在服务与sqlite数据库版本不一致时执行,正常情况无需执行
* 启动命令:`java -jar windchat-server.jar`
openzaly Team版本 命令:
WindChat Team版本 命令:
* 生成Team版本所需配置模版:`java -jar windchat-server.jar -team`
* 修改配置文件: 上一步会生成 openzaly-server.config 使用mysql数据库需在openzaly-server.config配置文件中配置mysql参数:
* 修改配置文件: 上一步会生成 windchat-server.config 使用mysql数据库需在[windchat-server.config]配置文件中配置mysql参数:
主库(数据库编码需要设置utf8mb4):
openzaly.mysql.host=localhost //数据库的地址
openzaly.mysql.port=3306 //数据库端口
openzaly.mysql.database=openzaly //数据库名称
openzaly.mysql.username=root //mysql数据库访问用户
openzaly.mysql.password=1234567890 //mysql数据库密码
windchat.mysql.host=localhost //数据库的地址
windchat.mysql.port=3306 //数据库端口
windchat.mysql.database=openzaly //数据库名称
windchat.mysql.username=root //mysql数据库访问用户
windchat.mysql.password=1234567890 //mysql数据库密码
从库(如果需要使用主从模式,配置这里,不需要从库则不需要配置)数据库编码需要设置utf8mb4:
openzaly.mysql.slave.host=localhost
openzaly.mysql.slave.port=3306
openzaly.mysql.slave.database=openzaly
openzaly.mysql.slave.username=root
openzaly.mysql.slave.password=1234567890
windchat.mysql.slave.host=localhost
windchat.mysql.slave.port=3306
windchat.mysql.slave.database=openzaly
windchat.mysql.slave.username=root
windchat.mysql.slave.password=1234567890
其他mysql参数为使用mysql连接池的配置参数,如若涉及性能优化可开启配置项。
* 迁移数据库命令:openzaly支持使用者把Personal版本的sqlite中的数据迁移到Team版本的mysql数据库
如果执行这一步需要在openzaly-server.config配置文件中配置:
`openzaly.sqlite.url=openzalyDB.sqlite3` 这里指定sqlite数据库文件的位置
* 迁移数据库命令:WindChat支持使用者把Personal版本的sqlite中的数据迁移到Team版本的mysql数据库
如果执行这一步需要在windchat-server.config配置文件中配置:
`windchat.sqlite.url=openzalyDB.sqlite3` 这里指定sqlite数据库文件的位置
继续执行迁移命令:
`java -jar windchat-server.jar -migrate`
@ -83,8 +83,9 @@ openzaly Team版本 命令:
**2. 下载客户端**
> * [iOS](https://itunes.apple.com/cn/app/%E9%98%BF%E5%8D%A1%E4%BF%A1/id1346971087?mt=8)
> * [Android](https://www.akaxin.com)
> * [Android 等待开源]()
> * [iOS 等待开源]()
**3. 访问站点**
@ -118,15 +119,8 @@ WindChat 具有灵活、强大的扩展机制 `(“管理平台” 就是一个
你的聊天服务器,将摇身一变,成为一个强大的社交软件平台。
> 扩展机制处于技术预览阶段,如果你希望在自己的业务中开发自己的扩展,可以联系我们( mail: hi@akaxin.xyz ),我们将免费提供文档与技术答疑。
以下是我们开发的一个 “校园社交” 的扩展,截图如下:
<p align="center">
<img align="center" src="https://raw.githubusercontent.com/akaxincom/faq/master/app_pic/plugin.1.jpeg" width="200" /> &nbsp; <img align="center" src="https://raw.githubusercontent.com/akaxincom/faq/master/app_pic/plugin.2.jpeg" width="200" /> &nbsp; <img align="center" src="https://raw.githubusercontent.com/akaxincom/faq/master/app_pic/plugin.3.jpeg" width="200" /> &nbsp;
</p>
> 扩展机制处于技术预览阶段,如果你希望在自己的业务中开发自己的扩展,可以联系我们( mail: an.guoyue254@gmail.com ),我们将免费提供文档与技术答疑。
> 大家可以去 demo.akaxin.com 体验。
四、技术贡献者

2
windchat-admin/src/main/java/com/windchat/im/web/OpenzalyAdminApplication.java

@ -20,7 +20,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* springboot的支持放在openzaly-boot中
* springboot的支持
*
* @author Sam{@link an.guoyue254@gmail.com}
* @since 2018-06-05 19:31:16

14
windchat-boot/src/main/java/com/windchat/im/boot/config/AkxProject.java

@ -1,14 +0,0 @@
package com.windchat.im.boot.config;
/**
*
* @author Sam{@link an.guoyue254@gmail.com}
* @since 2018-03-26 19:07:30
*/
public interface AkxProject {
String PROJECT_NAME = "openzaly-boot";
String PROJECT_LOG_NAME = "openzaly-boot";
String PLN = "[openzaly-boot]";
}

58
windchat-boot/src/main/java/com/windchat/im/boot/config/ConfigKey.java

@ -1,47 +1,47 @@
/**
/**
* Copyright 2018-2028 Akaxin Group
*
* <p>
* 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
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*/
* limitations under the License.
*/
package com.windchat.im.boot.config;
/**
* 站点服务相关配置字段
*
*
* @author Sam{@link an.guoyue254@gmail.com}
* @since 2018-01-24 19:49:19
*/
public interface ConfigKey {
// 站点版本
public String SITE_VERSION = "openzaly.version";
// 站点服务地址,提供用户和站点之间连接使用
public String SITE_ADDRESS = "site.address";
// 站点服务监听端口
public String SITE_PORT = "site.port";
// 站点启动的http服务地址,内部扩展功能访问使用
public String PLUGIN_API_ADDRESS = "pluginapi.address";
// http服务监听端口
public String PLUGIN_API_PORT = "pluginapi.port";
// 站点管理扩展地址&&端口
public String SITE_ADMIN_ADDRESS = "site.admin.address";
public String SITE_ADMIN_PORT = "site.admin.port";
// 站点管理员
public String SITE_ADMINISTRATORS = "site.administrators";
// 站点管理员首次登陆站点,设置的邀请码
public String SITE_ADMIN_UIC = "site.uic";
// 存放站点图片,音频相关文件路径
public String SITE_BASE_DIR = "site.baseDir";
// 最大成员人数
public String GROUP_MEMBERS_COUNT = "group.members.count";
// 站点版本
public String SITE_VERSION = "windchat.version";
// 站点服务地址,提供用户和站点之间连接使用
public String SITE_ADDRESS = "windchat.address";
// 站点服务监听端口
public String SITE_PORT = "windchat.port";
// 站点启动的http服务地址,内部扩展功能访问使用
public String PLUGIN_API_ADDRESS = "windchat.api.address";
// http服务监听端口
public String PLUGIN_API_PORT = "windchat.api.port";
// 站点管理扩展地址&&端口
public String SITE_ADMIN_ADDRESS = "windchat.admin.address";
public String SITE_ADMIN_PORT = "windchat.admin.port";
// 站点管理员
public String SITE_ADMINISTRATORS = "windchat.administrators";
// 站点管理员首次登陆站点,设置的邀请码
public String SITE_ADMIN_UIC = "windchat.uic";
// 存放站点图片,音频相关文件路径
public String SITE_BASE_DIR = "windchat.baseDir";
// 最大成员人数
public String GROUP_MEMBERS_COUNT = "group.members.count";
}

9
windchat-boot/src/main/java/com/windchat/im/boot/config/WindProject.java

@ -0,0 +1,9 @@
package com.windchat.im.boot.config;
/**
* @author Sam{@link an.guoyue254@gmail.com}
* @since 2018-03-26 19:07:30
*/
public interface WindProject {
String PLN = "[windchat-boot]";
}

14
windchat-boot/src/main/java/com/windchat/im/boot/main/Bootstrap.java

@ -35,7 +35,7 @@ import com.windchat.common.executor.AbstracteExecutor;
import com.windchat.common.logs.AkxLog4jManager;
import com.windchat.common.utils.StringHelper;
import com.akaxin.proto.core.FileProto.FileType;
import com.windchat.im.boot.config.AkxProject;
import com.windchat.im.boot.config.WindProject;
import com.windchat.im.boot.config.ConfigHelper;
import com.windchat.im.boot.config.ConfigKey;
import com.windchat.im.boot.config.ConfigListener;
@ -219,7 +219,7 @@ public class Bootstrap {
private static void setDefaultSystemLogLevel() {
// 更新日志级别
AkxLog4jManager.setLogLevel(Level.INFO);
BootLog.info("{} set system log level={}", AkxProject.PLN, Level.INFO);
BootLog.info("{} set system log level={}", WindProject.PLN, Level.INFO);
}
/**
@ -247,7 +247,7 @@ public class Bootstrap {
config.setAdminServerName(PluginArgs.SITE_ADMIN_NAME);
config.setAdminIcon(getDefaultIcon(SiteDefaultIcon.DEFAULT_SITE_ADMIN_ICON));
config.setParam(PluginArgs.FRIEND_SQUARE, getDefaultIcon(SiteDefaultIcon.DEFAULT_FRIEND_SQUARE_ICON));
BootLog.info("{} init datasource config={}", AkxProject.PLN, config.toString());
BootLog.info("{} init datasource config={}", WindProject.PLN, config.toString());
DataSourceManager.init(config);
}
@ -265,7 +265,7 @@ public class Bootstrap {
}
}.start(address, port);
BootLog.info("{} start http server {}:{} ok.", AkxProject.PLN, address, port);
BootLog.info("{} start http server {}:{} ok.", WindProject.PLN, address, port);
}
/**
@ -286,7 +286,7 @@ public class Bootstrap {
}
}.start(address, port);
BootLog.info("{} start netty server {}:{} ok.", AkxProject.PLN, address, port);
BootLog.info("{} start netty server {}:{} ok.", WindProject.PLN, address, port);
}
// websocket for web-im
@ -309,7 +309,7 @@ public class Bootstrap {
// add config listener,timing to update cached config value
private static void addConfigListener() {
ConfigListener.startListenning();
BootLog.info("{} start listener to site-config", AkxProject.PLN);
BootLog.info("{} start listener to site-config", WindProject.PLN);
}
// get pic by base64
@ -321,7 +321,7 @@ public class Bootstrap {
FileType.SITE_PLUGIN, null);
return fileId;
} catch (Exception e) {
BootLog.error(StringHelper.format("{} set openzaly-admin default icon error", AkxProject.PLN), e);
BootLog.error(StringHelper.format("{} set openzaly-admin default icon error", WindProject.PLN), e);
}
return "";
}

19
windchat-boot/src/main/resources/logo.txt

@ -1,16 +1,3 @@
/ \
/ . \
\ . \
/ \ \ / _ _ __ _ __ __ ___ _ _
/ . \ | / / \ / \ | |/ / / \ \ \/ / |_ _| | \ | |
/ . _ \ / / . \ / _ \ | ' / / _ \ \ / | | | \| |
\ / / \ - . / / ___ \ | . \ / ___ \ / \ | | | |\ |
\ / / | \ / /_/ \_\ |_|\_\ /_/ \_\ /_/\_\ |___| |_| \_|
/ . \ \ /
\ . \
\ /
\ /
Akaxin is an open source and free proprietary IM software,you can build private openzaly-server for everyone in any server.
-----------------------------------------------------------------------------------------------------------------
WindChat is an open source and free proprietary IM software,you can build private IM for everyone in any server.
-----------------------------------------------------------------------------------------------------------------

85
windchat-boot/src/main/resources/openzaly-server.config

@ -15,8 +15,8 @@
#
########################################################
### ***************Akaxin ***************
### openzaly-server
### *************** WindChat ***************
### windchat-server
########################################################
@ -25,76 +25,77 @@
## team/TEAM edition : use mysql database,support one master with several slaves
## enterprise/ENTERPRISE edition : use mysql + redis database ,support im server distribution
## ultimate edition : team or enterprise customization
openzaly.edition=TEAM
windchat.edition=TEAM
# openzaly version
openzaly.version=1.1.7
windchat.version=1.1.7
##### site tcp address,clients connect to site.address
site.address=0.0.0.0
windchat.address=0.0.0.0
# site tcp port default 2021
site.port=2021
windchat.port=2021
# pluginapi server address
pluginapi.address=0.0.0.0
windchat.api.address=0.0.0.0
# pluginapi server port
pluginapi.port=8280
windchat.api.port=8280
# default back-stage management address
site.admin.address=127.0.0.1
windchat.admin.address=127.0.0.1
# default back-stage management port
site.admin.port=8288
windchat.admin.port=8288
# first user login site,use this user invite code(UIC)
site.uic=000000
windchat.uic=000000
# deposit pictures,audio,db default current path
# site.baseDir=${pwd}
# windchat.baseDir=${pwd}
## if openzaly.edition = personal/PERSONAL OR migrate sqlite to mysql
##openzaly.sqlite.url=openzalyDB.sqlite3
## if windchat.edition = personal/PERSONAL OR migrate sqlite to mysql
##windchat.sqlite.url=windchatDB.sqlite3
## if openzaly.edition = team/TEAM
## if windchat.edition = team/TEAM
##***************mysql master**************
##openzaly.mysql.host=localhost
##openzaly.mysql.port=3306
##openzaly.mysql.database=openzaly
##windchat.mysql.host=localhost
##windchat.mysql.port=3306
##windchat.mysql.database=windchat
##openzaly.mysql.username=root
##openzaly.mysql.password=1234567890
##windchat.mysql.username=root
##windchat.mysql.password=1234567890
openzaly.mysql.initial-size=10
openzaly.mysql.max-size=100
openzaly.mysql.max-idle=60
windchat.mysql.initial-size=10
windchat.mysql.max-size=100
windchat.mysql.max-idle=60
openzaly.mysql.useUnicode=true
openzaly.mysql.characterEncoding=utf-8
openzaly.mysql.verifyServerCertificate=false
openzaly.mysql.useSSL=true
windchat.mysql.useUnicode=true
windchat.mysql.characterEncoding=utf-8
windchat.mysql.verifyServerCertificate=false
windchat.mysql.useSSL=true
##***************mysql slave**************
##openzaly.mysql.slave.host=localhost
##openzaly.mysql.slave.port=3306
##openzaly.mysql.slave.database=openzaly
##windchat.mysql.slave.host=localhost
##windchat.mysql.slave.port=3306
##windchat.mysql.slave.database=windchat
##openzaly.mysql.slave.username=root
##openzaly.mysql.slave.password=1234567890
##openzaly.mysql.slave.initial-size=10
##openzaly.mysql.slave.max-size=100
##openzaly.mysql.slave.max-idle=60
##windchat.mysql.slave.username=root
##windchat.mysql.slave.password=1234567890
##windchat.mysql.slave.initial-size=10
##windchat.mysql.slave.max-size=100
##windchat.mysql.slave.max-idle=60
##openzaly.mysql.slave.useUnicode=true
##openzaly.mysql.slave.characterEncoding=utf-8
##openzaly.mysql.slave.verifyServerCertificate=false
##openzaly.mysql.slave.useSSL=true
##windchat.mysql.slave.useUnicode=true
##windchat.mysql.slave.characterEncoding=utf-8
##windchat.mysql.slave.verifyServerCertificate=false
##windchat.mysql.slave.useSSL=true
## if openzaly.edition = enterprise/ENTERPRISE
## if windchat.edition = enterprise/ENTERPRISE
#### support support im server distribution
## if openzaly.edition = ultimate edition
#### openzaly support customed for team or enterprise
## if windchat.edition = ultimate edition
#### windchat support customed for team or enterprise

2
windchat-common/src/main/java/com/windchat/common/logs/LogUtils.java

@ -69,7 +69,7 @@ public class LogUtils extends LogCreater {
public static void dbDebugLog(Logger logger, long startTime, Object result, String sql, Object... objects) {
String messagePattern = sql.replace("?", "{}");
FormattingTuple format = MessageFormatter.arrayFormat(messagePattern, objects);
logger.debug("[openzaly-db] cost:{}ms result:{} sql:{}", System.currentTimeMillis() - startTime, result,
logger.debug("[windchat-db] cost:{}ms result:{} sql:{}", System.currentTimeMillis() - startTime, result,
format.getMessage());
}

Loading…
Cancel
Save