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