Hi,
I am trying to inject text values into fields in a class using property/value but I get InvalidPropertyException. I'm guessing I should be using something else (have tried 'field' but this isn't recognised) or my syntax is wrong.
Note if I inject as a constructor argument it works fine, and injecting references to other beans works ok too. The error is specific to <property name="xxx" value="yyy" />.
Can someone advise what I am doing wrong here?
Thanks
My XML looks something like:
<bean id="injected_class"
class="com.my.class.to.inject.into">
<constructor-arg ref="db_conn" /> <!-- works ok -->
<property name="some_class" ref="sc" /> <!-- works ok -->
<property name="logger" ref="logger" /> <!-- works ok -->
<property name="applicationCode" value="abc123" />
<!-- FAILS, but there is definitely an 'applicationCode' (String) private instance variable -->
</bean>
------------------------------------------------------------
Class:
...
private String applicationCode = null;
...
public void setWorkQApplicationCode(String app_code)
{
applicationCode = app_code;
}
...


Reply With Quote
