I write Spring Boot application. I use file application.properties to contains configuration of database. But now I want to get properties from application.yml which contains:
rest:
response: RESPONSE
@RestController
public class MyController {
@Value("${rest.response}")
private String restResponse;
@GetMapping("/foo")
public ResponseEntity<String> register() {
return restResponse;
}
}
Directory resources contains application.properties and application.yml. Why I cannot import properties from .yml?