|
|
@ -4,14 +4,17 @@ import conference.repository.HibernateSpeakerRepositoryImpl;
|
|
|
|
import conference.repository.SpeakerRepository;
|
|
|
|
import conference.repository.SpeakerRepository;
|
|
|
|
import conference.service.SpeakerService;
|
|
|
|
import conference.service.SpeakerService;
|
|
|
|
import conference.service.SpeakerServiceImpl;
|
|
|
|
import conference.service.SpeakerServiceImpl;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.config.BeanDefinition;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Scope;
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
|
|
|
|
|
|
|
|
public class AppConfig {
|
|
|
|
public class AppConfig {
|
|
|
|
|
|
|
|
|
|
|
|
@Bean(name = "speakerService")
|
|
|
|
@Bean(name = "speakerService")
|
|
|
|
|
|
|
|
@Scope(value = BeanDefinition.SCOPE_SINGLETON)
|
|
|
|
public SpeakerService getSpeakerService() {
|
|
|
|
public SpeakerService getSpeakerService() {
|
|
|
|
return new SpeakerServiceImpl(getSpeakerRepository());
|
|
|
|
return new SpeakerServiceImpl(getSpeakerRepository());
|
|
|
|
}
|
|
|
|
}
|
|
|
|