yangys
2025-05-26 2ba2c339acf41fd7bb2a49f0ce186fd664a80cb5
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
package com.qianwen.license.controller;
 
import java.util.ArrayList;
import java.util.Arrays;
 
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import com.alibaba.fastjson.JSONObject;
import com.qianwen.license.common.License;
import com.qianwen.license.common.LicenseCreator;
import com.qianwen.license.common.LicenseExtraModel;
import com.qianwen.license.dto.LicenseCreateDTO;
 
 
@RestController
public class LicenseLocalTestController {
    private static Logger logger = LoggerFactory.getLogger(LicenseLocalTestController.class);
    
    
    @GetMapping("check")
    public JSONObject generateLicense() {
        JSONObject result = new JSONObject();
        try {
            
            logger.info("证书正常通过");
            result.put("success", true);
        }catch(Exception e) {
            logger.error("生成证书失败",e);
            result.put("success", false);
            result.put("msg", e.getMessage());
        }
        return result;
    }
}