If you define your array in properties file like:
base.module.elementToSearch=1,2,3,4,5,6
You can load such array in your Java class like this:
@Value("${base.module.elementToSearch}")
private String[] elementToSearch;
More Related Contents:
- How to fill HashMap from java property file with Spring @Value
- How to use YamlPropertiesFactoryBean to load YAML files using Spring Framework 4.1?
- Spring Property Injection in a final attribute @Value – Java
- Immutable @ConfigurationProperties
- Spring @Transaction method call by the method within the same class, does not work?
- How to configure port for a Spring Boot application
- How to fix role in Spring Security?
- Passing multiple variables in @RequestBody to a Spring MVC controller using Ajax
- Spring Boot how to hide passwords in properties file
- Circular dependency in Spring
- Why does my Spring Boot App always shutdown immediately after starting?
- How to set base url for rest in spring boot?
- Can I combine a @Query definition with a Specification in a Spring Data JPA repository method?
- Run Spring-boot’s main using IDE
- Enable CORS in Spring 5 Webflux?
- Spring MVC using tomcat, maven and intelliJ Error [duplicate]
- Spring Boot Actuator without Spring Boot
- Securing Spring Boot API with API key and secret
- Getting a ‘No thread-bound request found’ error from spring in my web app
- Iterating through a List Object in JSP
- Encoded password does not look like BCrypt
- how to get param in method post spring mvc?
- @Transactional method calling another method without @Transactional anotation?
- Spring Boot access static resources missing scr/main/resources
- How to modify request body before reaching controller in spring boot
- What are annotations and how do they actually work for frameworks like Spring?
- How to set up multi-threading in Spring Batch?
- RestTemplate with pem certificate
- java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet error
- Spring MVC: How to modify json response sent from controller