package org.funtime.services;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * Created by uv on 22.01.2016 for awstest
 * this URL can be configured for AWS elastic load balancer
 */
@RestController
public class StatusController {

    @RequestMapping(value = "/health", method = RequestMethod.GET)
    public ResponseEntity<String> checkHealth() {
        return ResponseEntity.ok("HealthCheck called at " + new Date().toString());
    }
}

@@ -24,16 +24,107 @@
 vices;%0A%0A
+import org.funtime.Version;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0A
 import o
@@ -163,16 +163,16 @@
 Entity;%0A
-
 import o
@@ -536,16 +536,53 @@
 ller %7B%0A%0A
+    @Autowired%0A    Version version;%0A%0A
     @Req
@@ -690,16 +690,16 @@
 lth() %7B%0A
-
         
@@ -771,16 +771,194 @@
 String()
+%0A                                         + %22 for Version.bn: %22 + version.getBuildNumber()%0A                                         + %22 for Version.sr: %22 + version.getSimpleRef()
 );%0A    %7D

access spring configuration properties correctly in JSP