mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: add version badge in ui
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.reajason.javaweb.boot.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/2/2
|
||||
*/
|
||||
@RestController
|
||||
@CrossOrigin("*")
|
||||
@RequestMapping("/version")
|
||||
public class VersionController {
|
||||
|
||||
@Value("${spring.application.version}")
|
||||
String version;
|
||||
|
||||
@GetMapping
|
||||
public String version() {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user