From 996d5ff34835c4035d9dc45cf10b481332117306 Mon Sep 17 00:00:00 2001 From: Eiriksgata <2353686862@qq.com> Date: Fri, 5 Aug 2022 10:14:48 +0800 Subject: [PATCH] Add version query --- .../eiriksgata/rulateday/instruction/ConfigController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rulateday-server/src/main/java/indi/eiriksgata/rulateday/instruction/ConfigController.java b/rulateday-server/src/main/java/indi/eiriksgata/rulateday/instruction/ConfigController.java index efc0702..51df9b4 100644 --- a/rulateday-server/src/main/java/indi/eiriksgata/rulateday/instruction/ConfigController.java +++ b/rulateday-server/src/main/java/indi/eiriksgata/rulateday/instruction/ConfigController.java @@ -6,6 +6,7 @@ import indi.eiriksgata.rulateday.config.GlobalData; import indi.eiriksgata.rulateday.service.DiceConfigService; import indi.eiriksgata.rulateday.utlis.MyBatisUtil; +import java.util.ResourceBundle; @InstructService public class ConfigController { @@ -71,4 +72,10 @@ public String betaVersionOff(MessageData data) { } } + @InstructReflex(value = {".version"}, priority = 3) + public String getProgramVersion(MessageData data) { + ResourceBundle config = ResourceBundle.getBundle("application"); + return "\n" + config.getString("version"); + } + }