Load .env even when exporting to system properties
When springdotenv.exportToSystemProperties=true, this early return skips creating the DotenvPropertyLoader, so the .env file is never loaded and nothing is actually exported into System.getProperties(). In the previous behavior, the loader was constructed before the export check, which triggered the dotenv library to populate system properties. As a result, anyone enabling export will now see missing system properties and no .env values at all in both Spring and Boot paths.
Useful? React with 👍 / 👎.
Originally posted by @chatgpt-codex-connector[bot] in #59 (comment)
When
springdotenv.exportToSystemProperties=true, this early return skips creating theDotenvPropertyLoader, so the.envfile is never loaded and nothing is actually exported intoSystem.getProperties(). In the previous behavior, the loader was constructed before the export check, which triggered the dotenv library to populate system properties. As a result, anyone enabling export will now see missing system properties and no.envvalues at all in both Spring and Boot paths.Useful? React with 👍 / 👎.
Originally posted by @chatgpt-codex-connector[bot] in #59 (comment)