Hi,
Using STS 2.7.1 with JDK 1.6u26 and Spring 3.1M2.
I have a simple properties definition set as this:
I have a @Component bean with a setter defined as this:Code:<bean id="funky" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> <property name="properties"> <props> <prop key="test">1234</prop> </props> </property> </bean>
STS flags up a warning against my setter, detailed as this:Code:@Value("${test}") public void setTest(final int test) { this.test = test; }
I've tried using the bean id as well:Code:Unsatisfied 'required' dependency of type [int]. Expected at least 1 matching bean
but to no avail.Code:@Value("#funky[test]")
Am I doing something wrong? The code works fine if I boot the system (i.e., Spring correctly sets the setter with the value of 1234 at runtime.)
Thanks.
-=david=-


Reply With Quote
