feat():修复Redis缓存
parent
c87bf8a2fa
commit
f98c11e825
|
@ -4,6 +4,8 @@ import com.muyu.common.cache.CacheAbsBasic;
|
||||||
import com.muyu.domain.MessageValue;
|
import com.muyu.domain.MessageValue;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @Author xie ya ru
|
* @Author xie ya ru
|
||||||
|
@ -11,7 +13,7 @@ import org.springframework.stereotype.Component;
|
||||||
* @注释
|
* @注释
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class MessageValueCacheService extends CacheAbsBasic<String, MessageValue> {
|
public class MessageValueCacheService extends CacheAbsBasic<String, List<MessageValue>>{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 前缀
|
* 前缀
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.muyu.enterpise.cache;
|
||||||
|
|
||||||
|
import com.muyu.common.cache.CacheAbsBasic;
|
||||||
|
import com.muyu.domain.SysCar;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author xie ya ru
|
||||||
|
* @Date 2024/9/30 11:06
|
||||||
|
* @注释
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class SysCarCacheService extends CacheAbsBasic<String, SysCar> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String keyPre() {
|
||||||
|
return "sysCar:info:";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encode(String key) {
|
||||||
|
return super.encode(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String decode(String key) {
|
||||||
|
return super.decode(key);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.muyu.enterpise.cache;
|
||||||
|
|
||||||
|
import com.muyu.common.cache.CacheAbsBasic;
|
||||||
|
import com.muyu.domain.SysCarType;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @version 1.0
|
||||||
|
* @Author xie ya ru
|
||||||
|
* @Date 2024/9/30 11:18
|
||||||
|
* @注释
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class SysCarTypeCacheService extends CacheAbsBasic<String, SysCarType> {
|
||||||
|
@Override
|
||||||
|
public String keyPre() {
|
||||||
|
return "sysCarType:info:";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encode(String key) {
|
||||||
|
return super.encode(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String decode(String key) {
|
||||||
|
return super.decode(key);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1 +1,2 @@
|
||||||
com.muyu.enterpise.cache.MessageValueCacheService
|
com.muyu.enterpise.cache.MessageValueCacheService
|
||||||
|
com.muyu.enterpise.cache.SysCarCacheService
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class SysCarType extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
@Schema(name = "车辆类型主键")
|
@Schema(name = "车辆类型主键")
|
||||||
private String id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆类型名称
|
* 车辆类型名称
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class MessageValueController extends BaseController {
|
||||||
private MessageValueService messageValueService;
|
private MessageValueService messageValueService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MessageValueCacheService enterpiseCacheService;
|
private MessageValueCacheService messageValueCacheService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报文数据列表查询
|
* 报文数据列表查询
|
||||||
|
@ -56,7 +56,6 @@ public class MessageValueController extends BaseController {
|
||||||
@Operation(summary = "添加报文数据", description = "新增报文数据")
|
@Operation(summary = "添加报文数据", description = "新增报文数据")
|
||||||
public Result<String> save(@RequestBody MessageValueAddReq messageValueAddReq){
|
public Result<String> save(@RequestBody MessageValueAddReq messageValueAddReq){
|
||||||
messageValueService.save(MessageValue.addBuild(messageValueAddReq));
|
messageValueService.save(MessageValue.addBuild(messageValueAddReq));
|
||||||
enterpiseCacheService.put(String.valueOf(messageValueAddReq.getTemplateId()),MessageValue.addBuild(messageValueAddReq));
|
|
||||||
return Result.success("添加成功");
|
return Result.success("添加成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,12 +80,4 @@ public class MessageValueController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping({"/findByTemplateId/{stringVin}"})
|
|
||||||
@Operation(
|
|
||||||
summary = "根据车辆类型查询报文模版ID",
|
|
||||||
description = "根据车辆类型查询报文模版ID"
|
|
||||||
)
|
|
||||||
public Result<Long> findByTemplateId(@PathVariable("stringVin") String stringVin) {
|
|
||||||
return Result.success(this.messageValueService.findByTemplateId(stringVin), "查询成功");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.domain.SysCar;
|
import com.muyu.domain.SysCar;
|
||||||
import com.muyu.domain.req.SysCarReq;
|
import com.muyu.domain.req.SysCarReq;
|
||||||
import com.muyu.domain.resp.SysCarResp;
|
import com.muyu.domain.resp.SysCarResp;
|
||||||
|
import com.muyu.enterpise.cache.SysCarCacheService;
|
||||||
import com.muyu.enterpise.service.SysCarService;
|
import com.muyu.enterpise.service.SysCarService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
@ -30,6 +31,9 @@ public class SysCarController extends BaseController
|
||||||
@Resource
|
@Resource
|
||||||
private SysCarService sysCarService;
|
private SysCarService sysCarService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysCarCacheService sysCarCacheService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆基础信息列表
|
* 查询车辆基础信息列表
|
||||||
*/
|
*/
|
||||||
|
@ -63,7 +67,9 @@ public class SysCarController extends BaseController
|
||||||
if (sysCarService.checkIdUnique(sysCar)) {
|
if (sysCarService.checkIdUnique(sysCar)) {
|
||||||
return error("新增 车辆基础信息 '" + sysCar + "'失败,车辆基础信息已存在");
|
return error("新增 车辆基础信息 '" + sysCar + "'失败,车辆基础信息已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
sysCar.setCreateBy(SecurityUtils.getUsername());
|
sysCar.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
sysCarCacheService.put(sysCar.getCarVin(),sysCar);
|
||||||
return toAjax(sysCarService.save(sysCar));
|
return toAjax(sysCarService.save(sysCar));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.domain.SysCarType;
|
import com.muyu.domain.SysCarType;
|
||||||
|
import com.muyu.enterpise.cache.SysCarCacheService;
|
||||||
|
import com.muyu.enterpise.cache.SysCarTypeCacheService;
|
||||||
import com.muyu.enterpise.service.SysTypeService;
|
import com.muyu.enterpise.service.SysTypeService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -29,6 +31,9 @@ public class SysTypeController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private SysTypeService sysTypeService;
|
private SysTypeService sysTypeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysCarTypeCacheService sysCarTypeCacheService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆类型列表
|
* 查询车辆类型列表
|
||||||
|
@ -37,6 +42,10 @@ public class SysTypeController extends BaseController {
|
||||||
public Result<TableDataInfo<SysCarType>> list() {
|
public Result<TableDataInfo<SysCarType>> list() {
|
||||||
startPage();
|
startPage();
|
||||||
List<SysCarType> list = sysTypeService.selectSysTypeList();
|
List<SysCarType> list = sysTypeService.selectSysTypeList();
|
||||||
|
for (SysCarType sysCarType : list) {
|
||||||
|
sysCarTypeCacheService.put(String.valueOf(sysCarType.getId()),sysCarType);
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,5 @@ import org.apache.ibatis.annotations.Select;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface MessageValueMapper extends BaseMapper<MessageValue> {
|
public interface MessageValueMapper extends BaseMapper<MessageValue> {
|
||||||
@Select({"SELECT sct.message_template_id FROM sys_car sc LEFT JOIN sys_car_type sct on sct.id = sc.car_type WHERE sc.car_vin = ${stringVin}"})
|
|
||||||
Long findByTemplateId(String stringVin);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,6 @@ public interface MessageValueService extends IService<MessageValue> {
|
||||||
* @param str
|
* @param str
|
||||||
*/
|
*/
|
||||||
void test(String str);
|
void test(String str);
|
||||||
Long findByTemplateId(String stringVin);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.domain.MessageValue;
|
import com.muyu.domain.MessageValue;
|
||||||
import com.muyu.domain.req.MessageValueReq;
|
import com.muyu.domain.req.MessageValueReq;
|
||||||
import com.muyu.domain.resp.MessageValueListResp;
|
import com.muyu.domain.resp.MessageValueListResp;
|
||||||
|
import com.muyu.enterpise.cache.MessageValueCacheService;
|
||||||
import com.muyu.enterpise.mapper.MessageValueMapper;
|
import com.muyu.enterpise.mapper.MessageValueMapper;
|
||||||
import com.muyu.enterpise.service.MessageValueService;
|
import com.muyu.enterpise.service.MessageValueService;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
@ -30,7 +31,8 @@ public class MessageValueServiceImpl
|
||||||
@Resource
|
@Resource
|
||||||
private MessageValueMapper messageValueMapper;
|
private MessageValueMapper messageValueMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MessageValueCacheService messageValueCacheService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有消息值
|
* 查询所有消息值
|
||||||
|
@ -53,7 +55,9 @@ public class MessageValueServiceImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MessageValue> list = this.list(queryWrapper);
|
List<MessageValue> list = this.list(queryWrapper);
|
||||||
|
// for (MessageValue messageValue : list) {
|
||||||
|
// messageValueCacheService.put(String.valueOf(messageValue.getTemplateId()),list);
|
||||||
|
// }
|
||||||
|
|
||||||
return list.stream()
|
return list.stream()
|
||||||
.map(messageValue -> MessageValueListResp.valueBuild(
|
.map(messageValue -> MessageValueListResp.valueBuild(
|
||||||
|
@ -77,10 +81,7 @@ public class MessageValueServiceImpl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long findByTemplateId(String stringVin) {
|
|
||||||
return messageValueMapper.findByTemplateId(stringVin);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,12 +106,13 @@
|
||||||
<artifactId>enterpise-cache</artifactId>
|
<artifactId>enterpise-cache</artifactId>
|
||||||
<version>${muyu.version}</version>
|
<version>${muyu.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- kafka 公共配置 -->
|
<!-- kafka 公共配置 -->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>com.muyu</groupId>-->
|
<groupId>com.muyu</groupId>
|
||||||
<!-- <artifactId>cloud-common-kafka</artifactId>-->
|
<artifactId>cloud-common-kafka</artifactId>
|
||||||
<!-- <version>${muyu.version}</version>-->
|
<version>${muyu.version}</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,20 @@
|
||||||
package com.muyu.parse.process;
|
package com.muyu.parse.process;
|
||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.muyu.common.kafka.config.KafkaProducerConfig;
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
|
|
||||||
import com.muyu.domain.MessageValue;
|
import com.muyu.domain.MessageValue;
|
||||||
import com.muyu.domain.req.MessageValueReq;
|
import com.muyu.domain.SysCar;
|
||||||
import com.muyu.domain.resp.MessageValueListResp;
|
import com.muyu.domain.SysCarType;
|
||||||
import com.muyu.enterpise.cache.MessageValueCacheService;
|
import com.muyu.enterpise.cache.MessageValueCacheService;
|
||||||
|
import com.muyu.enterpise.cache.SysCarCacheService;
|
||||||
|
import com.muyu.enterpise.cache.SysCarTypeCacheService;
|
||||||
import com.muyu.parse.uitl.DataParseUtil;
|
import com.muyu.parse.uitl.DataParseUtil;
|
||||||
import com.muyu.remote.RemoteMessageValueService;
|
import com.muyu.remote.RemoteMessageValueService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @Author xie ya ru
|
* @Author xie ya ru
|
||||||
|
@ -28,58 +27,37 @@ public class ProcessData {
|
||||||
@Resource
|
@Resource
|
||||||
private static RemoteMessageValueService remoteMessageValueService;
|
private static RemoteMessageValueService remoteMessageValueService;
|
||||||
|
|
||||||
|
//报文模版信息
|
||||||
@Resource
|
@Resource
|
||||||
private static MessageValueCacheService enterpiseCacheService;
|
private static MessageValueCacheService messageValueCacheService;
|
||||||
|
|
||||||
|
//车辆信息
|
||||||
|
@Resource
|
||||||
|
private static SysCarCacheService sysCarCacheService;
|
||||||
|
|
||||||
|
//车辆类型信息
|
||||||
|
@Resource
|
||||||
|
private static SysCarTypeCacheService sysCarTypeCacheService;
|
||||||
|
|
||||||
// @Resource
|
// @Resource
|
||||||
// private static KafkaProducerConfig kafkaProducerConfig;
|
// private static KafkaProducerConfig kafkaProducerConfig;
|
||||||
|
|
||||||
public static void DataConversion(String jsonVin ) {
|
public static void DataConversion(String jsonVin ) {
|
||||||
|
//设置数组存储车辆数据
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
String vin = DataParseUtil.dataParsing(jsonVin);
|
String vin = DataParseUtil.dataParsing(jsonVin);
|
||||||
System.out.println("车辆转换的vin是:"+vin);
|
System.out.println("车辆转换的vin是:"+vin);
|
||||||
|
|
||||||
//从Redis中获取车辆信息
|
//判断vin是否存在缓存中
|
||||||
|
if(sysCarCacheService.hashKey(vin)){
|
||||||
|
//从Redis中获取车辆信息
|
||||||
|
SysCar sysCar = sysCarCacheService.get(vin);
|
||||||
|
//根据缓存车辆类型获取缓存报文
|
||||||
|
SysCarType sysCarType = sysCarTypeCacheService.get(String.valueOf(sysCar.getCarType()));
|
||||||
|
|
||||||
//根据车辆信息获取车辆类型
|
//获取报文模版信息
|
||||||
|
List<MessageValue> messageValues = messageValueCacheService.get(String.valueOf(sysCarType.getMessageTemplateId()));
|
||||||
|
for (MessageValue messageValue : messageValues) {
|
||||||
|
|
||||||
|
|
||||||
Result<Long> byTemplateId = remoteMessageValueService.findByTemplateId(vin);
|
|
||||||
|
|
||||||
Long templateId = byTemplateId.getData();
|
|
||||||
List<MessageValueListResp> templateList;
|
|
||||||
try{
|
|
||||||
//从Redis中获取报文模版信息
|
|
||||||
if ( enterpiseCacheService.hashKey(String.valueOf(templateId))) {
|
|
||||||
|
|
||||||
List<Object> list = Collections.singletonList(enterpiseCacheService.get(String.valueOf(templateId)));
|
|
||||||
templateList = list.stream()
|
|
||||||
.map(obj -> JSON.parseObject(obj.toString(), MessageValueListResp.class))
|
|
||||||
.toList();
|
|
||||||
log.info("Redis缓存查询成功");
|
|
||||||
} else {
|
|
||||||
|
|
||||||
Result<List<MessageValueListResp>> byTemplate = remoteMessageValueService.findAll(MessageValueReq.builder().messageTemplateId(templateId).build());
|
|
||||||
templateList = byTemplate.getData();
|
|
||||||
templateList.forEach(
|
|
||||||
listResp ->{
|
|
||||||
enterpiseCacheService.put(String.valueOf(listResp.getMessageId()), MessageValue.addRollback(listResp));
|
|
||||||
}
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
|
||||||
log.info("数据库查询成功");
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException("获取报文模板失败");
|
|
||||||
}
|
|
||||||
//判断报文模板列表不为空
|
|
||||||
if (templateList.isEmpty()) {
|
|
||||||
throw new RuntimeException("报文模版为空");
|
|
||||||
}
|
|
||||||
//存储报文模版解析后的数据
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
for (MessageValueListResp messageValue : templateList) {
|
|
||||||
//起始位下标
|
//起始位下标
|
||||||
Integer startIndex = messageValue.getMessageStartIndex() - 1;
|
Integer startIndex = messageValue.getMessageStartIndex() - 1;
|
||||||
//结束位下标
|
//结束位下标
|
||||||
|
@ -90,8 +68,57 @@ public class ProcessData {
|
||||||
System.out.println("标签"+messageValue.getMessageLabel()+"值"+value);
|
System.out.println("标签"+messageValue.getMessageLabel()+"值"+value);
|
||||||
jsonObject.put(messageValue.getMessageLabel(), value);
|
jsonObject.put(messageValue.getMessageLabel(), value);
|
||||||
}
|
}
|
||||||
System.out.println(jsonObject);
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Result<Long> byTemplateId = remoteMessageValueService.findByTemplateId(vin);
|
||||||
|
//
|
||||||
|
// Long templateId = byTemplateId.getData();
|
||||||
|
// List<MessageValueListResp> templateList;
|
||||||
|
// try{
|
||||||
|
//从Redis中获取报文模版信息
|
||||||
|
// if ( enterpiseCacheService.hashKey(String.valueOf(templateId))) {
|
||||||
|
//
|
||||||
|
// List<Object> list = Collections.singletonList(enterpiseCacheService.get(String.valueOf(templateId)));
|
||||||
|
// templateList = list.stream()
|
||||||
|
// .map(obj -> JSON.parseObject(obj.toString(), MessageValueListResp.class))
|
||||||
|
// .toList();
|
||||||
|
// log.info("Redis缓存查询成功");
|
||||||
|
// } else {
|
||||||
|
//
|
||||||
|
// Result<List<MessageValueListResp>> byTemplate = remoteMessageValueService.findAll(MessageValueReq.builder().messageTemplateId(templateId).build());
|
||||||
|
// templateList = byTemplate.getData();
|
||||||
|
// templateList.forEach(
|
||||||
|
// listResp ->{
|
||||||
|
// enterpiseCacheService.put(String.valueOf(listResp.getMessageId()), MessageValue.addRollback(listResp));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// log.info("数据库查询成功");
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// throw new RuntimeException("获取报文模板失败");
|
||||||
|
// }
|
||||||
|
// //判断报文模板列表不为空
|
||||||
|
// if (templateList.isEmpty()) {
|
||||||
|
// throw new RuntimeException("报文模版为空");
|
||||||
|
// }
|
||||||
|
// //存储报文模版解析后的数据
|
||||||
|
// JSONObject jsonObject = new JSONObject();
|
||||||
|
// for (MessageValueListResp messageValue : templateList) {
|
||||||
|
// //起始位下标
|
||||||
|
// Integer startIndex = messageValue.getMessageStartIndex() - 1;
|
||||||
|
// //结束位下标
|
||||||
|
// Integer endIndex = messageValue.getMessageEndIndex();
|
||||||
|
// //根据报文模版截取数据
|
||||||
|
// String value = vin.substring(startIndex, endIndex);
|
||||||
|
// //存入数据
|
||||||
|
// System.out.println("标签"+messageValue.getMessageLabel()+"值"+value);
|
||||||
|
// jsonObject.put(messageValue.getMessageLabel(), value);
|
||||||
|
// }
|
||||||
|
// System.out.println(jsonObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,39 +53,6 @@
|
||||||
<version>0.2.21</version>
|
<version>0.2.21</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <!– Cloud Gateway –>-->
|
|
||||||
<!-- <!– SpringCloud Gateway –>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.springframework.cloud</groupId>-->
|
|
||||||
<!-- <artifactId>spring-cloud-starter-gateway</artifactId>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <!– SpringCloud Alibaba Sentinel Gateway –>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
|
||||||
<!-- <artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <!– Sentinel Datasource Nacos –>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.alibaba.csp</groupId>-->
|
|
||||||
<!-- <artifactId>sentinel-datasource-nacos</artifactId>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <!– SpringCloud Loadbalancer –>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.springframework.cloud</groupId>-->
|
|
||||||
<!-- <artifactId>spring-cloud-loadbalancer</artifactId>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <!– MuYu Common Redis–>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.muyu</groupId>-->
|
|
||||||
<!-- <artifactId>cloud-common-redis</artifactId>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.github.xiaoymin</groupId>-->
|
|
||||||
<!-- <artifactId>knife4j-gateway-spring-boot-starter</artifactId>-->
|
|
||||||
<!-- <version>4.5.0</version>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Nacos -->
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
|
Loading…
Reference in New Issue