24 lines
604 B
Java
24 lines
604 B
Java
package tk.antoine.roux.springcloudconfig.application;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@RestController
|
|
@RequestMapping("/v1")
|
|
public class Endpoint {
|
|
|
|
private final String message;
|
|
|
|
public Endpoint(@Value("${application.message}") String message) {
|
|
this.message = message;
|
|
}
|
|
|
|
@GetMapping("/message")
|
|
public String getMessage() {
|
|
return message;
|
|
}
|
|
|
|
}
|