You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.8 KiB

4 years ago
### 插件调试环境搭建
4 years ago
1. clone仓库到BI仓库同级目录,编辑nuclear-maven的pom.xml,引用插件目录
![企业微信截图_6fc59751-44ef-4edc-87c9-50cdf55446dc.png](https://upload-images.jianshu.io/upload_images/4968021-00eb069a3643dbaa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2. 在工程目录的WEB-INF的plugins文件夹下新建如图文件夹,将工程中的plugin.xml复制过去(或者直接安装根目录中打包好的zip插件,会自动建这样的文件夹)
![企业微信截图_474e2f8b-cbe9-418e-b78a-7ca959dd11bf.png](https://upload-images.jianshu.io/upload_images/4968021-fab0e6337b93feae.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3. 修改插件pom中的output,改成工程中插件文件夹的classes即可。
![企业微信截图_9f29fc43-b522-479a-81b9-0328437593e9.png](https://upload-images.jianshu.io/upload_images/4968021-c04479609de5a404.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4. 正常build,起工程,断点调试
### 打包插件
1. 修改build.xml的jdk.home和classes
![image.png](https://upload-images.jianshu.io/upload_images/4968021-364bdcc061f6007e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2. idea的ant直接添加工程中的build.xml即可
![image.png](https://upload-images.jianshu.io/upload_images/4968021-510012c5932a1e6f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3. build后会生成classes,然后直接打包即可
### 接口约定
url: /app/decision/v5/plugin/design/widgets/data
method: POST
请求体
```
{
widgets: {
组件id: 之前发送的组件信息
}
}
```
返回体
```
{
status: 200,
...
data: {
组件id: {
status: 200,
data: 之前的组件数据
}
}
}
```