You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
680 B
Java
24 lines
680 B
Java
4 years ago
|
package conference;
|
||
|
|
||
|
import conference.repository.HibernateSpeakerRepositoryImpl;
|
||
|
import conference.repository.SpeakerRepository;
|
||
|
import conference.service.SpeakerService;
|
||
|
import conference.service.SpeakerServiceImpl;
|
||
|
import org.springframework.context.annotation.Bean;
|
||
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
||
|
@Configuration
|
||
|
|
||
|
public class AppConfig {
|
||
|
|
||
|
@Bean(name = "speakerService")
|
||
|
public SpeakerService getSpeakerService() {
|
||
|
return new SpeakerServiceImpl(getSpeakerRepository());
|
||
|
}
|
||
|
|
||
|
@Bean(name = "speakerRepository")
|
||
|
public SpeakerRepository getSpeakerRepository() {
|
||
|
return new HibernateSpeakerRepositoryImpl();
|
||
|
}
|
||
|
}
|