java - How to inject String property in a spring bean -
java - How to inject String property in a spring bean -
we inject simple property configuration shown below :
<bean id="myservice" class="com.aaa.bbb.ccc.myserviceimpl"> <property name="myprop" value=""/> </bean>
how annotations?
using @value
annotation. supports spel well, means can load properties file , have @value("${someconfigurationproperty}")
java spring dependency-injection
Comments
Post a Comment