Using Spring EL:
@Value("#{'${my.list.of.strings}'.split(',')}")
private List<String> myList;
Assuming your properties file is loaded correctly with the following:
my.list.of.strings=ABC,CDE,EFG
More Related Contents:
- Spring Boot access static resources missing scr/main/resources
- Why is Spring’s ApplicationContext.getBean considered bad?
- Spring AOP not working for method call inside another method
- Add Bean Programmatically to Spring Web App Context
- What is the difference between @Inject and @Autowired in Spring Framework? Which one to use under what condition?
- Spring: Why do we autowire the interface and not the implemented class?
- Disable Spring Security for OPTIONS Http Method
- How to bind an object list with thymeleaf?
- Spring CrudRepository findByInventoryIds(List inventoryIdList) – equivalent to IN clause
- How to configure MappingJacksonHttpMessageConverter while using spring annotation-based configuration?
- Transaction marked as rollback only: How do I find the cause
- Spring Cache with collection of items/entities
- Use of proxies in Spring AOP
- Spring: Standard Logging aspect (interceptor)
- Showing a Spring transaction in log
- Do you need a database transaction for reading data?
- Spring WebSocket @SendToSession: send message to specific session
- In Spring MVC, how can I set the mime type header when using @ResponseBody
- request scoped beans in spring testing
- How to reload properties with Spring?
- Spring Security 5 : There is no PasswordEncoder mapped for the id “null”
- Spring/Java error: namespace element ‘annotation-config’ … on JDK 1.5 and higher
- How to write JUnit test with Spring Autowire?
- Spring forward with added parameters?
- Spring Security multiple url ruleset not working together
- HibernateException: Couldn’t obtain transaction-synchronized Session for current thread
- Error creating bean with name ‘entityManagerFactory
- SpringBoot ComponentScan issue with multi-module project
- Spring Integration manually start/stop channel adapter via control bus
- Trigger 404 in Spring-MVC controller?