Explicitly Define Singleton Bean Scope

master
sgoudham 4 years ago
parent de87a6ad31
commit 817db4956f
No known key found for this signature in database
GPG Key ID: EF51A29A50FB754C

@ -14,7 +14,7 @@ import org.springframework.context.annotation.Scope;
public class AppConfig { public class AppConfig {
@Bean(name = "speakerService") @Bean(name = "speakerService")
@Scope(value = BeanDefinition.SCOPE_PROTOTYPE) @Scope(value = BeanDefinition.SCOPE_SINGLETON)
public SpeakerService getSpeakerService() { public SpeakerService getSpeakerService() {
return new SpeakerServiceImpl(getSpeakerRepository()); return new SpeakerServiceImpl(getSpeakerRepository());
} }

Loading…
Cancel
Save