spring configuration properties

Jackie
Mar 3, 2022

Turns out when spring boot construct the configuration bean, it’s using the setter method to map the values.

So for IgniteConfiguration, for example, even though the variable for peer ClassLoading is

private boolean p2pEnabled =DFLT_P2P_ENABLED;

however, the values below won’t work

instead, it should be

peerClassLoadingEnabled: true

as the setter to set the p2pEnabled is actually called

public IgniteConfiguration setPeerClassLoadingEnabled(boolean p2pEnabled) { this.p2pEnabled = p2pEnabled; return this; }

Published

Originally published at https://lwpro2.wordpress.com on March 3, 2022.

--

--