You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
731 B
Java
26 lines
731 B
Java
|
6 months ago
|
package com.nm.gsgl.controller;
|
||
|
|
|
||
|
|
import com.nm.gsgl.common.utils.PathUtil;
|
||
|
|
import com.nm.gsgl.common.utils.VersionUtils;
|
||
|
|
import com.nm.gsgl.entity.Res;
|
||
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
import java.io.File;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author: shuguang
|
||
|
|
* @date: 2025年01月02日 16:47
|
||
|
|
* @description:
|
||
|
|
*/
|
||
|
|
@RestController
|
||
|
|
public class ProgramVersionController {
|
||
|
|
@PostMapping("/queryProgramVersion")
|
||
|
|
public Res queryProgramVersion() {
|
||
|
|
String versionPath = PathUtil.versionPath;
|
||
|
|
File resourceDir = new File(versionPath);
|
||
|
|
String version = VersionUtils.getVersionFileName(resourceDir);
|
||
|
|
return Res.success(version);
|
||
|
|
}
|
||
|
|
}
|