diff --git a/src/main/java/com/hxgk/lowcode/controller/AssociatedFormsController.java b/src/main/java/com/hxgk/lowcode/controller/AssociatedFormsController.java index d5f6c9c..a85d75c 100644 --- a/src/main/java/com/hxgk/lowcode/controller/AssociatedFormsController.java +++ b/src/main/java/com/hxgk/lowcode/controller/AssociatedFormsController.java @@ -15,7 +15,7 @@ import java.util.Map; * 关联表单 * */ @RestController -@RequestMapping("lowCode") +@RequestMapping("/lowCode") public class AssociatedFormsController { @Autowired @@ -24,7 +24,7 @@ public class AssociatedFormsController { private HrService hrService; /*获取用户有权限的启用状态的表单列表树形结构*/ - @RequestMapping(value = "AssociatedForms/getCustomerFormList") + @RequestMapping(value = "/AssociatedForms/getCustomerFormList") public JsonData getCustomerFormList(@RequestHeader(value = "User-Key") String key, @RequestHeader(value = "User-Token") String token) { Tree tree = customerFormService.getCustomerFormList(key, token); @@ -48,7 +48,12 @@ public class AssociatedFormsController { String cfid = requestBody.get("cfid"); Tree tree = customerFormService.getFieldTree(key,token,cfid); - return JsonData.buildSuccess(tree); + if(tree.getId()==null){ + return JsonData.buildError("查无此表单"); + }else{ + return JsonData.buildSuccess(tree); + } + } /*获取系统角色列表*/ diff --git a/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java b/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java index bbe8302..dfd92a9 100644 --- a/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java +++ b/src/main/java/com/hxgk/lowcode/service/impl/CustomerFormServiceImpl.java @@ -203,93 +203,68 @@ public class CustomerFormServiceImpl implements CustomerFormService { ArrayList masterTreeList = new ArrayList<>(); String userKey = key; - String url = "http://172.20.2.87:7777/customer_form/gainTableField"; - + //String url = "http://172.20.2.87:7777/customer_form/gainTableField"; + String url = "http://36.133.126.182:39250/customer_form/gainTableField"; JSONObject param = new JSONObject(); param.put("id", cfid); String post = null; + System.out.println("requestBody:"+param); + System.out.println("userKey:"+userKey); + System.out.println("token:"+token); try { post = HttpUtils.send(url, param, HTTP.UTF_8, userKey, token); + System.out.println("post:"+post.toString()); } catch (IOException e) { e.printStackTrace(); } ObjectMapper objectMapper = new ObjectMapper(); + try { JsonNode jsonNode = objectMapper.readTree(post); - JsonNode data = jsonNode.get("data"); - - tree.setId(cfid); - tree.setLabel(cfid); - ArrayNode masterTableArr = (ArrayNode) data.get("masterTable"); - JsonNode sunTableArrObj = data.get("sunTable"); - - - if(!(sunTableArrObj == null)){ - sunFlag = true; - Iterator it = sunTableArrObj.fieldNames(); - while(it.hasNext()) { - SunTable sunTable = new SunTable(); - String sunTableId = it.next(); - sunTable.setTableid(sunTableId); - ArrayNode masterTableFields = (ArrayNode) sunTableArrObj.get(sunTableId); - ArrayList arr = new ArrayList<>(); - for(int i = 0; i< masterTableFields.size(); i++){ - JsonNode masterTableFieldsItem = masterTableFields.get(i); - FieldBean fieldBean = objectMapper.treeToValue(masterTableFieldsItem, FieldBean.class); - arr.add(fieldBean); + JsonNode msg = jsonNode.get("msg"); + if(msg.toString().contains("成功")){ + JsonNode data = jsonNode.get("data"); + + tree.setId(cfid); + tree.setLabel(cfid); + ArrayNode masterTableArr = (ArrayNode) data.get("masterTable"); + JsonNode sunTableArrObj = data.get("sunTable"); + + + if(!(sunTableArrObj == null)){ + sunFlag = true; + Iterator it = sunTableArrObj.fieldNames(); + while(it.hasNext()) { + SunTable sunTable = new SunTable(); + String sunTableId = it.next(); + sunTable.setTableid(sunTableId); + ArrayNode masterTableFields = (ArrayNode) sunTableArrObj.get(sunTableId); + ArrayList arr = new ArrayList<>(); + for(int i = 0; i< masterTableFields.size(); i++){ + JsonNode masterTableFieldsItem = masterTableFields.get(i); + FieldBean fieldBean = objectMapper.treeToValue(masterTableFieldsItem, FieldBean.class); + arr.add(fieldBean); + } + sunTable.setFieldBeans(arr); + sunTableArrayList.add(sunTable); } - sunTable.setFieldBeans(arr); - sunTableArrayList.add(sunTable); } - } - for(int i = 0; i< masterTableArr.size(); i++){ - JsonNode masterTableArrItem = masterTableArr.get(i); - FieldBean fieldBean = objectMapper.treeToValue(masterTableArrItem, FieldBean.class); - fieldBeanArrayList.add(fieldBean); - } + for(int i = 0; i< masterTableArr.size(); i++){ + JsonNode masterTableArrItem = masterTableArr.get(i); + FieldBean fieldBean = objectMapper.treeToValue(masterTableArrItem, FieldBean.class); + fieldBeanArrayList.add(fieldBean); + } - if(sunFlag){//存在子表单 - for(FieldBean fieldBean:fieldBeanArrayList){ - Tree tree1 = new Tree(); - tree1.setId(tree.getId()+":"+fieldBean.getField()); - if(StringUtils.isBlank(fieldBean.getComment())){ - tree1.setLabel(fieldBean.getField()); - }else{ - tree1.setLabel(fieldBean.getComment()); - } - HashMap map = new HashMap<>(); - map.put("field",fieldBean.getField()); - map.put("type",fieldBean.getType()); - map.put("attribute",fieldBean.getAttribute()); - map.put("collation",fieldBean.getCollation()); - map.put("nullVal",fieldBean.getNullVal()); - map.put("key",fieldBean.getKey()); - map.put("defaultVal",fieldBean.getDefaultVal()); - map.put("extra",fieldBean.getExtra()); - map.put("privileges",fieldBean.getPrivileges()); - map.put("comment",fieldBean.getComment()); - map.put("pattern",fieldBean.getPattern()); - map.put("classify",fieldBean.getClassify()); - tree1.setTreeAttrs(map); - tree1.setParentId(tree.getId()); - masterTreeList.add(tree1); - } - for(SunTable sunTable: sunTableArrayList){ - Tree tree1 = new Tree(); - tree1.setId(tree.getId()+":"+sunTable.getTableid()); - tree1.setParentId(tree.getId()); - tree1.setLabel(sunTable.getTableid()); - ArrayList sunFieldList = new ArrayList<>(); - for(FieldBean fieldBean: sunTable.getFieldBeans()){ - - Tree tree2 = new Tree(); - tree2.setId(tree1.getId()+":"+fieldBean.getField()); + if(sunFlag){//存在子表单 + for(FieldBean fieldBean:fieldBeanArrayList){ + Tree tree1 = new Tree(); + tree1.setId(tree.getId()+":"+fieldBean.getField()); if(StringUtils.isBlank(fieldBean.getComment())){ - tree2.setLabel(fieldBean.getField()); + tree1.setLabel(fieldBean.getField()); }else{ - tree2.setLabel(fieldBean.getComment()); + tree1.setLabel(fieldBean.getComment()); } HashMap map = new HashMap<>(); map.put("field",fieldBean.getField()); @@ -304,45 +279,81 @@ public class CustomerFormServiceImpl implements CustomerFormService { map.put("comment",fieldBean.getComment()); map.put("pattern",fieldBean.getPattern()); map.put("classify",fieldBean.getClassify()); - tree2.setTreeAttrs(map); - tree2.setParentId(tree1.getId()); - sunFieldList.add(tree2); + tree1.setTreeAttrs(map); + tree1.setParentId(tree.getId()); + masterTreeList.add(tree1); + } + for(SunTable sunTable: sunTableArrayList){ + Tree tree1 = new Tree(); + tree1.setId(tree.getId()+":"+sunTable.getTableid()); + tree1.setParentId(tree.getId()); + tree1.setLabel(sunTable.getTableid()); + ArrayList sunFieldList = new ArrayList<>(); + for(FieldBean fieldBean: sunTable.getFieldBeans()){ + + Tree tree2 = new Tree(); + tree2.setId(tree1.getId()+":"+fieldBean.getField()); + if(StringUtils.isBlank(fieldBean.getComment())){ + tree2.setLabel(fieldBean.getField()); + }else{ + tree2.setLabel(fieldBean.getComment()); + } + HashMap map = new HashMap<>(); + map.put("field",fieldBean.getField()); + map.put("type",fieldBean.getType()); + map.put("attribute",fieldBean.getAttribute()); + map.put("collation",fieldBean.getCollation()); + map.put("nullVal",fieldBean.getNullVal()); + map.put("key",fieldBean.getKey()); + map.put("defaultVal",fieldBean.getDefaultVal()); + map.put("extra",fieldBean.getExtra()); + map.put("privileges",fieldBean.getPrivileges()); + map.put("comment",fieldBean.getComment()); + map.put("pattern",fieldBean.getPattern()); + map.put("classify",fieldBean.getClassify()); + tree2.setTreeAttrs(map); + tree2.setParentId(tree1.getId()); + sunFieldList.add(tree2); + } + tree1.setChildren(sunFieldList); + masterTreeList.add(tree1); } - tree1.setChildren(sunFieldList); - masterTreeList.add(tree1); - } - tree.setChildren(masterTreeList); - }else{ - for(FieldBean fieldBean:fieldBeanArrayList){ - Tree tree1 = new Tree(); - tree1.setId(tree.getId()+":"+fieldBean.getField()); - if(StringUtils.isBlank(fieldBean.getComment())){ - tree1.setLabel(fieldBean.getField()); - }else{ - tree1.setLabel(fieldBean.getComment()); + tree.setChildren(masterTreeList); + }else{ + for(FieldBean fieldBean:fieldBeanArrayList){ + Tree tree1 = new Tree(); + tree1.setId(tree.getId()+":"+fieldBean.getField()); + if(StringUtils.isBlank(fieldBean.getComment())){ + tree1.setLabel(fieldBean.getField()); + }else{ + tree1.setLabel(fieldBean.getComment()); + } + HashMap map = new HashMap<>(); + map.put("field",fieldBean.getField()); + map.put("type",fieldBean.getType()); + map.put("attribute",fieldBean.getAttribute()); + map.put("collation",fieldBean.getCollation()); + map.put("nullVal",fieldBean.getNullVal()); + map.put("key",fieldBean.getKey()); + map.put("defaultVal",fieldBean.getDefaultVal()); + map.put("extra",fieldBean.getExtra()); + map.put("privileges",fieldBean.getPrivileges()); + map.put("comment",fieldBean.getComment()); + map.put("pattern",fieldBean.getPattern()); + map.put("classify",fieldBean.getClassify()); + tree1.setTreeAttrs(map); + tree1.setParentId(tree.getId()); + masterTreeList.add(tree1); } - HashMap map = new HashMap<>(); - map.put("field",fieldBean.getField()); - map.put("type",fieldBean.getType()); - map.put("attribute",fieldBean.getAttribute()); - map.put("collation",fieldBean.getCollation()); - map.put("nullVal",fieldBean.getNullVal()); - map.put("key",fieldBean.getKey()); - map.put("defaultVal",fieldBean.getDefaultVal()); - map.put("extra",fieldBean.getExtra()); - map.put("privileges",fieldBean.getPrivileges()); - map.put("comment",fieldBean.getComment()); - map.put("pattern",fieldBean.getPattern()); - map.put("classify",fieldBean.getClassify()); - tree1.setTreeAttrs(map); - tree1.setParentId(tree.getId()); - masterTreeList.add(tree1); + tree.setChildren(masterTreeList); } - tree.setChildren(masterTreeList); + }else{ + } - System.out.println("111"); + + //System.out.println("111"); } catch (JsonProcessingException e) { e.printStackTrace(); } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 69c77e0..c670749 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,3 +1,4 @@ +#本地和内网配置 mybatis: configuration: #开启控制台打印sql diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 84f829d..fc34e56 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -1,7 +1,8 @@ +#外网配置 mybatis: configuration: #开启控制台打印sql - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # mybatis 下划线转驼峰配置,两者都可以 map-underscore-to-camel-case: true #配置扫描 @@ -16,60 +17,23 @@ spring: datasource: dynamic: datasource: - hengxingaoketes: - driver-class-name: com.mysql.cj.jdbc.Driver - password: rjwi58B6zYCHMbGZ - url: jdbc:mysql://127.0.0.1:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: hengxingaoke_tes hrnew: driver-class-name: com.mysql.cj.jdbc.Driver - password: AnknKiXiXaxNrw78 + password: kPMP6NafMsdccxDX + #url: jdbc:mysql://127.0.0.1:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false url: jdbc:mysql://127.0.0.1:3306/hr_new?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/hr_new?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false username: hr_new - leaguetabledata: - driver-class-name: com.mysql.cj.jdbc.Driver - password: e0eb142add - url: jdbc:mysql://127.0.0.1:3306/league_table_data?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/league_table_data?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: league_table_data - learnmessage: - driver-class-name: com.mysql.cj.jdbc.Driver - password: 3bdd844687 - #url: jdbc:mysql://127.0.0.1:3306/learn_message?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - url: jdbc:mysql://172.20.2.87:3306/learn_message?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: learn_message - quesandanswers: - driver-class-name: com.mysql.cj.jdbc.Driver - password: c8caf5d256 - url: jdbc:mysql://127.0.0.1:3306/ques_and_answers?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/ques_and_answers?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: ques_and_answers - readdocument: - driver-class-name: com.mysql.cj.jdbc.Driver - password: f2c943d2ab - url: jdbc:mysql://127.0.0.1:3306/readdocument?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/readdocument?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: readdocument - selftestdatabase: - driver-class-name: com.mysql.cj.jdbc.Driver - password: 6755319456 - url: jdbc:mysql://127.0.0.1:3306/selftestdatabase?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/selftestdatabase?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: selftestdatabase - statisticsing: + tidbintranetappplatform: driver-class-name: com.mysql.cj.jdbc.Driver - password: 19c66cdb65 - url: jdbc:mysql://127.0.0.1:3306/statisticsing?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/statisticsing?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: statisticsing - wrongquestionbank: + password: GJ8m6tXrSDL2SfA2 + #url: jdbc:mysql://127.0.0.1:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false + url: jdbc:mysql://127.0.0.1:3306/app_platform?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false + username: app_platform + systemempower: driver-class-name: com.mysql.cj.jdbc.Driver - password: 7f7ac6c8f5 - url: jdbc:mysql://127.0.0.1:3306/wrong_question_bank?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/wrong_question_bank?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: wrong_question_bank + password: NTYni4L2mfxk5zZZ + url: jdbc:mysql://127.0.0.1:3306/system_empower?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false + username: system_empower #数据源基础配置 druid: # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 @@ -94,7 +58,7 @@ spring: time-between-eviction-runs-millis: 60000 validation-query: 'SELECT 1 FROM DUAL ' #指定默认数据源(必须配置) - primary: hengxingaoketes + primary: tidbintranetappplatform #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. strict: false redis: @@ -107,4 +71,5 @@ spring: max-wait: -1ms min-idle: 0 port: 6379 + #password: Redis+brngJ3U19@8_Z2^7a timeout: 10000 diff --git a/src/main/resources/application-prodout.yml b/src/main/resources/application-prodout.yml deleted file mode 100644 index 6d39809..0000000 --- a/src/main/resources/application-prodout.yml +++ /dev/null @@ -1,111 +0,0 @@ -mybatis: - configuration: - #开启控制台打印sql - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - # mybatis 下划线转驼峰配置,两者都可以 - map-underscore-to-camel-case: true - #配置扫描 - mapper-locations: classpath:mapper/*.xml - #配置xml的结果别名 - type-aliases-package: com.hxgk.zxxy.model.entity -spring: - autoconfigure: - #去除durid配置 - exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure - #MySQL druid多数据源配置(纯粹多库) - datasource: - dynamic: - datasource: - hengxingaoketes: - driver-class-name: com.mysql.cj.jdbc.Driver - password: JsTt6iTpkZ85wDnF - url: jdbc:mysql://127.0.0.1:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://127.0.0.1:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/hengxingaoke_tes?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: hengxingaoke_tes - hrnew: - driver-class-name: com.mysql.cj.jdbc.Driver - password: AnknKiXiXaxNrw78 - url: jdbc:mysql://120.224.6.6:6666/hr_new?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/hr_new?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: hr_new - leaguetabledata: - driver-class-name: com.mysql.cj.jdbc.Driver - password: e0eb142add - url: jdbc:mysql://120.224.6.6:6666/league_table_data?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/league_table_data?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: league_table_data - learnmessage: - driver-class-name: com.mysql.cj.jdbc.Driver - password: 3bdd844687 - #url: jdbc:mysql://127.0.0.1:3306/learn_message?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - url: jdbc:mysql://120.224.6.6:6666/learn_message?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: learn_message - quesandanswers: - driver-class-name: com.mysql.cj.jdbc.Driver - password: c8caf5d256 - url: jdbc:mysql://120.224.6.6:6666/ques_and_answers?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/ques_and_answers?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: ques_and_answers - readdocument: - driver-class-name: com.mysql.cj.jdbc.Driver - password: CY2yanCmAP8p8bxj - url: jdbc:mysql://127.0.0.1:3306/readdocument?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/readdocument?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: readdocument - selftestdatabase: - driver-class-name: com.mysql.cj.jdbc.Driver - password: 6755319456 - url: jdbc:mysql://120.224.6.6:6666/selftestdatabase?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/selftestdatabase?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: selftestdatabase - statisticsing: - driver-class-name: com.mysql.cj.jdbc.Driver - password: 19c66cdb65 - url: jdbc:mysql://120.224.6.6:6666/statisticsing?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/statisticsing?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: statisticsing - wrongquestionbank: - driver-class-name: com.mysql.cj.jdbc.Driver - password: 7f7ac6c8f5 - url: jdbc:mysql://120.224.6.6:6666/wrong_question_bank?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - #url: jdbc:mysql://172.20.2.87:3306/wrong_question_bank?allowPublicKeyRetrieval=true&uuseUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false - username: wrong_question_bank - #数据源基础配置 - druid: - # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 - # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 - filters: stat,wall - initial-size: 5 - max-active: 20 - #指定每个连接上PSCache的大小 - max-pool-prepared-statement-per-connection-size: 20 - # 配置获取连接等待超时的时间 - max-wait: 6000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - min-evictable-idle-time-millis: 300000 - min-idle: 5 - # 打开PSCache - pool-prepared-statements: true - test-on-borrow: false - test-on-return: false - test-while-idle: true - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - time-between-eviction-runs-millis: 60000 - validation-query: 'SELECT 1 FROM DUAL ' - #指定默认数据源(必须配置) - primary: hengxingaoketes - #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. - strict: false - redis: - database: 5 - host: 127.0.0.1 - lettuce: - pool: - max-active: 10 - max-idle: 10 - max-wait: -1ms - min-idle: 0 - port: 6379 - timeout: 10000 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 750a6e2..46a943a 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,6 @@ spring: profiles: - active: dev + active: prod server: - port: 8112 \ No newline at end of file + #port: 8112 + port: 39999 \ No newline at end of file