Skip to content

Clarify documentation of whether spring.config.location replaces or augments the default search path #4062

Closed
@tomwhoiscontrary

Description

@tomwhoiscontrary

In the fine manual, we read that (emphasis mine):

If spring.config.location contains directories (as opposed to files) they should end in / (and will be appended with the names generated from spring.config.name before being loaded). The default search path classpath:,classpath:/config,file:,file:config/ is always used, irrespective of the value of spring.config.location. In that way you can set up default values for your application in application.properties (or whatever other basename you choose with spring.config.name) and override it at runtime with a different file, keeping the defaults.

However, @snicoll ventured the opinion that in fact, spring.config.location entirely replaces the default search path. If this is the case, could the documentation be corrected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions