mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
feat: add version badge in ui
This commit is contained in:
+4
-1
@@ -1,8 +1,11 @@
|
||||
ARG VERSION="1.0.0"
|
||||
|
||||
FROM eclipse-temurin:17-jre
|
||||
|
||||
LABEL authors="ReaJason<[email protected]>"
|
||||
|
||||
WORKDIR /app
|
||||
COPY build/libs/boot.jar app.jar
|
||||
COPY build/libs/boot-${ARG}.jar app.jar
|
||||
|
||||
ENV JAVA_OPTS="" \
|
||||
INTER_JAVA_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime=ALL-UNNAMED"
|
||||
|
||||
@@ -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