Where and How To Define An Application Property? - JHIpster

后端 未结 3 777
终归单人心
终归单人心 2021-01-19 01:41

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         


        
3条回答
  •  醉梦人生
    2021-01-19 02:13

    The application.yml should be whit spaces not tabs.

    Try like this:

    spring:
        data:
            rest:
                basePath: api
    

    In my application the file is in the path:

    src\main\resources\config\application.yml
    

提交回复
热议问题