Class DatasetConfiguration

java.lang.Object
com.samupert.univpm.eurostat.dataset.DatasetConfiguration

@Configuration public class DatasetConfiguration extends Object
Provides the configuration for the dataset resource.
  • Constructor Details

    • DatasetConfiguration

      public DatasetConfiguration()
  • Method Details

    • restTemplate

      @Bean public org.springframework.web.client.RestTemplate restTemplate()
      Creates a RestTemplate 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 a Resource pointing to the dataset.
      Parameters:
      fileService - The FileService used to download the dataset
      datasetUrl - The URL of the dataset.
      Returns:
      A Resource pointing to the dataset.