Files
spring-boot-rest/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Controller.java

20 lines
501 B
Java

package com.baeldung.ctx2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baeldung.parent.IHomeService;
@RestController
public class Ctx2Controller {
@Autowired
IHomeService homeService;
@GetMapping(value = "/greeting", produces = "application/json")
public String getGreeting() {
return homeService.getGreeting();
}
}