许鹏程
2025-01-02 307451c2a3d48b1e5606ab260421fe1bcd4f9585
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 + "\\\" }";
    }
 
}