JSON -> List
import org.springframework.core.io.Resource; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; … @Value("classpath:/strings.json") private Resource jsonFile; @Autowired private ObjectMapper mapper; … List<String> listOfStrings = Arrays.asList( mapper.readValue(jsonFile.getInputStream(), String[].class) );import org.springframework.core.io.Resource; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; … @Value("classpath:/strings.json") private Resource jsonFile; @Autowired private ObjectMapper mapper; … List<String> listOfStrings = Arrays.asList( mapper.readValue(jsonFile.getInputStream(), String[].class) );