From 817db4956f39bf418e61c332071c2997991f7fb0 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 19 Jan 2021 12:33:33 +0000 Subject: [PATCH] Explicitly Define Singleton Bean Scope --- Spring/src/main/java/conference/AppConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spring/src/main/java/conference/AppConfig.java b/Spring/src/main/java/conference/AppConfig.java index 74e6917..ce759a8 100644 --- a/Spring/src/main/java/conference/AppConfig.java +++ b/Spring/src/main/java/conference/AppConfig.java @@ -14,7 +14,7 @@ import org.springframework.context.annotation.Scope; public class AppConfig { @Bean(name = "speakerService") - @Scope(value = BeanDefinition.SCOPE_PROTOTYPE) + @Scope(value = BeanDefinition.SCOPE_SINGLETON) public SpeakerService getSpeakerService() { return new SpeakerServiceImpl(getSpeakerRepository()); }