Commit 562387af by guo_minglei@163.com

redis修改连接信息

parent 629ca38a
package com.byit.api;
import com.byit.dto.web.ResponseResult;
import com.byit.service.ApiNodeService;
import io.swagger.annotations.Api;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -16,10 +18,19 @@ public class ApiNodeController {
@Resource
private ApiNodeService apiNodeService;
@Resource
private StringRedisTemplate stringRedisTemplate;
@PostMapping("runNode")
public String runNode(String param){
String monitorKey = apiNodeService.runNode(param);
return monitorKey;
}
@RequestMapping("/test")
public ResponseResult test(String key){
stringRedisTemplate.opsForValue().set(key, "123");
return ResponseResult.ok("ok");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment