This commit is contained in:
parent
5833c3b902
commit
d4d09ccf0d
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -83,7 +83,9 @@ public class SystemParameterService {
|
|||
} catch (MessagingException e) {
|
||||
MSException.throwException(Translator.get("connection_failed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getVersion() {
|
||||
return System.getenv("MS_VERSION");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue