Example #1
0
 @Transactional
 private void saveWeatherInfo(LinkedList<WeatherInfo> weatherInfos) {
   weatherRepository.deleteAll();
   for (WeatherInfo weatherInfo : weatherInfos) {
     weatherRepository.save(weatherInfo);
   }
 }
Example #2
0
  private void init() {
    cityRepository.truncate();
    for (City city : cities) {
      cityRepository.save(city);
    }

    weatherRepository.truncate();
  }