Skip to content

Commit 786bfc0

Browse files
committed
bean initialization refactor
1 parent 48ddd68 commit 786bfc0

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

ss-web/src/main/java/ss/mod/demo/web/config/AppConfig.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import org.springframework.context.annotation.Bean;
1616
import org.springframework.context.annotation.Configuration;
1717
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
18+
import org.springframework.data.domain.AuditorAware;
19+
import ss.mod.demo.service.entity.AuditorAwareImpl;
1820
import ss.mod.demo.web.config.feign.FeignProperties;
1921
import ss.mod.demo.web.config.feign.retry.FeignRetryer;
2022

@@ -81,4 +83,14 @@ public Retryer feignRetryer() {
8183
public ExecutorService getExecutorService() {
8284
return Executors.newFixedThreadPool(5);
8385
}
86+
87+
/**
88+
* This bean will responsible to maintain auditing field on entity
89+
*
90+
* @return {@link AuditorAware}
91+
*/
92+
@Bean
93+
public AuditorAware<String> auditorAware() {
94+
return new AuditorAwareImpl();
95+
}
8496
}

ss-web/src/main/java/ss/mod/demo/web/config/security/AuthenticationConfig.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,5 @@ public CorsConfigurationSource corsConfigurationSource() {
9999
return source;
100100
}
101101

102-
/**
103-
* This bean will responsible to maintain auditing field on entity
104-
*
105-
* @return {@link AuditorAware}
106-
*/
107-
@Bean
108-
public AuditorAware<String> auditorAware() {
109-
return new AuditorAwareImpl();
110-
}
111102
}
112103

0 commit comments

Comments
 (0)