Class DatasetConfiguration
java.lang.Object
com.samupert.univpm.eurostat.dataset.DatasetConfiguration
Provides the configuration for the dataset resource.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.Resource
csvDatasetResource
(FileService fileService, String datasetUrl) Creates aResource
pointing to the dataset.org.springframework.web.client.RestTemplate
Creates aRestTemplate
used to download the dataset.
-
Constructor Details
-
DatasetConfiguration
public DatasetConfiguration()
-
-
Method Details
-
restTemplate
@Bean public org.springframework.web.client.RestTemplate restTemplate()Creates aRestTemplate
used to download the dataset.- Returns:
- The
RestTemplate
used to download the dataset
-
csvDatasetResource
@Bean("CsvDatasetResource") public org.springframework.core.io.Resource csvDatasetResource(FileService fileService, @Value("${dataset.url}") String datasetUrl) Creates aResource
pointing to the dataset.- Parameters:
fileService
- TheFileService
used to download the datasetdatasetUrl
- The URL of the dataset.- Returns:
- A
Resource
pointing to the dataset.
-