Sorry for the copy of this article. I'd want to comment it, but without 50 scores of reputation I can`t comment, so...
I have
private boolean stopLoggingIntoDb;
....
public void setStopLoggingIntoDb(String stopLoggingIntoDb) {
this.stopLoggingIntoDb = BooleanUtils.toBoolean(stopLoggingIntoDb.replaceAll("[^A-Za-z]", ""));
logger.warn("Logging into SiebelMethodLogs is " + (!this.stopLoggingIntoDb ? "ON" : "OFF"));
}
and XML
<bean id="siebelMethodProcessor" class="com.entities.utils.Logger">
<property name="logService" ref="logService"/>
<property name="stopLoggingIntoDb" value="${monitor.siebel.stopLogging}"/>
</bean>
In that case, is everything Ok, but If I change the property in setter method from stopLoggingIntoDb to stopLog and change the property name in XML also to stopLog or not, Spring said me Invalid property 'stopLoggingIntoDb' or Bean property 'stopLog' is not writable.
Because of that, my question is What the Spring does with setter method? Which value is injected and which field/property is searching while gets the injection?