增加后端版本展示
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.core.web.controller.system;
|
||||
|
||||
import com.core.common.config.CoreConfig;
|
||||
import com.core.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 系统版本信息
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system")
|
||||
public class SysVersionController {
|
||||
|
||||
@Autowired
|
||||
private CoreConfig coreConfig;
|
||||
|
||||
/**
|
||||
* 获取后端版本号
|
||||
*/
|
||||
@GetMapping("/version")
|
||||
public AjaxResult getVersion() {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("backendVersion", coreConfig.getVersion());
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user