spring-projects/spring-boot — pull request #951 by hekonsek (2014-05-26 08:40:49+00:00)
Title: Relaxed Binder ignoring system properties

Hi,

I've noticed that `spring.main.sources` defined as system property are ignored by `RelaxedBinder`. The same option passed as an application argument (`--spring.main.sources`) works like a charm.

I gave it a quick debugging session and the problem is that `ConfigFileApplicationListener#bindToSpringApplication` method doesn't add `spring.main.*` pattern to the created `PropertySourcesPropertyValues` instance. Without this pattern `PropertySourcesPropertyValues` doesn't resolve `spring.main.*` values from the system and environmental properties.

I basically added the `spring.main.*` to the `PropertySourcesPropertyValues` constructor to fixed that issue.

Cheers.