How to read values from properties file?
Configure PropertyPlaceholder in your context: <context:property-placeholder location=”classpath*:my.properties”/> Then you refer to the properties in your beans: @Component class MyClass { @Value(“${my.property.name}”) private String[] myValues; } To parse property with multiple comma-separated values: my.property.name=aaa,bbb,ccc If that doesn’t work, you can define a bean with properties, inject and process it manually: <bean id=”myProperties” class=”org.springframework.beans.factory.config.PropertiesFactoryBean”> <property name=”locations”> <list> … Read more