Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package soundsystem;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.ComponentScan;
- import org.springframework.context.annotation.Configuration;
- @Configuration
- @ComponentScan("soundsystem")
- public class CDPlayerConfig {
- @Bean(
- name = "lonelyHeartsClub")
- public CompactDisc sgtPeppers() {
- return new SgtPeppers();
- }
- @Bean(
- name = "CDPlayer")
- public MediaPlayer cdPlayer(CompactDisc compactDisc) {
- return new CDPlayer(compactDisc);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement