Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52c092cde7 | ||
|
|
118729ccb2 | ||
|
|
4c41f6f77e | ||
|
|
90003d79c5 | ||
|
|
778ab69fbc | ||
|
|
c403b07aeb |
@@ -0,0 +1,35 @@
|
|||||||
|
package org.dromara.mica.mqtt.server.config;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.TaskScheduler;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务线程池配置
|
||||||
|
* 解决默认定时任务线程池(大小为1)被阻塞导致所有定时任务无法执行的问题
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Configuration
|
||||||
|
@EnableScheduling
|
||||||
|
public class SchedulerConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public TaskScheduler taskScheduler() {
|
||||||
|
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
|
||||||
|
// 增加线程池大小,避免单线程阻塞影响所有定时任务
|
||||||
|
scheduler.setPoolSize(5);
|
||||||
|
scheduler.setThreadNamePrefix("mqtt-scheduler-");
|
||||||
|
// 等待所有任务完成后再关闭
|
||||||
|
scheduler.setWaitForTasksToCompleteOnShutdown(true);
|
||||||
|
// 等待时间
|
||||||
|
scheduler.setAwaitTerminationSeconds(60);
|
||||||
|
// 设置异常处理器,确保异常被记录但不中断定时任务
|
||||||
|
scheduler.setErrorHandler(throwable -> {
|
||||||
|
log.error("定时任务执行异常", throwable);
|
||||||
|
});
|
||||||
|
return scheduler;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.dromara.mica.mqtt.server.entity;
|
package org.dromara.mica.mqtt.server.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -16,6 +18,7 @@ public class CarInfo implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** customer_id */
|
/** customer_id */
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
/** 白名单生效时间 */
|
/** 白名单生效时间 */
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.dromara.mica.mqtt.server.entity;
|
package org.dromara.mica.mqtt.server.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -22,6 +24,7 @@ public class CarParkItem implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.dromara.mica.mqtt.server.entity;
|
package org.dromara.mica.mqtt.server.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -22,6 +24,7 @@ public class CarPassGather implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.dromara.mica.mqtt.server.entity;
|
package org.dromara.mica.mqtt.server.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -24,6 +26,7 @@ public class CarPassRecord implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package org.dromara.mica.mqtt.server.entity;
|
package org.dromara.mica.mqtt.server.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -16,6 +18,7 @@ public class Equipment implements Serializable {
|
|||||||
|
|
||||||
|
|
||||||
/** 设备Id */
|
/** 设备Id */
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 所属产品Id */
|
/** 所属产品Id */
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.dromara.mica.mqtt.core.annotation.MqttServerFunction;
|
import org.dromara.mica.mqtt.core.annotation.MqttServerFunction;
|
||||||
@@ -58,8 +59,10 @@ public class CarMessageListener {
|
|||||||
|
|
||||||
private static String key = "1234567898765432";
|
private static String key = "1234567898765432";
|
||||||
|
|
||||||
// private String jinjiangUrl = "http://127.0.0.1:6609/";
|
//xa、jl、td、xj
|
||||||
private String jinjiangUrl = "http://192.168.155.42:6609/";
|
private String jinjiangUrl = "http://127.0.0.1:6609/";
|
||||||
|
//zr
|
||||||
|
// private String jinjiangUrl = "http://192.168.155.42:6609/";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 心跳
|
* 心跳
|
||||||
@@ -114,6 +117,8 @@ public class CarMessageListener {
|
|||||||
public void ivs_result(String topic, Map<String, String> topicVars, byte[] message) throws Exception {
|
public void ivs_result(String topic, Map<String, String> topicVars, byte[] message) throws Exception {
|
||||||
String sn = topicVars.get("sn");
|
String sn = topicVars.get("sn");
|
||||||
log.info("接收到车辆识别消息 -> Topic: {}", topic);
|
log.info("接收到车辆识别消息 -> Topic: {}", topic);
|
||||||
|
CarParkItem carParkItem = carParkItemService.selectBySn(sn);
|
||||||
|
|
||||||
String data = new String(message, StandardCharsets.UTF_8);
|
String data = new String(message, StandardCharsets.UTF_8);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(data);
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||||
JSONObject payload = jsonObject.getJSONObject("payload");
|
JSONObject payload = jsonObject.getJSONObject("payload");
|
||||||
@@ -152,18 +157,24 @@ public class CarMessageListener {
|
|||||||
if (null != imgRsp && imgRsp.getInteger("code") == 200) {
|
if (null != imgRsp && imgRsp.getInteger("code") == 200) {
|
||||||
record.setUrl(imgRsp.getJSONObject("data").getString("url"));
|
record.setUrl(imgRsp.getJSONObject("data").getString("url"));
|
||||||
}
|
}
|
||||||
// record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
if (plateResult.containsKey("start_time")) {
|
||||||
record.setPassTime(new Date());
|
log.info("拿到了时间:{}", plateResult.getLong("start_time"));
|
||||||
|
record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
||||||
|
} else {
|
||||||
|
log.info("没有拿到时间,默认当前时间");
|
||||||
|
record.setPassTime(DateUtil.date(new Date()));
|
||||||
|
}
|
||||||
record.setSn(sn);
|
record.setSn(sn);
|
||||||
record.setUniqueNo(id);
|
record.setUniqueNo(id);
|
||||||
|
record.setParkId(carParkItem.getParkId());
|
||||||
record.setTriggerType(plateResult.getString("triggerType"));
|
record.setTriggerType(plateResult.getString("triggerType"));
|
||||||
record.setType(carBrand.getString("type"));
|
record.setType(carBrand.getString("type"));
|
||||||
carPassRecordService.save(record);
|
carPassRecordService.save(record);
|
||||||
|
|
||||||
//保存/删除在场数据
|
//保存/删除在场数据
|
||||||
CarParkItem carParkItem = carParkItemService.selectBySn(sn);
|
boolean isExist = carPassGatherService.exists(new QueryWrapper<CarPassGather>().eq("license", license));
|
||||||
//入场新增数据
|
//入场新增数据
|
||||||
if (StrUtil.equals(carParkItem.getWay(), "0")) {
|
if (StrUtil.equals(carParkItem.getWay(), "0") && !isExist) {
|
||||||
CarPassGather carPassGather = new CarPassGather();
|
CarPassGather carPassGather = new CarPassGather();
|
||||||
carPassGather.setLicense(license);
|
carPassGather.setLicense(license);
|
||||||
carPassGather.setParkId(carParkItem.getParkId());
|
carPassGather.setParkId(carParkItem.getParkId());
|
||||||
@@ -171,7 +182,7 @@ public class CarMessageListener {
|
|||||||
carPassGather.setJoinTime(record.getPassTime());
|
carPassGather.setJoinTime(record.getPassTime());
|
||||||
carPassGather.setSn(sn);
|
carPassGather.setSn(sn);
|
||||||
carPassGatherService.save(carPassGather);
|
carPassGatherService.save(carPassGather);
|
||||||
} else {//出场删除数据
|
} else if (StrUtil.equals(carParkItem.getWay(), "1") && isExist) {//出场删除数据
|
||||||
carPassGatherService.deleteByLicense(license);
|
carPassGatherService.deleteByLicense(license);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -225,8 +236,13 @@ public class CarMessageListener {
|
|||||||
if (null != imgRsp && imgRsp.getInteger("code") == 200) {
|
if (null != imgRsp && imgRsp.getInteger("code") == 200) {
|
||||||
record.setUrl(imgRsp.getJSONObject("data").getString("url"));
|
record.setUrl(imgRsp.getJSONObject("data").getString("url"));
|
||||||
}
|
}
|
||||||
// record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
if (plateResult.containsKey("start_time")) {
|
||||||
record.setPassTime(new Date());
|
log.info("拿到了离线时间:{}", plateResult.getLong("start_time"));
|
||||||
|
record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
||||||
|
} else {
|
||||||
|
log.info("没有拿到离线时间,默认当前时间");
|
||||||
|
record.setPassTime(DateUtil.date(new Date()));
|
||||||
|
}
|
||||||
record.setSn(sn);
|
record.setSn(sn);
|
||||||
record.setUniqueNo(id);
|
record.setUniqueNo(id);
|
||||||
record.setTriggerType(plateResult.getString("triggerType"));
|
record.setTriggerType(plateResult.getString("triggerType"));
|
||||||
|
|||||||
@@ -80,7 +80,11 @@ public class RedisService {
|
|||||||
*/
|
*/
|
||||||
public <T> void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit)
|
public <T> void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
|
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Redis setCacheObject error: key={}", key, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -127,7 +131,12 @@ public class RedisService {
|
|||||||
*/
|
*/
|
||||||
public Boolean hasKey(String key)
|
public Boolean hasKey(String key)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
return redisTemplate.hasKey(key);
|
return redisTemplate.hasKey(key);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Redis hasKey error: key={}", key, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -138,8 +147,13 @@ public class RedisService {
|
|||||||
*/
|
*/
|
||||||
public <T> T getCacheObject(final String key)
|
public <T> T getCacheObject(final String key)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
ValueOperations<String, T> operation = redisTemplate.opsForValue();
|
ValueOperations<String, T> operation = redisTemplate.opsForValue();
|
||||||
return operation.get(key);
|
return operation.get(key);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("Redis getCacheObject error: key={}", key, e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public class HeartbeatOnLineTask {
|
|||||||
|
|
||||||
@Scheduled(fixedRate = 15 * 1000)
|
@Scheduled(fixedRate = 15 * 1000)
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// 添加异常捕获,防止单个任务异常导致定时任务线程阻塞
|
||||||
|
try {
|
||||||
log.info("===========心跳检测=============");
|
log.info("===========心跳检测=============");
|
||||||
//查询车辆摄像头的编码和在线状态
|
//查询车辆摄像头的编码和在线状态
|
||||||
List<Equipment> equipment = equipmentService.selectAllSnFlag();
|
List<Equipment> equipment = equipmentService.selectAllSnFlag();
|
||||||
@@ -50,8 +52,10 @@ public class HeartbeatOnLineTask {
|
|||||||
equipmentService.updateFlag(equip.getSequence(), FlagEnums.OFFLINE.getCode());
|
equipmentService.updateFlag(equip.getSequence(), FlagEnums.OFFLINE.getCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 捕获所有异常并记录日志,确保定时任务能继续执行
|
||||||
|
log.error("HeartbeatOnLineTask 定时任务执行异常", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ public class PlatePublishTask {
|
|||||||
*/
|
*/
|
||||||
@Scheduled(fixedDelay = 8 * 1000)
|
@Scheduled(fixedDelay = 8 * 1000)
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// 添加异常捕获,防止单个任务异常导致定时任务线程阻塞
|
||||||
|
try {
|
||||||
String whiteUrl = "device/%s/message/down/white_list_operator";
|
String whiteUrl = "device/%s/message/down/white_list_operator";
|
||||||
|
|
||||||
//新增&编辑车牌
|
//新增&编辑车牌
|
||||||
@@ -136,7 +138,10 @@ public class PlatePublishTask {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 捕获所有异常并记录日志,确保定时任务能继续执行
|
||||||
|
log.error("PlatePublishTask 定时任务执行异常", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,33 @@
|
|||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/xa_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://127.0.0.1:3306/xa_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=5000&socketTimeout=30000
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
|
# Druid 连接池配置
|
||||||
|
druid:
|
||||||
|
max-active: 20
|
||||||
|
max-wait: 60000
|
||||||
|
min-idle: 5
|
||||||
|
initial-size: 5
|
||||||
|
validation-query: SELECT 1
|
||||||
|
test-while-idle: true
|
||||||
|
test-on-borrow: false
|
||||||
|
test-on-return: false
|
||||||
|
time-between-eviction-runs-millis: 60000
|
||||||
|
min-evictable-idle-time-millis: 300000
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
|
# host: 127.0.0.1
|
||||||
host: 192.168.2.30
|
host: 192.168.2.30
|
||||||
password: redis2025
|
password: redis2025
|
||||||
database: 5
|
database: 5
|
||||||
port: 6379
|
port: 6379
|
||||||
|
# Redis 超时配置,防止连接阻塞
|
||||||
|
timeout: 5000ms
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
max-active: 8
|
||||||
|
max-idle: 8
|
||||||
|
min-idle: 2
|
||||||
|
max-wait: 5000ms
|
||||||
|
|||||||
@@ -2,27 +2,51 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
#xa
|
#xa
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/xa_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://127.0.0.1:3306/xa_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=5000&socketTimeout=30000
|
||||||
# username: root
|
# username: root
|
||||||
# password: Xahg2024.
|
# password: Xahg2024.
|
||||||
#jl
|
#jl
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/jl_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://127.0.0.1:3306/jl_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=5000&socketTimeout=30000
|
||||||
# username: root
|
# username: root
|
||||||
# password: JL202509jj
|
# password: JL202509jj
|
||||||
#td
|
#td
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/td_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://127.0.0.1:3306/td_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=5000&socketTimeout=30000
|
||||||
# username: root
|
# username: root
|
||||||
# password: td@JJ2024
|
# password: td@JJ2024
|
||||||
#zr
|
#zr
|
||||||
url: jdbc:mysql://192.168.155.42:3306/zr_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.155.42:3306/zr_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=5000&socketTimeout=30000
|
||||||
|
# username: root
|
||||||
|
# password: zr202407.J
|
||||||
|
#xj
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/xj_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=5000&socketTimeout=30000
|
||||||
username: root
|
username: root
|
||||||
password: zr202407.J
|
password: XjJN2024!
|
||||||
|
# Druid 连接池配置
|
||||||
|
druid:
|
||||||
|
max-active: 20
|
||||||
|
max-wait: 60000
|
||||||
|
min-idle: 5
|
||||||
|
initial-size: 5
|
||||||
|
validation-query: SELECT 1
|
||||||
|
test-while-idle: true
|
||||||
|
test-on-borrow: false
|
||||||
|
test-on-return: false
|
||||||
|
time-between-eviction-runs-millis: 60000
|
||||||
|
min-evictable-idle-time-millis: 300000
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
#zr
|
#zr
|
||||||
host: 192.168.155.42
|
# host: 192.168.155.42
|
||||||
#xa、jl、td
|
#xa、jl、td、xj
|
||||||
# host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
password:
|
password:
|
||||||
database: 1
|
database: 1
|
||||||
|
# Redis 超时配置,防止连接阻塞
|
||||||
|
timeout: 5000ms
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
max-active: 8
|
||||||
|
max-idle: 8
|
||||||
|
min-idle: 2
|
||||||
|
max-wait: 5000ms
|
||||||
|
|||||||
@@ -127,3 +127,8 @@ logging:
|
|||||||
server: info # t-io 服务端默认日志
|
server: info # t-io 服务端默认日志
|
||||||
org.tio: info # t-io 服务端默认日志
|
org.tio: info # t-io 服务端默认日志
|
||||||
org.dromara.mica.mqtt: info # mica-mqtt 日志
|
org.dromara.mica.mqtt: info # mica-mqtt 日志
|
||||||
|
org.dromara.mica.mqtt.server.task: debug # 定时任务日志级别
|
||||||
|
|
||||||
|
# 定时任务线程池配置
|
||||||
|
scheduler:
|
||||||
|
pool-size: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user