This commit is contained in:
Phillip Webb
2016-12-30 11:10:44 -08:00
parent f8acaae115
commit 273beaa3ce
13 changed files with 39 additions and 44 deletions

View File

@@ -33,7 +33,8 @@ public class SampleController {
private final GaugeService gauges;
public SampleController(HelloWorldProperties helloWorldProperties, GaugeService gauges) {
public SampleController(HelloWorldProperties helloWorldProperties,
GaugeService gauges) {
this.helloWorldProperties = helloWorldProperties;
this.gauges = gauges;
}
@@ -42,8 +43,8 @@ public class SampleController {
@ResponseBody
public Map<String, String> hello() {
this.gauges.submit("timer.test.value", Math.random() * 1000 + 1000);
return Collections.singletonMap("message", "Hello " +
this.helloWorldProperties.getName());
return Collections.singletonMap("message",
"Hello " + this.helloWorldProperties.getName());
}
}