server_five_liuyunhu
liuyunhu 2024-04-09 11:34:58 +08:00
parent 31e78c3c3c
commit 4101e76188
15 changed files with 34 additions and 30 deletions

View File

@ -17,11 +17,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -15,11 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -36,7 +36,7 @@ import static java.lang.Thread.sleep;
@Component @Component
@Slf4j @Slf4j
public class ModelsKafkaMessage { public class ModelsKafkaMessage {
private static final String TOPIC_NAME = "online"; private static final String TOPIC_NAME = "lyh";
private static final String BOOTSTRAP_SERVERS = "39.103.133.136:9092"; private static final String BOOTSTRAP_SERVERS = "39.103.133.136:9092";
@ -59,7 +59,7 @@ public class ModelsKafkaMessage {
Properties props = new Properties(); Properties props = new Properties();
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, BOOTSTRAP_SERVERS); props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, BOOTSTRAP_SERVERS);
// props.put(ConsumerConfig.GROUP_ID_CONFIG, "my-consumer-group"); // props.put(ConsumerConfig.GROUP_ID_CONFIG, "my-consumer-group");
props.put(ConsumerConfig.GROUP_ID_CONFIG, "ddd"); props.put(ConsumerConfig.GROUP_ID_CONFIG, "lll");
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer"); props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer");
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer"); props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer");

View File

@ -15,11 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: a439ce3f-2c42-4b4c-9c4d-c8db49933c15 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
@ -53,7 +53,7 @@ mybatis-plus:
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
# RabbitMQ配置 # RabbitMQ配置
mq: #mq:
queueName: queue # queueName: queue
exchangeName: exchange # exchangeName: exchange
routingKey: routingKey # routingKey: routingKey

View File

@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
@EnableCustomConfig @EnableCustomConfig
@EnableCustomSwagger2 @EnableCustomSwagger2
@EnableMyFeignClients(basePackages = ("com.couplet")) @EnableMyFeignClients(basePackages = ("com.couplet"))
@SpringBootApplication(scanBasePackages = {"com.couplet", "com.couplet.mq.remote"}) @SpringBootApplication(scanBasePackages = {"com.couplet"})
@EnableScheduling @EnableScheduling
public class CoupletBusinessApplication { public class CoupletBusinessApplication {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -427,7 +427,7 @@ public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> impl
logos.add(logoId); logos.add(logoId);
//存入redis //存入redis
redis.setCacheSet("车辆vin和标识:" + vehicle.getVin(), logos); redis.setCacheSet("车辆vin和标识:" + vehicle.getVin(), logos);
redis.expire("车辆vin和标识:" + vehicle.getVin(), 2, TimeUnit.MINUTES); redis.expire("车辆vin和标识:" + vehicle.getVin(), 5, TimeUnit.MINUTES);
//通过标识id获取标识绑定的电子围栏集合 //通过标识id获取标识绑定的电子围栏集合
@ -438,7 +438,7 @@ public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> impl
fanceSet.add(fence); fanceSet.add(fence);
//存入redis //存入redis
redis.setCacheSet("车辆vin和电子围栏:" + vehicle.getVin(), fanceSet); redis.setCacheSet("车辆vin和电子围栏:" + vehicle.getVin(), fanceSet);
redis.expire("车辆vin和电子围栏:" + vehicle.getVin(), 2, TimeUnit.MINUTES); redis.expire("车辆vin和电子围栏:" + vehicle.getVin(), 5, TimeUnit.MINUTES);
}); });
}); });
}); });

View File

@ -16,11 +16,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -15,11 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -17,11 +17,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -15,11 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -15,11 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -76,7 +76,7 @@ public class MqttMonitor {
//Kafka生产者配置 //Kafka生产者配置
private static final String TOPIC_NAME = "online"; private static final String TOPIC_NAME = "lyh";
private static final String BOOTSTRAP_SERVERS = "39.103.133.136:9092"; private static final String BOOTSTRAP_SERVERS = "39.103.133.136:9092";
//线程池,用于异步处理消息到来时的业务逻辑 //线程池,用于异步处理消息到来时的业务逻辑

View File

@ -15,9 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
@ -36,7 +38,7 @@ mqtt:
# broker: mqtt://115.159.47.13:1883 # broker: mqtt://115.159.47.13:1883
username: username:
password: password:
clientId: xiaoYao clientId: liuyunhu
qos: 0 qos: 0
topic: xiaoYao topic: liuyunhu

View File

@ -15,9 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -15,11 +15,11 @@ spring:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 121.89.211.230:8848 server-addr: 121.89.211.230:8848
namespace: 968741d4-299d-483c-8d30-ede2aff8cfd4 namespace: 172469
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置