From cd02923a7ce1ffa004b3abbb7af67ab6173dd99d Mon Sep 17 00:00:00 2001 From: zf <1603559716@qq.com> Date: 星期一, 25 三月 2024 10:59:40 +0800 Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/safePlatform-out into zf --- safePlatfrom-out-web/src/main/resources/config/application-uat.yaml | 34 + equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java | 177 +++++---- safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/security/TokenAuthenticationFilter.java | 128 +++---- safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataCourceProperties.java | 151 ++++++++ safePlatfrom-out-web/src/main/resources/config/application-dev.yaml | 34 + safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigIncidentManage.java | 10 incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java | 32 safePlatfrom-out-web/src/main/resources/config/application-out-dev.yaml | 34 + safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java | 10 pom.xml | 10 safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataSourceConfig.java | 16 safePlatfrom-out-web/src/main/resources/config/application-online-uat.yaml | 34 + safePlatfrom-out-web/src/main/resources/config/application-guotai-prod.yaml | 165 +++++++++ safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DruidConfig.java | 106 ++--- safePlatfrom-out-web/src/main/resources/config/application.yaml | 4 incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentCaseInfoMapper.xml | 6 safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEmergency.java | 14 safePlatfrom-out-web/src/main/resources/config/application-guotai-prod-1.yaml | 40 + safePlatfrom-out-web/src/main/resources/config/application-test.yaml | 34 + safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEquipment.java | 10 20 files changed, 724 insertions(+), 325 deletions(-) diff --git a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java index 9ce8518..436069c 100644 --- a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java +++ b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java @@ -261,45 +261,55 @@ //保存设备保养 List<EquipmentTakecareDetail> takecareDetailList = infoDto.getTakecareDetailList(); - takecareDetailList.forEach(f->{ - f.setEquipmentId(equipmentInfo.getId()); - f.setInfoTpe(equipmentInfo.getInfoType()); - }); - equipmentTakecareDetailBaseService.saveOrUpdateBatch(takecareDetailList); - if(StringUtils.hasText(infoDto.getDelTakecareDetails())){ - List<Long> idList = Arrays.stream(infoDto.getDelTakecareDetails().split(",")).map(s-> Long.parseLong(s.trim())) - .collect(Collectors.toList()); - - List<EquipmentTakecareDetail> delList = new ArrayList<>(); - idList.forEach(f->{ - EquipmentTakecareDetail info = new EquipmentTakecareDetail(); - info.setDelFlag(1); - info.setId(f); - delList.add(info); + if(takecareDetailList != null && !takecareDetailList.isEmpty()){ + takecareDetailList.forEach(f->{ + f.setEquipmentId(equipmentInfo.getId()); + f.setInfoTpe(equipmentInfo.getInfoType()); }); - equipmentTakecareDetailBaseService.updateBatchById(delList); + equipmentTakecareDetailBaseService.saveOrUpdateBatch(takecareDetailList); + } + if(infoDto.getTakecareDetailList() != null){ + if(StringUtils.hasText(infoDto.getDelTakecareDetails())){ + List<Long> idList = Arrays.stream(infoDto.getDelTakecareDetails().split(",")).map(s-> Long.parseLong(s.trim())) + .collect(Collectors.toList()); + + if(idList != null && !idList.isEmpty()){ + List<EquipmentTakecareDetail> delList = new ArrayList<>(); + idList.forEach(f->{ + EquipmentTakecareDetail info = new EquipmentTakecareDetail(); + info.setDelFlag(1); + info.setId(f); + delList.add(info); + }); + equipmentTakecareDetailBaseService.updateBatchById(delList); + } + } } //保存设备检测 List<EquipmentTestDetail> testDetailList = infoDto.getTestDetailList(); - testDetailList.forEach(f->{ - f.setEquipmentId(equipmentInfo.getId()); - f.setInfoTpe(equipmentInfo.getInfoType()); - }); - equipmentTestDetailBaseService.saveOrUpdateBatch(testDetailList); - if(StringUtils.hasText(infoDto.getDelTestDetails())){ - List<Long> idList = Arrays.stream(infoDto.getDelTestDetails().split(",")).map(s-> Long.parseLong(s.trim())) - .collect(Collectors.toList()); - List<EquipmentTestDetail> delList = new ArrayList<>(); - idList.forEach(f->{ - EquipmentTestDetail info = new EquipmentTestDetail(); - info.setDelFlag(1); - info.setId(f); - delList.add(info); + if(testDetailList != null && !testDetailList.isEmpty()){ + testDetailList.forEach(f->{ + f.setEquipmentId(equipmentInfo.getId()); + f.setInfoTpe(equipmentInfo.getInfoType()); }); - equipmentTestDetailBaseService.updateBatchById(delList); + equipmentTestDetailBaseService.saveOrUpdateBatch(testDetailList); + } + if(infoDto.getDelTestDetails() != null && !infoDto.getDelTestDetails().isEmpty()){ + if(StringUtils.hasText(infoDto.getDelTestDetails())){ + List<Long> idList = Arrays.stream(infoDto.getDelTestDetails().split(",")).map(s-> Long.parseLong(s.trim())) + .collect(Collectors.toList()); + List<EquipmentTestDetail> delList = new ArrayList<>(); + idList.forEach(f->{ + EquipmentTestDetail info = new EquipmentTestDetail(); + info.setDelFlag(1); + info.setId(f); + delList.add(info); + }); + equipmentTestDetailBaseService.updateBatchById(delList); + } } //设备检查 TODO @@ -307,64 +317,77 @@ //保存设备维修 List<EquipmentRepairDetail> repaireDetailList = infoDto.getRepaireDetailList(); - repaireDetailList.forEach(f->{ - f.setEquipmentId(equipmentInfo.getId()); - f.setInfoTpe(equipmentInfo.getInfoType()); - }); - equipmentRepairDetailBaseService.saveOrUpdateBatch(repaireDetailList); - if(StringUtils.hasText(infoDto.getDelRepaireDetails())){ - List<Long> idList = Arrays.stream(infoDto.getDelRepaireDetails().split(",")).map(s-> Long.parseLong(s.trim())) - .collect(Collectors.toList()); - List<EquipmentRepairDetail> delList = new ArrayList<>(); - idList.forEach(f->{ - EquipmentRepairDetail info = new EquipmentRepairDetail(); - info.setDelFlag(1); - info.setId(f); - delList.add(info); + if(repaireDetailList != null && !repaireDetailList.isEmpty()){ + repaireDetailList.forEach(f->{ + f.setEquipmentId(equipmentInfo.getId()); + f.setInfoTpe(equipmentInfo.getInfoType()); }); - equipmentRepairDetailBaseService.updateBatchById(delList); + equipmentRepairDetailBaseService.saveOrUpdateBatch(repaireDetailList); } + if(infoDto.getDelRepaireDetails() != null && !infoDto.getDelRepaireDetails().isEmpty()){ + if(StringUtils.hasText(infoDto.getDelRepaireDetails())){ + List<Long> idList = Arrays.stream(infoDto.getDelRepaireDetails().split(",")).map(s-> Long.parseLong(s.trim())) + .collect(Collectors.toList()); + List<EquipmentRepairDetail> delList = new ArrayList<>(); + idList.forEach(f->{ + EquipmentRepairDetail info = new EquipmentRepairDetail(); + info.setDelFlag(1); + info.setId(f); + delList.add(info); + }); + equipmentRepairDetailBaseService.updateBatchById(delList); + } + } + //保存检查标准 List<EquipmentCheckStandardDetail> checkStandardeDetailList = infoDto.getCheckStandardeDetailList(); - checkStandardeDetailList.forEach(f->{ - f.setEquipmentId(equipmentInfo.getId()); - f.setInfoTpe(equipmentInfo.getInfoType()); - }); - equipmentCheckStandardDetailBaseService.saveOrUpdateBatch(checkStandardeDetailList); - if(StringUtils.hasText(infoDto.getDelCheckStandardeDetails())){ - List<Long> idList = Arrays.stream(infoDto.getDelCheckStandardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) - .collect(Collectors.toList()); - List<EquipmentCheckStandardDetail> delList = new ArrayList<>(); - idList.forEach(f->{ - EquipmentCheckStandardDetail info = new EquipmentCheckStandardDetail(); - info.setDelFlag(1); - info.setId(f); - delList.add(info); + if(checkStandardeDetailList != null && !checkStandardeDetailList.isEmpty()){ + checkStandardeDetailList.forEach(f->{ + f.setEquipmentId(equipmentInfo.getId()); + f.setInfoTpe(equipmentInfo.getInfoType()); }); - equipmentCheckStandardDetailBaseService.updateBatchById(delList); + equipmentCheckStandardDetailBaseService.saveOrUpdateBatch(checkStandardeDetailList); } + if(infoDto.getDelCheckStandardeDetails() != null && !infoDto.getDelCheckStandardeDetails().isEmpty()){ + if(StringUtils.hasText(infoDto.getDelCheckStandardeDetails())){ + List<Long> idList = Arrays.stream(infoDto.getDelCheckStandardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) + .collect(Collectors.toList()); + List<EquipmentCheckStandardDetail> delList = new ArrayList<>(); + idList.forEach(f->{ + EquipmentCheckStandardDetail info = new EquipmentCheckStandardDetail(); + info.setDelFlag(1); + info.setId(f); + delList.add(info); + }); + equipmentCheckStandardDetailBaseService.updateBatchById(delList); + } + } + //保存保养标准 List<EquipmentTakecareStardardDetail> takecareStardardeDetailList = infoDto.getTakecareStardardeDetailList(); - takecareStardardeDetailList.forEach(f->{ - f.setEquipmentId(equipmentInfo.getId()); - f.setInfoTpe(equipmentInfo.getInfoType()); - }); - equipmentTakecareStardardDetailBaseService.saveOrUpdateBatch(takecareStardardeDetailList); - if(StringUtils.hasText(infoDto.getDelTakecareStardardeDetails())){ - List<Long> idList = Arrays.stream(infoDto.getDelTakecareStardardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) - .collect(Collectors.toList()); - List<EquipmentTakecareStardardDetail> delList = new ArrayList<>(); - idList.forEach(f->{ - EquipmentTakecareStardardDetail info = new EquipmentTakecareStardardDetail(); - info.setDelFlag(1); - info.setId(f); - delList.add(info); + if(takecareStardardeDetailList != null && !takecareStardardeDetailList.isEmpty()){ + takecareStardardeDetailList.forEach(f->{ + f.setEquipmentId(equipmentInfo.getId()); + f.setInfoTpe(equipmentInfo.getInfoType()); }); - equipmentTakecareStardardDetailBaseService.updateBatchById(delList); + equipmentTakecareStardardDetailBaseService.saveOrUpdateBatch(takecareStardardeDetailList); } - + if(infoDto.getDelTakecareStardardeDetails() != null && !infoDto.getDelTakecareStardardeDetails().isEmpty()){ + if(StringUtils.hasText(infoDto.getDelTakecareStardardeDetails())){ + List<Long> idList = Arrays.stream(infoDto.getDelTakecareStardardeDetails().split(",")).map(s-> Long.parseLong(s.trim())) + .collect(Collectors.toList()); + List<EquipmentTakecareStardardDetail> delList = new ArrayList<>(); + idList.forEach(f->{ + EquipmentTakecareStardardDetail info = new EquipmentTakecareStardardDetail(); + info.setDelFlag(1); + info.setId(f); + delList.add(info); + }); + equipmentTakecareStardardDetailBaseService.updateBatchById(delList); + } + } } diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java index 07305fb..20f7160 100644 --- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java +++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java @@ -182,7 +182,7 @@ } } - private void updateAccidentExpressFile(Long uid, Long accidentExpressId, Date nowDate, List<AccidentExpressFileReqDTO> AccidentExpressFileReqDTOList) { + private void updateAccidentExpressFile(Long uid, Long accidentExpressId, Date nowDate, List<AccidentExpressFileReqDTO> accidentExpressFileReqDTOList) { List<AccidentExpressFileInfoDO> accidentExpressFileInfoDOList = accidentExpressFileInfoService.selectByAccidentExpressId(accidentExpressId); List<Long> oldIdsList = accidentExpressFileInfoDOList.stream().map(AccidentExpressFileInfoDO::getId).collect(Collectors.toList()); @@ -192,20 +192,22 @@ List<AccidentExpressFileInfo> addList = new ArrayList<>(); //删除的附件集合(id) List<Long> deleteList = new ArrayList<>(); - for (AccidentExpressFileReqDTO AccidentExpressFileReqDTO : AccidentExpressFileReqDTOList) { - //如果不存在id则表示页面新增的附件 - if (AccidentExpressFileReqDTO.getId() == null) { - AccidentExpressFileInfo AccidentExpressFileInfo = new AccidentExpressFileInfo(); - BeanUtils.copyProperties(AccidentExpressFileReqDTO, AccidentExpressFileInfo); - AccidentExpressFileInfo.setDelFlag(false); - AccidentExpressFileInfo.setGmtCreate(nowDate); - AccidentExpressFileInfo.setCreateUid(uid); - AccidentExpressFileInfo.setAccidentExpressId(accidentExpressId); - addList.add(AccidentExpressFileInfo); - } - //如果存在id则判断页面是否删除 - else { - newIdsList.add(AccidentExpressFileReqDTO.getId()); + if(accidentExpressFileReqDTOList != null && !accidentExpressFileInfoDOList.isEmpty()){ + for (AccidentExpressFileReqDTO accidentExpressFileReqDTO : accidentExpressFileReqDTOList) { + //如果不存在id则表示页面新增的附件 + if (accidentExpressFileReqDTO.getId() == null) { + AccidentExpressFileInfo accidentExpressFileInfo = new AccidentExpressFileInfo(); + BeanUtils.copyProperties(accidentExpressFileReqDTO, accidentExpressFileInfo); + accidentExpressFileInfo.setDelFlag(false); + accidentExpressFileInfo.setGmtCreate(nowDate); + accidentExpressFileInfo.setCreateUid(uid); + accidentExpressFileInfo.setAccidentExpressId(accidentExpressId); + addList.add(accidentExpressFileInfo); + } + //如果存在id则判断页面是否删除 + else { + newIdsList.add(accidentExpressFileReqDTO.getId()); + } } } for (Long oldId : oldIdsList) { diff --git a/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentCaseInfoMapper.xml b/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentCaseInfoMapper.xml index 3e6d2ea..519f9b6 100644 --- a/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentCaseInfoMapper.xml +++ b/incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentCaseInfoMapper.xml @@ -23,7 +23,7 @@ <insert id="addAccidentCase" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentCaseInfo" keyProperty="id" useGeneratedKeys="true"> - insert into accident_Case + insert into accident_case <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null ">id,</if> <if test="delFlag != null ">del_flag,</if> @@ -67,7 +67,7 @@ </select> <update id="updateAccidentCase" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentCaseInfo"> - update accident_Case + update accident_case <trim prefix="SET" suffixOverrides=","> <if test="gmtModitify != null ">gmt_moditify = #{gmtModitify},</if> <if test="updateUid != null ">update_uid = #{updateUid},</if> @@ -80,7 +80,7 @@ </update> <update id="deleteAccidentCaseById"> - update accident_Case set del_flag = 1 where id = #{id} + update accident_case set del_flag = 1 where id = #{id} </update> </mapper> diff --git a/pom.xml b/pom.xml index 7bdf112..5c7efab 100644 --- a/pom.xml +++ b/pom.xml @@ -231,11 +231,11 @@ <version>1.9.9.1</version> <!-- <scope>runtime</scope>--> </dependency> - <dependency> - <groupId>com.alibaba</groupId> - <artifactId>druid-spring-boot-starter</artifactId> - <version>1.2.9</version> - </dependency> +<!-- <dependency>--> +<!-- <groupId>com.alibaba</groupId>--> +<!-- <artifactId>druid-spring-boot-starter</artifactId>--> +<!-- <version>1.2.9</version>--> +<!-- </dependency>--> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataCourceProperties.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataCourceProperties.java new file mode 100644 index 0000000..0e9beb4 --- /dev/null +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataCourceProperties.java @@ -0,0 +1,151 @@ +package com.gkhy.safePlatform.config.database; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConfigurationProperties(prefix = "spring.datasource") +public class DataCourceProperties { + + private Prop emergency; + + private Prop goalmanage; + + private Prop incidentmanage; + + private Prop equipment; + + public Prop getEmergency() { + return emergency; + } + + public void setEmergency(Prop emergency) { + this.emergency = emergency; + } + + public Prop getGoalmanage() { + return goalmanage; + } + + public void setGoalmanage(Prop goalmanage) { + this.goalmanage = goalmanage; + } + + public Prop getIncidentmanage() { + return incidentmanage; + } + + public void setIncidentmanage(Prop incidentmanage) { + this.incidentmanage = incidentmanage; + } + + public Prop getEquipment() { + return equipment; + } + + public void setEquipment(Prop equipment) { + this.equipment = equipment; + } + + public static class Prop{ + + private String url; + + private String username; + + private String password; + private Integer initialSize; + + private Integer minIdle; + + private Integer maxActive; + + private Integer maxWait; + + private String validationQuery; + + private Integer validationQueryTimeout; + + private Boolean testWhileIdle; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getInitialSize() { + return initialSize; + } + + public void setInitialSize(Integer initialSize) { + this.initialSize = initialSize; + } + + public Integer getMinIdle() { + return minIdle; + } + + public void setMinIdle(Integer minIdle) { + this.minIdle = minIdle; + } + + public Integer getMaxActive() { + return maxActive; + } + + public void setMaxActive(Integer maxActive) { + this.maxActive = maxActive; + } + + public Integer getMaxWait() { + return maxWait; + } + + public void setMaxWait(Integer maxWait) { + this.maxWait = maxWait; + } + + public String getValidationQuery() { + return validationQuery; + } + + public void setValidationQuery(String validationQuery) { + this.validationQuery = validationQuery; + } + + public Integer getValidationQueryTimeout() { + return validationQueryTimeout; + } + + public void setValidationQueryTimeout(Integer validationQueryTimeout) { + this.validationQueryTimeout = validationQueryTimeout; + } + + public Boolean getTestWhileIdle() { + return testWhileIdle; + } + + public void setTestWhileIdle(Boolean testWhileIdle) { + this.testWhileIdle = testWhileIdle; + } + } +} diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataSourceConfig.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataSourceConfig.java index 396299d..8fe78c9 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataSourceConfig.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DataSourceConfig.java @@ -1,6 +1,5 @@ package com.gkhy.safePlatform.config.database; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; @@ -14,21 +13,6 @@ @Configuration public class DataSourceConfig { - -// @Bean -// @ConfigurationProperties("spring.datasource.goalmanage") -// DataSource dsGoalManage(){ -// return DruidDataSourceBuilder.create().build(); -// } -// -// @Bean -// @ConfigurationProperties("spring.datasource.emergency") -// DataSource dsEmergency(){ -// return DruidDataSourceBuilder.create().build(); -// } - - - /** * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除) diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DruidConfig.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DruidConfig.java index 4b7e3c5..3dca8bb 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DruidConfig.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DruidConfig.java @@ -1,12 +1,8 @@ package com.gkhy.safePlatform.config.database; -import com.alibaba.druid.filter.stat.StatFilter; -import com.alibaba.druid.support.http.StatViewServlet; -import com.alibaba.druid.support.http.WebStatFilter; -import com.alibaba.druid.wall.WallConfig; -import com.alibaba.druid.wall.WallFilter; import com.atomikos.icatch.jta.UserTransactionImp; import com.atomikos.icatch.jta.UserTransactionManager; +import com.mysql.cj.jdbc.MysqlXADataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.jta.atomikos.AtomikosDataSourceBean; @@ -32,24 +28,29 @@ @Configuration public class DruidConfig { - @Value("${spring.datasource.type}") - private String datasourceClass; + @Autowired + private DataCourceProperties dataCourceProperties; @Bean(name = "dsGoalManage") @Primary @Autowired public DataSource dsGoalManage(Environment env) { - AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + final MysqlXADataSource mysqlXADataSource = new MysqlXADataSource(); Properties prop = build(env, "spring.datasource.goalmanage."); -// ds.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource"); - ds.setXaDataSourceClassName(datasourceClass); + mysqlXADataSource.setUrl(dataCourceProperties.getGoalmanage().getUrl()); + mysqlXADataSource.setUser(dataCourceProperties.getGoalmanage().getUsername()); + mysqlXADataSource.setPassword(dataCourceProperties.getGoalmanage().getPassword()); + final AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + ds.setXaDataSource(mysqlXADataSource); ds.setUniqueResourceName("goalmanage"); - ds.setPoolSize(2); + ds.setPoolSize(dataCourceProperties.getGoalmanage().getInitialSize()); + ds.setMinPoolSize(dataCourceProperties.getGoalmanage().getMinIdle()); + ds.setMaxPoolSize(dataCourceProperties.getGoalmanage().getMaxActive()); ds.setXaProperties(prop); ds.setMaxIdleTime(3600); ds.setMaxLifetime(3000); + ds.setTestQuery(dataCourceProperties.getGoalmanage().getValidationQuery()); return ds; - } @@ -57,15 +58,21 @@ @Primary @Bean(name = "dsEmergency") public AtomikosDataSourceBean dsEmergency(Environment env) { - AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + final MysqlXADataSource mysqlXADataSource = new MysqlXADataSource(); Properties prop = build(env, "spring.datasource.emergency."); -// ds.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource"); - ds.setXaDataSourceClassName(datasourceClass); + mysqlXADataSource.setUrl(dataCourceProperties.getEmergency().getUrl()); + mysqlXADataSource.setUser(dataCourceProperties.getEmergency().getUsername()); + mysqlXADataSource.setPassword(dataCourceProperties.getEmergency().getPassword()); + final AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + ds.setXaDataSource(mysqlXADataSource); ds.setUniqueResourceName("emergency"); - ds.setPoolSize(2); + ds.setPoolSize(dataCourceProperties.getEmergency().getInitialSize()); + ds.setMinPoolSize(dataCourceProperties.getEmergency().getMinIdle()); + ds.setMaxPoolSize(dataCourceProperties.getEmergency().getMaxActive()); ds.setXaProperties(prop); ds.setMaxIdleTime(3600); ds.setMaxLifetime(3000); + ds.setTestQuery(dataCourceProperties.getEmergency().getValidationQuery()); return ds; } @@ -73,15 +80,21 @@ @Primary @Bean(name = "dsIncidentManage") public AtomikosDataSourceBean dsIncidentManage(Environment env) { - AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + final MysqlXADataSource mysqlXADataSource = new MysqlXADataSource(); Properties prop = build(env, "spring.datasource.incidentmanage."); - ds.setXaDataSourceClassName(datasourceClass); -// ds.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource"); + mysqlXADataSource.setUrl(dataCourceProperties.getIncidentmanage().getUrl()); + mysqlXADataSource.setUser(dataCourceProperties.getIncidentmanage().getUsername()); + mysqlXADataSource.setPassword(dataCourceProperties.getIncidentmanage().getPassword()); + final AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + ds.setXaDataSource(mysqlXADataSource); ds.setUniqueResourceName("incidentmanage"); - ds.setPoolSize(2); + ds.setPoolSize(dataCourceProperties.getIncidentmanage().getInitialSize()); + ds.setMinPoolSize(dataCourceProperties.getIncidentmanage().getMinIdle()); + ds.setMaxPoolSize(dataCourceProperties.getIncidentmanage().getMaxActive()); ds.setXaProperties(prop); ds.setMaxIdleTime(3600); ds.setMaxLifetime(3000); + ds.setTestQuery(dataCourceProperties.getIncidentmanage().getValidationQuery()); return ds; } @@ -89,15 +102,21 @@ @Primary @Bean(name = "dsEquipment") public AtomikosDataSourceBean dsEquipment(Environment env) { - AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + final MysqlXADataSource mysqlXADataSource = new MysqlXADataSource(); Properties prop = build(env, "spring.datasource.equipment."); - ds.setXaDataSourceClassName(datasourceClass); -// ds.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource"); + mysqlXADataSource.setUrl(dataCourceProperties.getEquipment().getUrl()); + mysqlXADataSource.setUser(dataCourceProperties.getEquipment().getUsername()); + mysqlXADataSource.setPassword(dataCourceProperties.getEquipment().getPassword()); + final AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); + ds.setXaDataSource(mysqlXADataSource); ds.setUniqueResourceName("equipment"); - ds.setPoolSize(2); + ds.setPoolSize(dataCourceProperties.getEquipment().getInitialSize()); + ds.setMinPoolSize(dataCourceProperties.getEquipment().getMinIdle()); + ds.setMaxPoolSize(dataCourceProperties.getEquipment().getMaxActive()); ds.setXaProperties(prop); ds.setMaxIdleTime(3600); ds.setMaxLifetime(3000); + ds.setTestQuery(dataCourceProperties.getEquipment().getValidationQuery()); return ds; } @@ -143,45 +162,6 @@ // prop.put("filters", env.getProperty(prefix + "filters")); return prop; - } - -// @Bean - public ServletRegistrationBean druidServlet() { - ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*"); - - //控制台管理用户,加入下面2行 进入druid后台就需要登录 - //servletRegistrationBean.addInitParameter("loginUsername", "admin"); - //servletRegistrationBean.addInitParameter("loginPassword", "admin"); - return servletRegistrationBean; - } - -// @Bean - public FilterRegistrationBean filterRegistrationBean() { - FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); - filterRegistrationBean.setFilter(new WebStatFilter()); - filterRegistrationBean.addUrlPatterns("/*"); - filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"); - filterRegistrationBean.addInitParameter("profileEnable", "true"); - return filterRegistrationBean; - } - -// @Bean - public StatFilter statFilter(){ - StatFilter statFilter = new StatFilter(); - statFilter.setLogSlowSql(true); //slowSqlMillis用来配置SQL慢的标准,执行时间超过slowSqlMillis的就是慢。 - statFilter.setMergeSql(true); //SQL合并配置 - statFilter.setSlowSqlMillis(1000);//slowSqlMillis的缺省值为3000,也就是3秒。 - return statFilter; - } - -// @Bean - public WallFilter wallFilter(){ - WallFilter wallFilter = new WallFilter(); - //允许执行多条SQL - WallConfig config = new WallConfig(); - config.setMultiStatementAllow(true); - wallFilter.setConfig(config); - return wallFilter; } } diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEmergency.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEmergency.java index 05ae1c5..2173896 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEmergency.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEmergency.java @@ -1,7 +1,5 @@ package com.gkhy.safePlatform.config.database; -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; import org.apache.ibatis.plugin.Interceptor; @@ -37,14 +35,8 @@ @Autowired private MybatisPlusInterceptor mybatisPlusInterceptor; - @Bean(name = "dataSourceEmergency") - @ConfigurationProperties(prefix = "spring.datasource.emergency") - public DruidDataSource dataSourceDoublePrevent(){ - return DruidDataSourceBuilder.create().build(); - } - @Bean(name = "sqlSessionFactoryEmergency") - public SqlSessionFactory sqlSessionFactoryEmergency(@Qualifier("dataSourceEmergency") DruidDataSource dataSource) throws Exception { + public SqlSessionFactory sqlSessionFactoryEmergency() throws Exception { MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean(); factoryBean.setDataSource(dsEmergency); ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); @@ -56,7 +48,7 @@ } @Bean - public SqlSessionTemplate sqlSessionTemplateEmergency(@Qualifier("sqlSessionFactoryEmergency") SqlSessionFactory sqlSessionFactory){ - return new SqlSessionTemplate(sqlSessionFactory); + public SqlSessionTemplate sqlSessionTemplateEmergency() throws Exception { + return new SqlSessionTemplate(sqlSessionFactoryEmergency()); } } diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEquipment.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEquipment.java index c58fb65..fb2e985 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEquipment.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEquipment.java @@ -1,7 +1,5 @@ package com.gkhy.safePlatform.config.database; -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; import com.baomidou.mybatisplus.core.config.GlobalConfig; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; @@ -37,14 +35,8 @@ @Autowired private MybatisPlusInterceptor mybatisPlusInterceptor; - @Bean(name = "datasourceEquipment") - @ConfigurationProperties(prefix = "spring.datasource.equipment") - public DruidDataSource druidDataSourceA(){ - return DruidDataSourceBuilder.create().build(); - } - @Bean(name = "sqlFactoryEquipment") - public SqlSessionFactory sqlSessionFactory(@Qualifier("datasourceEquipment") DruidDataSource dataSource) + public SqlSessionFactory sqlSessionFactory() throws Exception { MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean(); diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java index eebd824..e2bef6c 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigGoalManage.java @@ -1,7 +1,5 @@ package com.gkhy.safePlatform.config.database; -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; import org.apache.ibatis.plugin.Interceptor; @@ -35,14 +33,8 @@ @Autowired private MybatisPlusInterceptor mybatisPlusInterceptor; - @Bean(name = "dataSourceGoalManage") - @ConfigurationProperties(prefix = "spring.datasource.goalmanage") - public DruidDataSource dataSourceGoalManage(){ - return DruidDataSourceBuilder.create().build(); - } - @Bean(name = "sqlFactoryGoalManage") - public SqlSessionFactory sqlSessionFactory(@Qualifier("dataSourceGoalManage") DruidDataSource dataSource) + public SqlSessionFactory sqlSessionFactory() throws Exception { MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean(); diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigIncidentManage.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigIncidentManage.java index 73504d4..35ff18d 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigIncidentManage.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigIncidentManage.java @@ -1,7 +1,5 @@ package com.gkhy.safePlatform.config.database; -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; import org.apache.ibatis.plugin.Interceptor; @@ -35,14 +33,8 @@ @Autowired private MybatisPlusInterceptor mybatisPlusInterceptor; - @Bean(name = "dataSourceIncidentManage") - @ConfigurationProperties(prefix = "spring.datasource.incidentmanage") - public DruidDataSource dataSourceIncidentManage(){ - return DruidDataSourceBuilder.create().build(); - } - @Bean(name = "sqlFactoryIncidentManage") - public SqlSessionFactory sqlSessionFactory(@Qualifier("dataSourceIncidentManage") DruidDataSource dataSource) + public SqlSessionFactory sqlSessionFactory() throws Exception { MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean(); diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/security/TokenAuthenticationFilter.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/security/TokenAuthenticationFilter.java index 1316c2a..9a880a9 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/security/TokenAuthenticationFilter.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/security/TokenAuthenticationFilter.java @@ -10,6 +10,7 @@ import com.gkhy.safePlatform.commons.enums.ResultCodes; import com.gkhy.safePlatform.commons.exception.BusinessException; import com.gkhy.safePlatform.commons.utils.RPCUtils; +import com.gkhy.safePlatform.commons.utils.RequestContextHolder; import com.gkhy.safePlatform.commons.utils.StringUtils; import com.gkhy.safePlatform.commons.vo.ResultVO; import com.gkhy.safePlatform.config.redis.RedisUtils; @@ -29,6 +30,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** @@ -68,97 +70,77 @@ private UsernamePasswordAuthenticationToken getAuthentication(HttpServletRequest req,HttpServletResponse resp) { // header获取token String authToken = req.getHeader(tokenConfig.getHeader()); - String loginUserId = req.getHeader(tokenConfig.getLoginUserHeader()); - if(authToken != null) { - // header 传入 userId - if (StringUtils.isBlank(loginUserId)) { - throw new BusinessException(ResultCodes.CLIENT_CREDENTIALS_LACK); - } // 登录成功时,会将权限数据存入redis // 这里是验证获取权限信息 // 1.从redis中获取对应该用户的权限信息 - String accessTokenKey = RedisKeyEnum.authKey(RedisKeyEnum.AUTH_TOKEN, loginUserId); + String accessTokenKey = RedisKeyEnum.authKey(RedisKeyEnum.AUTH_TOKEN, authToken); Object o = redisUtils.get(accessTokenKey); // 2.token是否存在 if (o == null) { - // 是否存在 + // 是否存在 uid未登录 throw new BusinessException(ResultCodes.CLIENT_CREDENTIALS_TOKEN_INVALID); }else{ - Long userId = Long.valueOf(loginUserId); - ContextCacheUser contextCacheUser = JSONObject.parseObject(o.toString(), ContextCacheUser.class); - assert userId.equals(contextCacheUser.getUid()); - if ( !authToken.equals(contextCacheUser.getAccessToken())) { - throw new BusinessException(ResultCodes.CLIENT_CREDENTIALS_TOKEN_INVALID); + // todo 可以不转换,建议rpc传入string + String uid = o.toString(); + Long userId = Long.valueOf(uid); + String accessUserKey = RedisKeyEnum.authKey(RedisKeyEnum.AUTH_USER, userId); + // 这里不做用户信息的token判断 放入登录 + Long expireSecondsLeft = redisUtils.getExpireTime(accessTokenKey); + // 60m 内请求则续期 时长为原本的有效时间 + if (expireSecondsLeft != null && 0L < expireSecondsLeft && expireSecondsLeft < 60 * 60) { + // 重置token:uid + redisUtils.resetKeyExpireTime(accessTokenKey, tokenConfig.getExpiration()); + // 重置uid:userInfo + redisUtils.resetKeyExpireTime(accessUserKey, tokenConfig.getExpiration()); } - - // 3.redis获取权限 - String authoritiesKey = RedisKeyEnum.authKey(RedisKeyEnum.AUTH_AUTHORITIES, userId); - Object oo = redisUtils.get(authoritiesKey); - List<GrantedAuthority> authorities = new ArrayList<>(); - // 4.redis中是否存在 - if (oo != null) { - // 5.存在 - List<ContextCacheAuthority> cacheAuthorities = JSONArray.parseArray(oo.toString(), ContextCacheAuthority.class); - for (ContextCacheAuthority cacheAuthority: cacheAuthorities) { - authorities.add(new SimpleGrantedAuthority(cacheAuthority.getAuthority())); - } - }else { - // 6.不存在=>数据库查询 - ResultVO<String> rpcResultRole = userAccountService.getUserRoleCodeByUserId(userId); - - if (rpcResultRole == null) { - throw new BusinessException(ResultCodes.RPC_RESULT_NULL); - } - if (!ResultCodes.OK.getCode().equals(rpcResultRole.getCode())) { - throw new BusinessException(rpcResultRole.getCode(), rpcResultRole.getMsg()); - } - if (rpcResultRole.getData() == null) { - throw new BusinessException(ResultCodes.RPC_DATA_NULL); - } - if (!(rpcResultRole.getData() instanceof String)) { - throw new BusinessException(ResultCodes.RPC_DATA_TYPE_NOT_MATCH); - } - // role - authorities.add(new SimpleGrantedAuthority("ROLE_" + rpcResultRole.getData().toString())); - - // permission - ResultVO<List<String>> rpcResultPermission = userAccountService.getUserPermissionByUserId(userId); - - if (rpcResultPermission == null) { - throw new BusinessException(ResultCodes.RPC_RESULT_NULL); - } - if (!ResultCodes.OK.getCode().equals(rpcResultPermission.getCode())) { - throw new BusinessException(rpcResultRole.getCode(), rpcResultRole.getMsg()); - } - if (rpcResultPermission.getData() == null) { - throw new BusinessException(ResultCodes.RPC_DATA_NULL); - } - if (!(rpcResultPermission.getData() instanceof List)) { - throw new BusinessException(ResultCodes.RPC_DATA_TYPE_NOT_MATCH); - } - - List<String> permissions = RPCUtils.castList(rpcResultPermission.getData(), String.class); - for (String permission : permissions) { - SimpleGrantedAuthority simpleGrantedAuthority = new SimpleGrantedAuthority(permission); - authorities.add(simpleGrantedAuthority); - } + // 获取用户信息 + Object oo = redisUtils.get(accessUserKey); + // 初始化 + ContextCacheUser contextCacheUser = null; + if (oo == null) { + // 业务逻辑上是不会空的 + // 实际操作可能会手动清空 + ResultVO<ContextCacheUser> rpcResultVo = userAccountService.getCacheUserDetailByUid(userId); + // 调用rpc返回的数据 没有token 所以得至少续上这次token + contextCacheUser = this.getRpcResult(rpcResultVo); + // 因为手动清空等原因,可能会丢失其他token数据,就不去一一搜索这个uid的token了 + contextCacheUser.setAccessToken(Collections.singletonList(authToken)); + }else{ + // 正常的实际场景必定会走这里 + // 推荐用jackson + contextCacheUser = JSONObject.parseObject(oo.toString(), ContextCacheUser.class); } - + // threadLocal存入用户信息 + RequestContextHolder.contextUserLocal.set(contextCacheUser); // security对象中存入登陆者信息 - return new UsernamePasswordAuthenticationToken(contextCacheUser,authToken,authorities); + return new UsernamePasswordAuthenticationToken(contextCacheUser, authToken, contextCacheUser.getAuthorities()); } - - - - - - } return null; } + /** + * 获取rpc 返回的用户数据 + * + * @param rpcResultVo rpc返回数据 + * @return 用户准备缓存的数据 + */ + private ContextCacheUser getRpcResult(ResultVO<ContextCacheUser> rpcResultVo) { + if (!rpcResultVo.getCode().equals(ResultCodes.OK.getCode())) { + throw new BusinessException(rpcResultVo.getCode(), rpcResultVo.getMsg()); + } + if (rpcResultVo.getData() == null) { + throw new BusinessException(ResultCodes.RPC_DATA_NULL); + } + if (rpcResultVo.getData() instanceof ContextCacheUser) { + return (ContextCacheUser) rpcResultVo.getData(); + } else { + throw new BusinessException(ResultCodes.RPC_DATA_TYPE_NOT_MATCH); + } + + } protected void writeJSON(HttpServletRequest req, diff --git a/safePlatfrom-out-web/src/main/resources/config/application-dev.yaml b/safePlatfrom-out-web/src/main/resources/config/application-dev.yaml index 5e825ae..bf234ad 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application-dev.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application-dev.yaml @@ -11,31 +11,55 @@ jta: transaction-manager-id: txManager datasource: - type: com.alibaba.druid.pool.xa.DruidXADataSource + type: com.mysql.cj.jdbc.MysqlXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.emergency.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.goalmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.incidentmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.equipment.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true redis: host: 192.168.0.52 port: 6379 diff --git a/safePlatfrom-out-web/src/main/resources/config/application-guotai-demo.yaml b/safePlatfrom-out-web/src/main/resources/config/application-guotai-prod-1.yaml similarity index 83% rename from safePlatfrom-out-web/src/main/resources/config/application-guotai-demo.yaml rename to safePlatfrom-out-web/src/main/resources/config/application-guotai-prod-1.yaml index ec399cb..c037dcf 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application-guotai-demo.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application-guotai-prod-1.yaml @@ -11,36 +11,60 @@ jta: transaction-manager-id: txManager datasource: - type: com.alibaba.druid.pool.xa.DruidXADataSource + type: com.mysql.cj.jdbc.MysqlXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.emergency.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.goalmanage.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.incidentmanage.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.equipment.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true redis: host: 192.168.30.107 - port: 6375 - password: SEF98uvs98dUAUEF90Udssa - database: 0 # Redis 数据库号,默认为 0 + port: 6364 + password: akj78avauba789a + database: 13 # Redis 数据库号,默认为 0 timeout: 15000 # Redis 连接超时时间,单位:毫秒。 lettuce: pool: diff --git a/safePlatfrom-out-web/src/main/resources/config/application-guotai-prod.yaml b/safePlatfrom-out-web/src/main/resources/config/application-guotai-prod.yaml new file mode 100644 index 0000000..5a00956 --- /dev/null +++ b/safePlatfrom-out-web/src/main/resources/config/application-guotai-prod.yaml @@ -0,0 +1,165 @@ +server: + tomcat: + uri-encoding: UTF-8 + basedir: / + port: 16012 + servlet: + context-path: / + +# mysql +spring: + jta: + transaction-manager-id: txManager + datasource: + type: com.mysql.cj.jdbc.MysqlXADataSource + emergency: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:6361/safeplatform.emergency.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true + username: root + password: HZjCbHGxiXy7cek4 + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true + goalmanage: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:6361/safeplatform.goalmanage.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true + username: root + password: HZjCbHGxiXy7cek4 + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true + incidentmanage: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:6361/safeplatform.incidentmanage.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true + username: root + password: HZjCbHGxiXy7cek4 + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true + equipment: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:6361/safeplatform.equipment.guotai.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true + username: root + password: HZjCbHGxiXy7cek4 + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true + redis: + host: 127.0.0.1 + port: 6379 + password: akj78avauba789a + database: 13 # Redis 数据库号,默认为 0 + timeout: 15000 # Redis 连接超时时间,单位:毫秒。 + lettuce: + pool: + max-active: 4 + max-idle: 4 + # 对应 RedisProperties.Jedis 内部类 + jedis: + pool: + max-active: 4 # 连接池最大连接数,默认为 8 。使用负数表示没有限制 同一时间最大只能执行8条sql语句,每执行一条语句就会建立一个连接 + max-idle: 4 # 默认连接数最大空闲的连接数,默认为 8 。使用负数表示没有限制。 + min-idle: 0 # 默认连接池最小空闲的连接数,默认为 0 。允许设置 0 和 正数。 + max-wait: -1 + cloud: + nacos: + discovery: + server-addr: http://10.211.134.185:8848 + namespace: 78fe80cc-6159-4381-8e42-1cc6c68eb22e + username: nacos + password: nacos + enabled: true + register-enabled: true + config: + server-addr: http://10.211.134.185:8848 + namespace: 78fe80cc-6159-4381-8e42-1cc6c68eb22e + username: nacos + password: nacos + inetutils: + ignored-interfaces: + - VirtualBox Host-Only Network + preferred-networks: + - 10.211 + + #是否允许跨域 true:允许;false:不允许 + enableCors: false + +mybatis-plus: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +dubbo: + registry: + protocol: nacos + address: nacos://10.211.134.185:8848?namespace=78fe80cc-6159-4381-8e42-1cc6c68eb22e&username=nacos&password=nacos + application: + name: gkhy-safeplatform-out + scan: + # 扫描rpc接口定义包 + base-packages: com.gkhy.safePlatform + protocol: + name: dubbo + port: 18089 + serialization: kryo + host: ${spring.cloud.client.ip-address} + consumer: + # 服务连接超时时间 + timeout: 3000 + # 取消服务启动检查 + check: false + +threadPool: + corePoolSize: 20 + maxPoolSize: 20 + queueCapacity: 10000 + scheduling: + #控制线程是否执行 true:执行;false:不执行 + enabled: true +# enabled: false + +rocketmq: + name-server: 127.0.0.1:9876 + producer: + group: gkhy-safeplatform-guotai-uat + sendMessageTimeout: 300000 + consumer: + group: gkhy-safeplatform-guotai-uat + topic: + demoTopic: gkhy-safeplatform-topic-demo-uat + +minio: + endPoint: 106.15.95.149 + port: 9001 + accessKey: U9JW4xOeeUQOSR4f + secretKey: iaqQV6twR9yDZiFAf2UYr5xZfESanZs3+FU7G5A87BzPIRdObGjK + secure: false + bucketName: safeplatform-guotai-uat + urlPrefix: http://106.15.95.149:9001 + #用户名 gkhy_team_out_dev + #密码 12345678 + + +token: + header: Authorization + secret: safe666 + expiration: 7200 + refreshExpiration: 14400 + tokenHead: Bearer + loginUserHeader: uid + diff --git a/safePlatfrom-out-web/src/main/resources/config/application-online-uat.yaml b/safePlatfrom-out-web/src/main/resources/config/application-online-uat.yaml index 58dac4a..b74d492 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application-online-uat.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application-online-uat.yaml @@ -11,31 +11,55 @@ jta: transaction-manager-id: txManager datasource: - type: com.alibaba.druid.pool.xa.DruidXADataSource + type: com.mysql.cj.jdbc.MysqlXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.emergency.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.goalmanage.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.incidentmanage.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.30.107:43306/safeplatform.equipment.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_safeplatform_guotai_out password: a7687@i8a1Sdd - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true redis: host: 192.168.30.107 port: 6376 diff --git a/safePlatfrom-out-web/src/main/resources/config/application-out-dev.yaml b/safePlatfrom-out-web/src/main/resources/config/application-out-dev.yaml index 0774f7e..74f4a65 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application-out-dev.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application-out-dev.yaml @@ -11,31 +11,55 @@ jta: transaction-manager-id: txManager datasource: - type: com.alibaba.druid.pool.xa.DruidXADataSource + type: com.mysql.cj.jdbc.MysqlXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.emergency.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.goalmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.incidentmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.equipment.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true redis: host: 192.168.0.52 port: 6378 diff --git a/safePlatfrom-out-web/src/main/resources/config/application-test.yaml b/safePlatfrom-out-web/src/main/resources/config/application-test.yaml index feec198..2fe542a 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application-test.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application-test.yaml @@ -11,31 +11,55 @@ jta: transaction-manager-id: txManager datasource: - type: com.alibaba.druid.pool.xa.DruidXADataSource + type: com.mysql.cj.jdbc.MysqlXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.emergency.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.goalmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.incidentmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.equipment.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true redis: host: 192.168.0.52 port: 6377 diff --git a/safePlatfrom-out-web/src/main/resources/config/application-uat.yaml b/safePlatfrom-out-web/src/main/resources/config/application-uat.yaml index 715fa3b..6adf37c 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application-uat.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application-uat.yaml @@ -11,31 +11,55 @@ jta: transaction-manager-id: txManager datasource: - type: com.alibaba.druid.pool.xa.DruidXADataSource + type: com.mysql.cj.jdbc.MysqlXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.emergency.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.goalmanage.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.incidentmanage.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.equipment.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga - type: com.alibaba.druid.pool.DruidDataSource + initialSize: 3 + minIdle: 3 + maxActive: 10 + maxWait: 30000 + validationQuery: select 1 + validationQueryTimeout: 10000 + testWhileIdle: true redis: host: 192.168.0.52 port: 6375 diff --git a/safePlatfrom-out-web/src/main/resources/config/application.yaml b/safePlatfrom-out-web/src/main/resources/config/application.yaml index 3e4199b..640b5fb 100644 --- a/safePlatfrom-out-web/src/main/resources/config/application.yaml +++ b/safePlatfrom-out-web/src/main/resources/config/application.yaml @@ -2,9 +2,9 @@ application: name: safeplatform-out profiles: - active: online-uat + #active: uat #### dev out-dev test uat online-uat guotai-demo -# active: guotai-demo 国泰试运行环境 + active: guotai-prod # active: online-uat 线上预发环境 # active: dev 本地开发环境 # active: out-dev 外包对接环境 -- Gitblit v1.9.2