I would like to set the default values for a list in a bean using annotations.
For example, if this is not a list you can do:
@Value("myValue")
String test;
But in my case, I want to give default values for a list of strings.
List<String> tests;
In XML, this is something like this:
<bean id="beanId" class="class...">
<property name="tests">
<list>
<value>value 1</value>
<value>value 2</value>
<value>value 3</value>
</list>
</property>
</bean>
I wanted to know if an existing annotation exists, or do I need to create it?
thank
source
share