Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Log failures to load PropertySources when ignoreResourceNotFound = true [SPR-15218] #19783
This can make it extremely difficult to debug unexpected behaviour in property source resolution. For example, see the
The ultimate output of this program is
However, if the developer was expecting the config file to exist, and hence was surprised at the lack of variable substitution, the cause would be very difficult to diagnose from the application logs, because even at the highest level of logging, there is no message to indicate that Spring tried and failed to open
I propose that Spring's ConfigurationClassParser should be changed to log a message at debug level when a PropertySource with ignoreResourceNotFound = true cannot be loaded for any reason.
Affects: 4.3.6, 5.0 M4
Reference URL: https://github.com/amdw/spring-logging-repro
Juergen Hoeller commented
Since we're logging an ignore-resource-not-found case for