reSkyWallking

master
冯凯 2023-12-13 13:00:42 +08:00
parent 7bf8236f3a
commit 207c7c66fa
3 changed files with 15 additions and 6 deletions

View File

@ -74,6 +74,11 @@
<artifactId>fastjson</artifactId>
<version>2.0.32</version>
</dependency>
<dependency>
<groupId>com.taobao.arthas</groupId>
<artifactId>arthas-boot</artifactId>
<version>3.7.1</version>
</dependency>
</dependencies>
<distributionManagement>

View File

@ -52,19 +52,20 @@ public class VehicleOnlineController {
@PostMapping("/upd")
public void updRedis() {
List<String> strings = redisService.getCacheList("vin");
redisService.deleteObject("vin");
Collections.addAll(strings, "123456", "888888");
// List<String> strings = redisService.getCacheList("vin");
// redisService.deleteObject("vin");
//
// Collections.addAll(strings, "123456", "888888");
// System.out.println(cacheList);
redisService.setCacheList("vin", strings);
//
log.info("你好java");
}
@PostMapping("/fence/{vin}")
public void fence(@PathVariable String vin) {
// ArrayList<String> fenceList = new ArrayList<>();
// fenceList.add("fenceEvent");
redisService.setCacheObject(vin, "java", 10L, TimeUnit.SECONDS);
}

View File

@ -25,3 +25,6 @@ spring:
publisher-returns: true #确认消息已发送到队列(Queue)
server:
port: 8067
arthas:
agent:
args: -Darthas.telnet.port=7777