In Spring Boot, an application property can be defined in application.properties file. For example, a prefix of Rest can be defined as
spring.data.rest.baseP
The application.yml should be whit spaces not tabs.
application.yml
Try like this:
spring: data: rest: basePath: api
In my application the file is in the path:
src\main\resources\config\application.yml