TSK-617 - Show build version in UI

This commit is contained in:
Jose Ignacio Recuerda Cambil 2018-11-29 12:28:10 +01:00 committed by Holger Hagen
parent aa250c926d
commit 6a7cff5ff3
3 changed files with 11 additions and 4 deletions

View File

@ -22,6 +22,9 @@ devMode=false
####### property that control if the database is cleaned and sample data is generated
generateSampleData=true
####### Property that informs about the Taskana's version. This version is shown the application web
version=@project.version@
####### control LDAP usage
taskana.ldap.useLdap=false
####### properties to connect to LDAP

View File

@ -8,6 +8,10 @@ datasource.password=sa
taskana.schemaName=TASKANA
####### property that control rest api security deploy use true for no security.
devMode=false
####### Property that informs about the Taskana's version. This version is shown the application web
version=@project.version@
####### control LDAP usage
taskana.ldap.useLdap=false
####### properties to connect to LDAP

View File

@ -3,6 +3,7 @@ package pro.taskana.rest;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@ -28,6 +29,9 @@ public class TaskanaEngineController {
@Autowired
TaskanaEngineImpl taskanaEngineImpl;
@Value("${version:Local build}")
private String version;
@GetMapping(path = "/v1/domains", produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<List<String>> getDomains() {
return new ResponseEntity<>(taskanaEngineConfiguration.getDomains(), HttpStatus.OK);
@ -66,10 +70,6 @@ public class TaskanaEngineController {
*/
@GetMapping(path = "/v1/version", produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<VersionResource> currentVersion() {
String version = TaskanaEngineController.class.getPackage().getImplementationVersion();
if (version == null) {
version = "1.0-DEFAULT";
}
VersionResource resource = new VersionResource();
resource.setVersion(version);
return new ResponseEntity<>(resource,