We inject simple property with configuration as shown below :
<bean id="myService" class="com.aaa.bbb.ccc.MyServiceImpl">
<property name="myProp" value=""/>
</bean>
How would you do it with annotations?
We inject simple property with configuration as shown below :
<bean id="myService" class="com.aaa.bbb.ccc.MyServiceImpl">
<property name="myProp" value=""/>
</bean>
How would you do it with annotations?
Using the @Value
annotation. It supports SpEL as well, which means you can load a properties file and have @Value("${someConfigurationProperty}")