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