Skip to content

Commit

Permalink
refactor(SRP): 스케줄링, JPAAuditing 활성화 어노테이션을 Config로 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee committed Jul 18, 2024
1 parent 5d302cf commit 194502b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/java/page/clab/api/ApiApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@EnableJpaAuditing
public class ApiApplication {

public static void main(String[] args) {
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/page/clab/api/global/config/JpaConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package page.clab.api.global.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

@Configuration
@EnableJpaAuditing
public class JpaConfig {
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package page.clab.api.global.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;

@Configuration
@EnableScheduling
class SchedulerConfig implements SchedulingConfigurer {

@Override
Expand Down

0 comments on commit 194502b

Please sign in to comment.