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); } }