I am new to the Spring Framework and have a question for the setter based DI: how to wire a property with a prefix?
Suppose I have the following property:
//Our code standard mandates a prefix for member variables.
private String m_Name;
…
// Setter method removes the variable prefix.
public void setName(String newName) {
m_Name = newName;
}
Both following mappings give no writable property exception.
<property name=”Name”><value>MyName</value></property>
<property name=”mName”><value>MyName</value></property>
What is the best way to handle this? Thanks in advance.


Reply With Quote