ensign/README.MD
2024-08-26 09:19:12 +08:00

116 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用说明
## 1.启动服务
### 1) Application中设置好环境必要的参数
- setClusterNumber: 集群编码
- setTenantNumber: 租户编码
- setServerIP: 服务端IP
例:
```java
cosmic.setClusterNumber("cosmic");
cosmic.setTenantNumber("sample");
cosmic.setServerIP("192.168.95.177");
```
使用苍穹5.0之前的版本需注释掉kd.cosmic.server.Launcher的@SdkPublic标注。
### 2) 启动服务
```java
kd.cosmic.Application
```
首次运行IDEA会弹出命令行过长的提示形如
```text
Error running kd.cosmic.Application. Command line is too long.
Shorten the command line via JAR manifest or via a classpath file and rerun.
```
点击<code>JAR manifest</code>链接执行启动。
参考文章: https://developer.kingdee.com/article/357806944599232512
### 3) 登录
启动完毕后打开http://localhost:8080/ierp
### 4) IP变更
若服务器IP发生变化则同步做以下修改
- Application.javacosmic.setServerIP(...)
- cosmic.propertiesMCServerURL的值
- 苍穹虚拟机:苍穹开发助手->服务器管理->初始化设置->一键设置IP
## 2.更新环境
菜单操作路径:苍穹开发助手-->更新环境
将从MC服务器上更新最新包cosmic.zip、webapp.zip解压到当前工程同一个目录下目录名为"工程名称-server"。
Application.java中已自动设置好解压后的web路径
```java
cosmic.setWebPath("C:/Users/xxx/kingdee/myproject-server/webapp")
```
注意:更新版本时请先停止在正在跑或调试的工程,避免文件占用无法覆盖。
## 3.插件选项
菜单操作路径File->Settings->苍穹开发助手
## 4.搜索工具窗
菜单操作路径View->Tool Windows->苍穹开发助手
若当前为苍穹工程(工程根目录下有cosmic.properties文件),苍穹开发助手自行显示,停靠在右上角。
提供文档检索功能。
## 5.菜单-登录开发者门户
未登录:苍穹开发助手(工具窗)-社区文章-可搜索“开发者社区”文档
登录后:苍穹开发助手(工具窗)-社区文章-可搜索“开发者社区+开发者门户”文档
## 6.工程打包
给当前工程打jar包jar包配置文件: cosmic.build.xml。
## 7.菜单-服务器管理
通过SSH远程管理服务器。
## 8.设置zk用户密码
1) Application启动中配置
```java
cosmic.setConfigUrl("xxx.xxx.xxx.xxx:2181","user","password");
```
2) 菜单-服务器管理-初始化设置:
```properties
ZK地址=xxx.xxx.xxx.xxx:2181?user=xxx&password=xxx
```
## 9.相关文档
### 如何快速搭建二开环境
https://vip.kingdee.com/article/357950002276007424
### 金蝶云·苍穹开发助手
https://vip.kingdee.com/article/355335902929259776
### 苍穹虚拟机下载列表(全)
https://vip.kingdee.com/article/357923047296550912
### IDEA启动命令行过长解决办法
https://vip.kingdee.com/article/357806944599232512