はじめに こんにちは!さいけです。 本記事は、「SpringBootで処理を定期実行させる方法」について紹介します。 SpringBootで処理を定期実行させる方法 @EnableSchedulingアノテーションをつける まず、アプリケーションクラスに@EnableSchedulingをつけます。 これにより、アプリケーションの定期実行設定が有効になります。 import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication @EnableS