feat:完善Monitor
This commit is contained in:
parent
d24be7eda1
commit
263d014cc1
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.base.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class NameString implements Serializable {
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.base.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Value;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class NameValue implements Serializable {
|
||||
|
||||
private String name;
|
||||
|
||||
private Boolean value;
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
package org.jeecg.modules;
|
||||
|
||||
import org.jeecg.common.constant.DBSQL;
|
||||
import org.jeecg.common.util.JDBCUtil;
|
||||
import com.netease.qiye.qiyeopenplatform.sdk.QiyeOpenPlatSDK;
|
||||
import org.jeecg.modules.base.entity.postgre.SysDatabase;
|
||||
import org.jeecg.modules.databaseStatus.ConnFetcher;
|
||||
import org.jeecg.modules.qiyeEmail.base.InstanceSDK;
|
||||
import org.jeecg.modules.qiyeEmail.base.RParam;
|
||||
import org.jeecg.modules.qiyeEmail.service.MailBox;
|
||||
import org.jeecg.modules.service.ISysDatabaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -27,12 +28,11 @@ public class DatabaseStatusFetcher {
|
|||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = "jdbc:oracle:thin:@82.157.234.81:1521:XE";
|
||||
String driver = "oracle.jdbc.OracleDriver";
|
||||
String user = "configuration";
|
||||
String pass = "123456";
|
||||
|
||||
JdbcTemplate template = JDBCUtil.template(url, driver, user, pass);
|
||||
System.out.println(template.queryForObject(DBSQL.DBSTATUS_CONN_OR, Integer.class));
|
||||
QiyeOpenPlatSDK platSDK = InstanceSDK.getInstance();
|
||||
RParam rParam = new RParam();
|
||||
rParam.setAccountName("cnndc.rn.ng");
|
||||
rParam.setDomain("ndc.org.cn");
|
||||
Integer unreadMsg = MailBox.unreadMsg(platSDK, rParam);
|
||||
System.out.println(unreadMsg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,4 +93,9 @@ public class SysDatabaseController {
|
|||
public void updateStatus(@RequestBody SysDatabase sysDatabase){
|
||||
sysDatabaseService.updateById(sysDatabase);
|
||||
}
|
||||
|
||||
@GetMapping("getNameById")
|
||||
public String getServerName(@RequestParam String id){
|
||||
return sysDatabaseService.getNameById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,4 +69,9 @@ public class SysEmailController {
|
|||
List<SourceDto> sourceDtos = sysEmailService.listAll();
|
||||
return Result.OK(sourceDtos);
|
||||
}
|
||||
|
||||
@GetMapping("getNameById")
|
||||
public String getServerName(@RequestParam String id){
|
||||
return sysEmailService.getNameById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.RedisConstant;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.base.dto.NameValue;
|
||||
import org.jeecg.modules.service.ISysEmailLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -31,8 +32,14 @@ public class SysEmailLogController {
|
|||
@ApiOperation("邮箱服务器状态")
|
||||
public Result<?> status(@RequestParam("emailId") String emailId){
|
||||
String statusKey = RedisConstant.EMAIL_STATUS;
|
||||
Boolean emailSatus = (Boolean) redisUtil.hget(statusKey, emailId);
|
||||
return Result.OK(ObjectUtil.isNotNull(emailSatus) && emailSatus);
|
||||
NameValue nameValue = (NameValue) redisUtil.hget(statusKey, emailId);
|
||||
boolean online = false;
|
||||
if (ObjectUtil.isNotNull(nameValue)){
|
||||
Boolean value = nameValue.getValue();
|
||||
if (ObjectUtil.isNotNull(value))
|
||||
online = value;
|
||||
}
|
||||
return Result.OK(online);
|
||||
}
|
||||
|
||||
@GetMapping("space")
|
||||
|
|
|
@ -85,4 +85,9 @@ public class SysServerController {
|
|||
@RequestParam(defaultValue = "10") Integer pageSize){
|
||||
return sysServerService.details_AlarmInfo(sourceId, pageNo, pageSize);
|
||||
}
|
||||
|
||||
@GetMapping("getNameById")
|
||||
public String getServerName(@RequestParam String id){
|
||||
return sysServerService.getNameById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public class ConnFetcher implements Runnable{
|
|||
Iterator<SysDatabase> iterator = CollUtil
|
||||
.addAll(new ArrayList<>() ,databases).iterator();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
long start = System.currentTimeMillis();
|
||||
while (iterator.hasNext()) {
|
||||
try {
|
||||
SysDatabase database= iterator.next();
|
||||
|
@ -54,7 +55,10 @@ public class ConnFetcher implements Runnable{
|
|||
String dbDriver = database.getDbDriver();
|
||||
String dbUsername = database.getDbUsername();
|
||||
String dbPassword = database.getDbPassword();
|
||||
long getConn1 = System.currentTimeMillis();
|
||||
JdbcTemplate template = JDBCUtil.template(dbUrl, dbDriver, dbUsername, dbPassword);
|
||||
long getConn2 = System.currentTimeMillis();
|
||||
System.out.println("耗时: "+ (getConn2 - getConn1) + ", 连接[" + dbUrl + "]");
|
||||
if (ObjectUtil.isNull(template)) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
|
@ -99,6 +103,8 @@ public class ConnFetcher implements Runnable{
|
|||
log.error("ConnFetcher采集数据库连接数异常: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
System.out.println("执行耗时: " + (end - start) + "ms");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
package org.jeecg.modules.databaseStatus;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.constant.DBSQL;
|
||||
import org.jeecg.common.constant.enums.DbType;
|
||||
import org.jeecg.common.util.JDBCUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.base.dto.DatabaseStatusConn;
|
||||
import org.jeecg.modules.base.entity.postgre.SysDatabase;
|
||||
import org.jeecg.modules.service.IDatabaseStatusConnService;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import static org.jeecg.common.constant.enums.DbType.typeOf;
|
||||
|
||||
/*
|
||||
* 收集数据源的连接数信息 入库
|
||||
* */
|
||||
@Slf4j
|
||||
public class ConnFetcher1 implements Runnable{
|
||||
|
||||
private List<SysDatabase> databases;
|
||||
|
||||
private IDatabaseStatusConnService connService;
|
||||
|
||||
public ConnFetcher1(List<SysDatabase> databases) {
|
||||
this.databases = databases;
|
||||
connService = SpringContextUtils.getBean(IDatabaseStatusConnService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (CollUtil.isEmpty(databases)) return;
|
||||
List<DatabaseStatusConn> statusList = new ArrayList<>();
|
||||
while (true){
|
||||
Iterator<SysDatabase> iterator = CollUtil
|
||||
.addAll(new ArrayList<>() ,databases).iterator();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
long start = System.currentTimeMillis();
|
||||
while (iterator.hasNext()) {
|
||||
try {
|
||||
SysDatabase database= iterator.next();
|
||||
String databaseId = database.getId();
|
||||
String dbType = database.getDbType();
|
||||
String dbUrl = database.getDbUrl();
|
||||
String dbDriver = database.getDbDriver();
|
||||
String dbUsername = database.getDbUsername();
|
||||
String dbPassword = database.getDbPassword();
|
||||
long getConn1 = System.currentTimeMillis();
|
||||
JdbcTemplate template = JDBCUtil.template(dbUrl, dbDriver, dbUsername, dbPassword);
|
||||
long getConn2 = System.currentTimeMillis();
|
||||
System.out.println("耗时: "+ (getConn2 - getConn1) + ", 连接[" + dbUrl + "]");
|
||||
if (ObjectUtil.isNull(template)) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
Integer conn = null;
|
||||
// 根据数据库类型选择执行哪种数据库的状态查询SQL
|
||||
DbType dbTypeE = typeOf(dbType);
|
||||
if (ObjectUtil.isNotNull(dbTypeE)){
|
||||
switch (dbTypeE){
|
||||
case POSTGRESQL:
|
||||
conn = template.queryForObject(DBSQL.DBSTATUS_CONN_PG, Integer.class);
|
||||
break;
|
||||
case ORACLE:
|
||||
conn = template.queryForObject(DBSQL.DBSTATUS_CONN_OR, Integer.class);
|
||||
break;
|
||||
case MYSQL55:
|
||||
// ...
|
||||
break;
|
||||
case MYSQL57:
|
||||
// ...
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 如果conn == null 说明数据源类型不确定
|
||||
if (ObjectUtil.isNull(conn)) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
DatabaseStatusConn databaseStatus = new DatabaseStatusConn();
|
||||
databaseStatus.setConnNum(conn);
|
||||
databaseStatus.setDatabaseId(databaseId);
|
||||
databaseStatus.setCollectTime(now);
|
||||
// 数据达到一定数量,进行批量保存
|
||||
statusList.add(databaseStatus);
|
||||
if (statusList.size() == 100){
|
||||
connService.saveBatch(statusList);
|
||||
statusList = new ArrayList<>();
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("ConnFetcher采集数据库连接数异常: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
System.out.println("执行耗时: " + (end - start) + "ms");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,15 +8,17 @@ public class RParam {
|
|||
// 获取账号配额信息 相关参数
|
||||
private String domain; // 必须
|
||||
|
||||
private String account_name; // 必须
|
||||
private String accountName; // 必须
|
||||
|
||||
// 获取企业邮箱域名列表 相关参数
|
||||
private String orgOpenId; // 必须
|
||||
|
||||
private Boolean showAliasDomain; // 必须
|
||||
|
||||
public RParam(String account_name, String domain) {
|
||||
this.account_name = account_name;
|
||||
private String fid = "1"; // 邮箱文件夹 ID,使用英文半角逗号分开,默认传 1,5 1-收件箱;2-草稿箱;3-已发送;4-已删除;5-垃圾邮件
|
||||
|
||||
public RParam(String accountName, String domain) {
|
||||
this.accountName = accountName;
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ public class MailBox {
|
|||
|
||||
public static Integer unreadMsg(QiyeOpenPlatSDK platSDK, RParam rParam){
|
||||
Q q = Q.init(rParam);
|
||||
if (ObjectUtil.isNull(platSDK))
|
||||
return -1;
|
||||
R<Map<String, Integer>> result = platSDK.commonInvoke(q, MailBoxAPI.UNREADMSG);
|
||||
Map<String, Integer> data = result.getData();
|
||||
if (ObjectUtil.isNull(data))
|
||||
|
|
|
@ -20,4 +20,6 @@ public interface IAlarmRuleService extends IService<AlarmRule> {
|
|||
Result<?> getSourceByType(String sourceType);
|
||||
|
||||
Result<?> updateStatus(String alarmRuleId,Integer enabled);
|
||||
|
||||
void deleteBySourceId(String sourceId);
|
||||
}
|
||||
|
|
|
@ -34,4 +34,6 @@ public interface ISysDatabaseService extends IService<SysDatabase> {
|
|||
List<SpaceInfo> spaceInfo(String id);
|
||||
|
||||
void status2Redis();
|
||||
|
||||
String getNameById(String id);
|
||||
}
|
||||
|
|
|
@ -28,4 +28,6 @@ public interface ISysEmailService extends IService<SysEmail> {
|
|||
List<SourceDto> listAll();
|
||||
|
||||
void status2Redis();
|
||||
|
||||
String getNameById(String id);
|
||||
}
|
||||
|
|
|
@ -35,4 +35,6 @@ public interface ISysServerService extends IService<SysServer> {
|
|||
Result<?> details_AlarmInfo(String sourceId, Integer pageNo, Integer pageSize);
|
||||
|
||||
void status2Redis();
|
||||
|
||||
String getNameById(String id);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -29,9 +30,11 @@ import org.jeecg.modules.service.ISysEmailService;
|
|||
import org.jeecg.modules.service.ISysServerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.jeecg.modules.base.enums.Enabled.ENABLED;
|
||||
import static org.jeecg.modules.base.enums.SourceType.*;
|
||||
|
@ -144,6 +147,24 @@ public class AlarmRuleServiceImpl extends ServiceImpl<AlarmRuleMapper, AlarmRule
|
|||
return Result.error(Prompt.UPDATE_ERR);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteBySourceId(String sourceId) {
|
||||
LambdaQueryWrapper<AlarmRule> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(AlarmRule::getSourceId, sourceId);
|
||||
List<AlarmRule> alarmRules = list(wrapper);
|
||||
// 删除数据库中的规则
|
||||
List<String> ids = alarmRules.stream()
|
||||
.map(AlarmRule::getId).collect(Collectors.toList());
|
||||
removeBatchByIds(ids);
|
||||
// 收集待删除规则的Redis Key
|
||||
List<String> keys = alarmRules.stream()
|
||||
.map(rule -> RedisConstant.PREFIX_RULE + rule.getSourceType() + StrUtil.COLON + rule.getId())
|
||||
.collect(Collectors.toList());
|
||||
// 删除Redis中的规则
|
||||
redisUtil.del(ArrayUtil.toArray(keys, String.class));
|
||||
}
|
||||
|
||||
/*
|
||||
* 系统启动后将所有警告规则放到Redis缓存
|
||||
**/
|
||||
|
|
|
@ -15,10 +15,8 @@ import org.jeecg.common.constant.enums.DbType;
|
|||
import org.jeecg.common.system.vo.DictModel;
|
||||
import org.jeecg.common.util.JDBCUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.base.dto.DBInfo;
|
||||
import org.jeecg.modules.base.dto.DatabaseDto;
|
||||
import org.jeecg.modules.base.dto.SourceDto;
|
||||
import org.jeecg.modules.base.dto.SpaceInfo;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.base.dto.*;
|
||||
import org.jeecg.modules.base.entity.postgre.SysDatabase;
|
||||
import org.jeecg.modules.base.bizVo.SourceVo;
|
||||
import org.jeecg.modules.entity.AlarmHistory;
|
||||
|
@ -26,6 +24,7 @@ import org.jeecg.modules.feignclient.SystemClient;
|
|||
import org.jeecg.modules.mapper.DBRowMapper;
|
||||
import org.jeecg.modules.mapper.SpaceRowMapper;
|
||||
import org.jeecg.modules.mapper.SysDatabaseMapper;
|
||||
import org.jeecg.modules.service.IAlarmRuleService;
|
||||
import org.jeecg.modules.service.ISysDatabaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
@ -72,10 +71,15 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
|||
String statusKey = RedisConstant.DATABASE_STATUS;
|
||||
Map<Object, Object> statusMap = redisUtil.hmget(statusKey);
|
||||
for (DatabaseDto databaseDto : databaseDtos) {
|
||||
boolean online = false;
|
||||
String id = databaseDto.getId();
|
||||
String type = databaseDto.getType();
|
||||
Boolean online = (Boolean) statusMap.get(id);
|
||||
if (ObjectUtil.isNull(online)) online = false;
|
||||
NameValue nameValue = (NameValue) statusMap.get(id);
|
||||
if (ObjectUtil.isNotNull(nameValue)){
|
||||
Boolean value = nameValue.getValue();
|
||||
if (ObjectUtil.isNotNull(value))
|
||||
online = value;
|
||||
}
|
||||
String dataBaseType = dataSourceMap.get(type);
|
||||
databaseDto.setDataBaseType(dataBaseType)
|
||||
.setOnline(online).setSlowQuery("328/s")
|
||||
|
@ -181,6 +185,9 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
|||
boolean success = removeById(id);
|
||||
if(success) {
|
||||
delStatus(id);
|
||||
// 同步删除Redis和数据库中的预警规则
|
||||
IAlarmRuleService alarmRuleService = SpringContextUtils.getBean(IAlarmRuleService.class);
|
||||
alarmRuleService.deleteBySourceId(id);
|
||||
return Result.OK(Prompt.DELETE_SUCC);
|
||||
}
|
||||
return Result.error(Prompt.DELETE_ERR);
|
||||
|
@ -314,18 +321,30 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
|||
Map<String, Object> statusMap = new HashMap<>();
|
||||
for (SysDatabase database : databases) {
|
||||
String id = database.getId();
|
||||
String name = database.getName();
|
||||
String dbUrl = database.getDbUrl();
|
||||
String dbDriver = database.getDbDriver();
|
||||
String dbUsername = database.getDbUsername();
|
||||
String dbPassword = database.getDbPassword();
|
||||
boolean isConn = JDBCUtil.isConnection(dbUrl, dbDriver, dbUsername, dbPassword);
|
||||
statusMap.put(id, isConn);
|
||||
statusMap.put(id, new NameValue(name, isConn));
|
||||
}
|
||||
// 将数据源连接状态更新到reids
|
||||
String statusKey = RedisConstant.DATABASE_STATUS;
|
||||
redisUtil.hmset(statusKey, statusMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameById(String id) {
|
||||
String key = RedisConstant.DATABASE_STATUS;
|
||||
if (redisUtil.hHasKey(key, id)){
|
||||
NameValue nV = (NameValue) redisUtil.hget(key, id);
|
||||
if (ObjectUtil.isNotNull(nV))
|
||||
return nV.getName();
|
||||
}
|
||||
return getById(id).getName();
|
||||
}
|
||||
|
||||
private List<DBInfo> dbInfoPG(SysDatabase sysDatabase, String dbName, RowMapper<DBInfo> mapper){
|
||||
String dbUrl = sysDatabase.getDbUrl();
|
||||
String dbDriver = sysDatabase.getDbDriver();
|
||||
|
@ -390,13 +409,14 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
|||
* */
|
||||
private void saveOrUpdateStatus(SysDatabase database){
|
||||
String id = database.getId();
|
||||
String name = database.getName();
|
||||
String dbUrl = database.getDbUrl();
|
||||
String dbDriver = database.getDbDriver();
|
||||
String dbUsername = database.getDbUsername();
|
||||
String dbPassword = database.getDbPassword();
|
||||
boolean isConn = JDBCUtil.isConnection(dbUrl, dbDriver, dbUsername, dbPassword);
|
||||
String statusKey = RedisConstant.DATABASE_STATUS;
|
||||
redisUtil.hset(statusKey, id, isConn);
|
||||
redisUtil.hset(statusKey, id, new NameValue(name, isConn));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
@ -15,7 +14,6 @@ import org.jeecg.common.constant.Prompt;
|
|||
import org.jeecg.common.constant.SymbolConstant;
|
||||
import org.jeecg.modules.base.entity.postgre.SysEmail;
|
||||
import org.jeecg.modules.base.entity.postgre.SysEmailLog;
|
||||
import org.jeecg.modules.base.enums.Qiye;
|
||||
import org.jeecg.modules.mapper.SysEmailLogMapper;
|
||||
import org.jeecg.modules.mapper.SysEmailMapper;
|
||||
import org.jeecg.modules.qiyeEmail.base.InstanceSDK;
|
||||
|
@ -31,13 +29,10 @@ import java.math.BigDecimal;
|
|||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static org.jeecg.modules.base.enums.Qiye.IS;
|
||||
|
||||
|
@ -98,7 +93,7 @@ public class SysEmailLogServiceImpl extends ServiceImpl<SysEmailLogMapper, SysEm
|
|||
return map;
|
||||
RParam rParam = new RParam();
|
||||
rParam.setDomain(domain);
|
||||
rParam.setAccount_name(accountName);
|
||||
rParam.setAccountName(accountName);
|
||||
// 获取已登录的SDK实例
|
||||
QiyeOpenPlatSDK platSDK = InstanceSDK.getInstance();
|
||||
if (ObjectUtil.isNull(platSDK))
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.jeecg.modules.service.impl;
|
|||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
@ -9,22 +10,16 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.netease.qiye.qiyeopenplatform.sdk.QiyeOpenPlatSDK;
|
||||
import com.netease.qiye.qiyeopenplatform.sdk.dto.Q;
|
||||
import com.netease.qiye.qiyeopenplatform.sdk.dto.R;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.*;
|
||||
import org.jeecg.common.email.emuns.SysMailType;
|
||||
import org.jeecg.common.util.EmailUtil;
|
||||
import org.jeecg.common.util.JDBCUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.base.dto.EmailDto;
|
||||
import org.jeecg.modules.base.dto.IdCount;
|
||||
import org.jeecg.modules.base.dto.SourceDto;
|
||||
import org.jeecg.modules.base.entity.postgre.SysDatabase;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.base.dto.*;
|
||||
import org.jeecg.modules.base.entity.postgre.SysEmail;
|
||||
import org.jeecg.modules.base.bizVo.SourceVo;
|
||||
import org.jeecg.modules.base.enums.Enabled;
|
||||
import org.jeecg.modules.base.enums.Qiye;
|
||||
import org.jeecg.modules.entity.AlarmHistory;
|
||||
import org.jeecg.modules.mapper.SysEmailMapper;
|
||||
|
@ -32,7 +27,7 @@ import org.jeecg.modules.qiyeEmail.base.InstanceSDK;
|
|||
import org.jeecg.modules.qiyeEmail.base.RParam;
|
||||
import org.jeecg.modules.qiyeEmail.base.dto.AccountInfo;
|
||||
import org.jeecg.modules.qiyeEmail.service.Account;
|
||||
import org.jeecg.modules.qiyeEmail.service.MailBox;
|
||||
import org.jeecg.modules.service.IAlarmRuleService;
|
||||
import org.jeecg.modules.service.ISysEmailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -111,8 +106,13 @@ public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> i
|
|||
capacity = usedQuota + " MB";
|
||||
}
|
||||
}
|
||||
Boolean online = (Boolean) statusMap.get(id);
|
||||
if (ObjectUtil.isNull(online)) online = false;
|
||||
NameValue nameValue = (NameValue) statusMap.get(id);
|
||||
boolean online = false;
|
||||
if (ObjectUtil.isNotNull(nameValue)){
|
||||
Boolean value = nameValue.getValue();
|
||||
if (ObjectUtil.isNotNull(value))
|
||||
online = value;
|
||||
}
|
||||
emailDto.setOnline(online).setStoerCapacity(capacity).setStoerRed(true)
|
||||
.setToday(todayMap.getOrDefault(id, 0))
|
||||
.setYesterday(yestMap.getOrDefault(id, 0))
|
||||
|
@ -179,6 +179,9 @@ public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> i
|
|||
boolean success = this.removeById(id);
|
||||
if (success){
|
||||
delStatus(id);
|
||||
// 同步删除Redis和数据库中的预警规则
|
||||
IAlarmRuleService alarmRuleService = SpringContextUtils.getBean(IAlarmRuleService.class);
|
||||
alarmRuleService.deleteBySourceId(id);
|
||||
return Result.OK(Prompt.DELETE_SUCC);
|
||||
}
|
||||
return Result.error(Prompt.DELETE_ERR);
|
||||
|
@ -242,22 +245,35 @@ public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> i
|
|||
Map<String, Object> statusMap = new HashMap<>();
|
||||
for (SysEmail email : emails) {
|
||||
String id = email.getId();
|
||||
String name = email.getName();
|
||||
boolean isConn = EmailUtil.isConnection(email);
|
||||
statusMap.put(id, isConn);
|
||||
statusMap.put(id, new NameValue(name, isConn));
|
||||
}
|
||||
// 将邮箱服务器连接状态更新到reids
|
||||
String statusKey = RedisConstant.EMAIL_STATUS;
|
||||
redisUtil.hmset(statusKey, statusMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameById(String id) {
|
||||
String key = RedisConstant.EMAIL_STATUS;
|
||||
if (redisUtil.hHasKey(key, id)){
|
||||
NameValue nV = (NameValue) redisUtil.hget(key, id);
|
||||
if (ObjectUtil.isNotNull(nV))
|
||||
return nV.getName();
|
||||
}
|
||||
return getById(id).getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* 新增|修改邮箱服务信息后更新邮箱服务状态值
|
||||
* */
|
||||
private void saveOrUpdateStatus(SysEmail email){
|
||||
String id = email.getId();
|
||||
String name = email.getName();
|
||||
boolean isConn = EmailUtil.isConnection(email);
|
||||
String statusKey = RedisConstant.EMAIL_STATUS;
|
||||
redisUtil.hset(statusKey, id, isConn);
|
||||
redisUtil.hset(statusKey, id, new NameValue(name, isConn));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -276,7 +292,7 @@ public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> i
|
|||
if (ArrayUtil.length(info) < 2)
|
||||
return Qiye.NOT.getValue();
|
||||
String domain = info[1];
|
||||
List<String> domains = Account.domains();
|
||||
List<String> domains = ListUtil.toList("ndc.org.cn","");
|
||||
boolean contains = CollUtil.contains(domains, domain);
|
||||
return contains ? Qiye.IS.getValue() : Qiye.NOT.getValue();
|
||||
}
|
||||
|
|
|
@ -21,11 +21,9 @@ import org.jeecg.common.constant.RedisConstant;
|
|||
import org.jeecg.common.util.NumUtil;
|
||||
import org.jeecg.common.util.PageUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.ServerStatusManager;
|
||||
import org.jeecg.modules.base.dto.AlarmInfo;
|
||||
import org.jeecg.modules.base.dto.BasicInfo;
|
||||
import org.jeecg.modules.base.dto.ServerDto;
|
||||
import org.jeecg.modules.base.dto.SourceDto;
|
||||
import org.jeecg.modules.base.dto.*;
|
||||
import org.jeecg.modules.base.entity.monitor.Host;
|
||||
import org.jeecg.modules.base.entity.monitor.Item;
|
||||
import org.jeecg.modules.base.entity.monitor.Servers;
|
||||
|
@ -35,6 +33,7 @@ import org.jeecg.modules.base.enums.ServerStatus;
|
|||
import org.jeecg.modules.entity.AlarmHistory;
|
||||
import org.jeecg.modules.feignclient.MonitorAlarm;
|
||||
import org.jeecg.modules.mapper.SysServerMapper;
|
||||
import org.jeecg.modules.service.IAlarmRuleService;
|
||||
import org.jeecg.modules.service.ISysServerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -90,7 +89,14 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
String hostId = serverDto.getHostId();
|
||||
serverDto.setAlarmRed(alarms > 0);
|
||||
// 设置服务器状态信息
|
||||
serverDto.setStatus((String) statusMap.getOrDefault(id, ServerStatus.UNKNOWN.getValue()));
|
||||
NameString nameValue = (NameString)statusMap.get(id);
|
||||
String status = ServerStatus.UNKNOWN.getValue();
|
||||
if (ObjectUtil.isNotNull(nameValue)){
|
||||
String value = nameValue.getValue();
|
||||
if (StrUtil.isNotBlank(value))
|
||||
status = value;
|
||||
}
|
||||
serverDto.setStatus(status);
|
||||
// 设置服务器的硬件使用情况信息
|
||||
Host host = hostMap.get(hostId);
|
||||
if (ObjectUtil.isNull(host))
|
||||
|
@ -176,6 +182,9 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
boolean success = removeById(id);
|
||||
if(success) {
|
||||
delStatus(id);
|
||||
// 同步删除Redis和数据库中的预警规则
|
||||
IAlarmRuleService alarmRuleService = SpringContextUtils.getBean(IAlarmRuleService.class);
|
||||
alarmRuleService.deleteBySourceId(id);
|
||||
return Result.OK(Prompt.DELETE_SUCC);
|
||||
}
|
||||
return Result.error(Prompt.DELETE_ERR);
|
||||
|
@ -310,15 +319,17 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
Map<String, Host> hostMap = hosts.stream().collect(Collectors.toMap(Host::getHostId, Host -> Host));
|
||||
for (SysServer server : sysServers) {
|
||||
String hostId = server.getHostId();
|
||||
String name = server.getName();
|
||||
String serverId = server.getId();
|
||||
Host host = hostMap.get(hostId);
|
||||
// 获取该服务器的状态并保存
|
||||
if (ObjectUtil.isNotNull(host)) {
|
||||
values.put(serverId, host.getStatus());
|
||||
String status = host.getStatus();
|
||||
values.put(serverId, new NameString(name, status));
|
||||
continue;
|
||||
}
|
||||
// 当前服务器不在监控服务器列表 将它的状态设置为未知
|
||||
values.put(serverId, ServerStatus.UNKNOWN.getValue());
|
||||
values.put(serverId, new NameString(name, ServerStatus.UNKNOWN.getValue()));
|
||||
}
|
||||
redisUtil.hmset(key, values);
|
||||
}catch (Exception e){
|
||||
|
@ -327,12 +338,24 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameById(String id) {
|
||||
String key = RedisConstant.SERVER_STATUS;
|
||||
if (redisUtil.hHasKey(key, id)){
|
||||
NameString nS = (NameString) redisUtil.hget(key, id);
|
||||
if (ObjectUtil.isNotNull(nS))
|
||||
return nS.getName();
|
||||
}
|
||||
return getById(id).getName();
|
||||
}
|
||||
|
||||
private void defaultStatus(List<SysServer> sysServers){
|
||||
String key = RedisConstant.SERVER_STATUS;
|
||||
Map<String, Object> values = new HashMap<>();
|
||||
for (SysServer sysServer : sysServers) {
|
||||
String id = sysServer.getId();
|
||||
values.put(id, ServerStatus.UNKNOWN.getValue());
|
||||
String name = sysServer.getName();
|
||||
values.put(id, new NameString(name, ServerStatus.UNKNOWN.getValue()));
|
||||
}
|
||||
redisUtil.hmset(key, values);
|
||||
}
|
||||
|
@ -343,6 +366,7 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
private boolean saveOrUpatedStatus(SysServer server){
|
||||
String key = RedisConstant.SERVER_STATUS;
|
||||
String status = ServerStatus.UNKNOWN.getValue(); // 初始值为-1
|
||||
String name = server.getName();
|
||||
try {
|
||||
String ipAddress = server.getIpAddress();
|
||||
Servers servers = monitorAlarm.listApp(MonitorConstant.SERVER_APP).getResult();
|
||||
|
@ -360,7 +384,7 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
}
|
||||
boolean success = this.saveOrUpdate(server);
|
||||
String id = server.getId();
|
||||
redisUtil.hset(key, id, status);
|
||||
redisUtil.hset(key, id, new NameString(name, status));
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@ public interface AbnormalAlarmClient {
|
|||
@GetMapping("/sysEmail/getSender")
|
||||
Result<SysEmail> getSender();
|
||||
|
||||
@GetMapping("/sysEmail/getNameById")
|
||||
String getEmailName(@RequestParam String id);
|
||||
|
||||
/* AlarmContactGroupMemberController下相关接口 */
|
||||
@GetMapping("/alarmContactGroupMember/userIds")
|
||||
Result<List<String>> userIds(@RequestParam String groupId);
|
||||
|
@ -39,9 +42,13 @@ public interface AbnormalAlarmClient {
|
|||
boolean syncServerItem();
|
||||
|
||||
/* SysDatabaseController下相关接口 */
|
||||
@GetMapping("/sysDatabase/getById")
|
||||
SysDatabase getDatabase(@RequestParam String sourceId);
|
||||
@GetMapping("/sysDatabase/getNameById")
|
||||
String getDatabaseName(@RequestParam String id);
|
||||
|
||||
@PutMapping("/sysDatabase/updateStatus")
|
||||
void updateDatabase(@RequestBody SysDatabase database);
|
||||
|
||||
/* SysServerController下相关接口 */
|
||||
@GetMapping("/sysServer/getNameById")
|
||||
String getServerName(@RequestParam String id);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.jeecg.common.util.JDBCUtil;
|
|||
import org.jeecg.common.util.NumUtil;
|
||||
import org.jeecg.common.util.RedisStreamUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.base.dto.NameValue;
|
||||
import org.jeecg.modules.base.entity.Rule;
|
||||
import org.jeecg.modules.base.entity.monitor.ItemHistory;
|
||||
import org.jeecg.modules.base.entity.postgre.AlarmLog;
|
||||
|
@ -69,11 +70,9 @@ public class DatabaseJob extends Monitor implements Job{
|
|||
|
||||
if (blank1 || blank2 || hasKey) continue;
|
||||
|
||||
// 根据sourceId查询Database信息
|
||||
// 根据sourceId查询Database信息(缓存)
|
||||
String sourceId = alarmRule.getSourceId();
|
||||
// 查询数据库信息 该SQL占用较多PG的连接
|
||||
/*SysDatabase database = getAlarmClient().getDatabase(sourceId);
|
||||
if (ObjectUtil.isNull(database)) continue;*/
|
||||
String databaseName = getAlarmClient().getDatabaseName(sourceId);
|
||||
|
||||
// 根据监控项id选择要查询的监控项信息
|
||||
Item item = Item.of(itemId);
|
||||
|
@ -100,8 +99,9 @@ public class DatabaseJob extends Monitor implements Job{
|
|||
alarmLog.setOperator(operator);
|
||||
alarmLog.setAlarmValue(StrUtil.toString(current));
|
||||
String ruleName = alarmRule.getName();
|
||||
String message = "您设定的预警规则:"+ruleName+"," +
|
||||
"预警信息为:"+ operator + ",当前值为:" + current;
|
||||
String message = String.format("您的数据库: [%s]", databaseName);
|
||||
message += String.format(",设定的预警规则: %s", ruleName);
|
||||
message += String.format(",预警信息为: %s,当前值为: %s", operator, current);
|
||||
alarmLog.setAlarmInfo(message);
|
||||
getAlarmClient().create(alarmLog);
|
||||
|
||||
|
@ -116,7 +116,7 @@ public class DatabaseJob extends Monitor implements Job{
|
|||
getSendMessage().send(message, groupId, notific);
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
log.error("Database预警规则{}解析失败: {}", operator, e.getMessage());
|
||||
log.error("Database预警规则: {}解析失败,失败原因: {}", operator, e.getMessage());
|
||||
}catch (RuntimeException e){
|
||||
log.error("Database监控异常: {}", e.getMessage());
|
||||
}
|
||||
|
@ -130,8 +130,9 @@ public class DatabaseJob extends Monitor implements Job{
|
|||
private Integer isConnection(String databaseId){
|
||||
int res = 1;
|
||||
String statusKey = RedisConstant.DATABASE_STATUS;
|
||||
Boolean status = (Boolean)getRedisUtil().hget(statusKey, databaseId);
|
||||
if (ObjectUtil.isNull(status) || !status) res = 0;
|
||||
NameValue nameValue = (NameValue)getRedisUtil().hget(statusKey, databaseId);
|
||||
if (ObjectUtil.isNull(nameValue) || ObjectUtil.isNull(nameValue.getValue()) || !nameValue.getValue())
|
||||
res = 0;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import lombok.Data;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.constant.RedisConstant;
|
||||
import org.jeecg.common.util.NumUtil;
|
||||
import org.jeecg.modules.base.dto.NameValue;
|
||||
import org.jeecg.modules.base.entity.Rule;
|
||||
import org.jeecg.modules.base.entity.postgre.AlarmLog;
|
||||
import org.jeecg.modules.base.entity.postgre.AlarmRule;
|
||||
|
@ -55,7 +56,9 @@ public class EmailJob extends Monitor implements Job{
|
|||
|
||||
if (blank1 || blank2 || hasKey) continue;
|
||||
|
||||
// 根据sourceId查询Eamil信息(缓存)
|
||||
String sourceId = alarmRule.getSourceId();
|
||||
String emailName = getAlarmClient().getEmailName(sourceId);
|
||||
|
||||
// 根据监控项id选择要查询的监控项信息
|
||||
Item item = Item.of(itemId);
|
||||
|
@ -82,8 +85,9 @@ public class EmailJob extends Monitor implements Job{
|
|||
alarmLog.setOperator(operator);
|
||||
alarmLog.setAlarmValue(StrUtil.toString(current));
|
||||
String ruleName = alarmRule.getName();
|
||||
String message = "您设定的预警规则:"+ruleName+"," +
|
||||
"预警信息为:"+ operator + ",当前值为:" + current;
|
||||
String message = String.format("您的Email: [%s]", emailName);
|
||||
message += String.format(",设定的预警规则: %s", ruleName);
|
||||
message += String.format(",预警信息为: %s,当前值为: %s", operator, current);
|
||||
alarmLog.setAlarmInfo(message);
|
||||
getAlarmClient().create(alarmLog);
|
||||
|
||||
|
@ -98,7 +102,7 @@ public class EmailJob extends Monitor implements Job{
|
|||
getSendMessage().send(message, groupId, notific);
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
log.error("Email预警规则{}解析失败: {}", operator, e.getMessage());
|
||||
log.error("Email预警规则: {}解析失败,失败原因: {}", operator, e.getMessage());
|
||||
}catch (RuntimeException e){
|
||||
log.error("Email监控异常: {}", e.getMessage());
|
||||
}
|
||||
|
@ -112,8 +116,9 @@ public class EmailJob extends Monitor implements Job{
|
|||
private Integer isConnection(String emailId){
|
||||
int res = 1;
|
||||
String statusKey = RedisConstant.EMAIL_STATUS;
|
||||
Boolean status = (Boolean)getRedisUtil().hget(statusKey, emailId);
|
||||
if (ObjectUtil.isNull(status) || !status) res = 0;
|
||||
NameValue nameValue = (NameValue)getRedisUtil().hget(statusKey, emailId);
|
||||
if (ObjectUtil.isNull(nameValue) || ObjectUtil.isNull(nameValue.getValue()) || !nameValue.getValue())
|
||||
res = 0;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,6 +77,10 @@ public class ServerJob extends Monitor implements Job {
|
|||
|
||||
if (blank1 || blank2 || hasKey) continue;
|
||||
|
||||
// 根据sourceId查询Server信息(缓存)
|
||||
String sourceId = alarmRule.getSourceId();
|
||||
String serverName = getAlarmClient().getServerName(sourceId);
|
||||
|
||||
// 向运管查询监控项数据
|
||||
Result<ItemHistory> result = getMonitorSystem().itemBack(itemId, 0, start, end);
|
||||
Double current = result.getResult().getNow();
|
||||
|
@ -94,8 +98,9 @@ public class ServerJob extends Monitor implements Job {
|
|||
alarmLog.setOperator(operator);
|
||||
alarmLog.setAlarmValue(StrUtil.toString(current));
|
||||
String ruleName = alarmRule.getName();
|
||||
String message = "您设定的预警规则:"+ruleName+"," +
|
||||
"预警信息为:"+ operator + ",当前值为:" + current;
|
||||
String message = String.format("您的服务器: [%s]", serverName);
|
||||
message += String.format(",设定的预警规则: %s", ruleName);
|
||||
message += String.format(",预警信息为: %s,当前值为: %s", operator, current);
|
||||
alarmLog.setAlarmInfo(message);
|
||||
getAlarmClient().create(alarmLog);
|
||||
|
||||
|
@ -110,7 +115,7 @@ public class ServerJob extends Monitor implements Job {
|
|||
getSendMessage().send(message, groupId, notific);
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
log.error("Server预警规则:{}解析失败,失败原因:{}!", operator, e.getMessage());
|
||||
log.error("Server预警规则: {}解析失败,失败原因: {}", operator, e.getMessage());
|
||||
}catch (RuntimeException e){
|
||||
log.error("Server监控异常: {}", e.getMessage());
|
||||
}
|
||||
|
|
|
@ -18,6 +18,15 @@
|
|||
<artifactId>jeecg-module-abnormal-alarm</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-starter-cloud</artifactId>
|
||||
</dependency>-->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -15,5 +15,5 @@ spring:
|
|||
config:
|
||||
import:
|
||||
- optional:nacos:armd.yaml
|
||||
- optional:nacos:armd-@profile.name@1.yaml
|
||||
- optional:nacos:armd-@profile.name@.yaml
|
||||
- optional:nacos:armd-analysis-@profile.name@.yaml
|
||||
|
|
Loading…
Reference in New Issue
Block a user