This commit is contained in:
chenjianxing 2020-06-04 16:09:03 +08:00
parent 5833c3b902
commit d4d09ccf0d
2 changed files with 9 additions and 5 deletions

View File

@ -2,10 +2,7 @@ package io.metersphere.controller;
import io.metersphere.base.domain.SystemParameter;
import io.metersphere.service.SystemParameterService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
@ -27,4 +24,9 @@ public class SystemParameterController {
SystemParameterService.testConnection(hashMap);
}
@GetMapping("/version")
public String getVersion() {
return SystemParameterService.getVersion();
}
}

View File

@ -83,7 +83,9 @@ public class SystemParameterService {
} catch (MessagingException e) {
MSException.throwException(Translator.get("connection_failed"));
}
}
public String getVersion() {
return System.getenv("MS_VERSION");
}
}