1、适配部署环境变量自动注入
2、适配南网达梦数据库安全版SQL语句Group by 不支持自定义函数 3、达梦数据库驱动改为达梦提供的指定版本 4、修改syslog-consumer模块yaml 文件kafka 变量名称 5、修改访问日志告警表新增4个字段,完善异常行为详情页面显示字段
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 应用配置属性 - 替代静态 AppConfig
|
||||
* 使用 Spring Boot 标准 @Value 机制,支持 docker-compose 环境变量覆盖
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class AppProperties {
|
||||
|
||||
// ========== Syslog 配置 ==========
|
||||
@Value("${syslog.tcp.port:514}")
|
||||
private int syslogTcpPort;
|
||||
|
||||
@Value("${syslog.udp.port:515}")
|
||||
private int syslogUdpPort;
|
||||
|
||||
@Value("${syslog.max.frame.length:65536}")
|
||||
private int syslogMaxFrameLength;
|
||||
|
||||
@Value("${syslog.buffer.size:1024}")
|
||||
private int syslogBufferSize;
|
||||
|
||||
// ========== InfluxDB 配置 ==========
|
||||
@Value("${influxdb.url:http://localhost:8086}")
|
||||
private String influxUrl;
|
||||
|
||||
@Value("${influxdb.token:}")
|
||||
private String influxToken;
|
||||
|
||||
@Value("${influxdb.org:}")
|
||||
private String influxOrg;
|
||||
|
||||
@Value("${influxdb.bucket:syslog}")
|
||||
private String influxBucket;
|
||||
|
||||
@Value("${influxdb.batch.size:1000}")
|
||||
private int influxBatchSize;
|
||||
|
||||
@Value("${influxdb.flush.interval:1000}")
|
||||
private int influxFlushInterval;
|
||||
|
||||
@Value("${influxdb.retry.attempts:3}")
|
||||
private int influxRetryAttempts;
|
||||
|
||||
@Value("${influxdb.retry.delay:100}")
|
||||
private int influxRetryDelay;
|
||||
|
||||
// ========== 应用配置 ==========
|
||||
@Value("${app.worker.threads:4}")
|
||||
private int workerThreads;
|
||||
|
||||
@Value("${app.max.queue.size:2000}")
|
||||
private int maxQueueSize;
|
||||
|
||||
@Value("${app.metrics.enabled:false}")
|
||||
private boolean metricsEnabled;
|
||||
|
||||
// ========== 运行环境 ==========
|
||||
@Value("${server.run.environment:prod}")
|
||||
private String runEnvironment;
|
||||
|
||||
// ========== SM4 加密配置 ==========
|
||||
@Value("${syslog.sm4.generateKey:}")
|
||||
private String sm4Key;
|
||||
}
|
||||
Reference in New Issue
Block a user