update comments for build.json file to DB

This commit is contained in:
Eleven 2021-08-05 00:32:02 +08:00
parent d0533ae532
commit f1a9255bcd
2 changed files with 14 additions and 2 deletions

View File

@ -1,6 +1,6 @@
jpom: jpom:
# jpom 数据存储路径, 如果调试模式运行默认路径为【/jpom/】,安装运行默认为jar包文件的父级 # jpom 数据存储路径, 如果调试模式运行默认路径为【/jpom/】,安装运行默认为jar包文件的父级
path: path: /Users/zhangxin/Documents/jpom/agent
authorize: authorize:
# agent 端管理账号,必填。 # agent 端管理账号,必填。
agentName: jpomAgent agentName: jpomAgent

View File

@ -47,7 +47,8 @@ public class LoadBuildJsonToDB {
} }
/** /**
* build.json 文件内容写入到数据库 * read build.json file to list
* and then use list transfer SQL and execute it
*/ */
public void doJsonToSql() { public void doJsonToSql() {
// 读取 build.json 文件内容 // 读取 build.json 文件内容
@ -63,6 +64,17 @@ public class LoadBuildJsonToDB {
/** /**
* list data to SQL * list data to SQL
* this method is core logic
* 1. load fields will be insert into database from class with reflection
* 2. iterate list data, and transfer each element to SQL (element's properties mapping to SQL param name and value)
* 3. use param map generate SQL
* 4. exec SQL
* ---------------------
* 这个方法是核心逻辑
* 1.通过反射加载字段将其插入到数据库中
* 2. 迭代列表数据并将每个元素转移到参数集合元素的属性映射到SQL参数名称和值
* 3. 使用参数集合对象生成SQL
* 4. 执行SQL
* @param list data from build.json * @param list data from build.json
*/ */
private void initSql(List<Object> list) { private void initSql(List<Object> list) {