package com.product;
|
|
import com.product.core.cache.util.RedisUtil;
|
import com.product.core.config.Global;
|
import com.product.module.sys.version.ApiVersion;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.io.File;
|
|
/**
|
* @Author cheng
|
* @Date 2024/12/19 16:45
|
* @Desc
|
*/
|
@RestController
|
@RequestMapping("/api/test")
|
public class TestController {
|
|
|
public static void main(String[] args) {
|
// 读取每个子模块的.git 隐藏文件夹获取每个子模块对应的git仓库地址
|
|
//读取
|
String path = "D:\\work\\Project Work Space\\Product\\product-server-all";
|
File parent = new File(path);
|
|
|
}
|
|
|
@GetMapping("/get/{version}")
|
@ApiVersion(1)
|
public String get() {
|
String result = Global.getSystemConfig("product-server.nacos2", "null");
|
// 获取springboot中的变量
|
|
|
// RedisUtil.addSet("test:123", "test");
|
RedisUtil.delSetAimValue("test:123", "test");
|
|
|
// 返回json字符串 自己拼接
|
return "{\\\"result\\\":\\\"" + result + "\\\" }";
|
}
|
|
}
|