Skip to content

Spring Boot DevTools YAML property loading does not work #19081

@ddcruver

Description

@ddcruver

Version: 2.2.0.RELEASE and 2.2.1.RELEASE

After loading ~/.config/spring-boot/spring-boot-devtools.yaml (or the yml equivalent) the properties do not appear correct. The key seems to be the text on the line as it appears and without it's nested key value.

i.e.

spring:
  profiles:
    - production

Will make a map like this:

"spring": ""
"profiles": ""
"-": "production"

I believe that the problem lies in the fact that org.springframework.boot.devtools.env.DevToolsHomePropertiesPostProcessor will call org.springframework.core.io.support.PropertiesLoaderUtils#loadProperties to load all DevTools properties. This component seems to only handle XML and Property formatted files.

It does not use the org.springframework.boot.env.PropertySourceLoader framework like org.springframework.boot.context.config.ConfigFileApplicationListener does.

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