Closed liunaijie closed 3 months ago
using this code to read properties every time:
Config systemConfig =
Parseable.newProperties(
System.getProperties(),
ConfigParseOptions.defaults()
.setOriginDescription("system properties"))
.parse()
.toConfig();
ConfigImpl.SystemPropertiesHolder
cache the system properties, so when call the second time will get same result with first time
hi team, i find when i use
ConfigFactory.systemProperties()
to read the system properties on windows has some issue. this is the test code:the result is:
the result is:
I manually set 4 properties, and want print the size before and after setup. And i find if i add the print code before setup, the size after setup will be same. if i remove the print code before setup, the size after setup is right.
It looks the
ConfigFactory.systemProperties()
only call once, and cache the result? I am not sure about this, is anyone can help on this, thanks. Or how i can read the new properties on each call.