Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. package soundsystem;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5.  
  6. import org.springframework.context.annotation.Bean;
  7. import org.springframework.context.annotation.Configuration;
  8. import org.springframework.context.annotation.EnableAspectJAutoProxy;
  9.  
  10. @Configuration
  11. @EnableAspectJAutoProxy /* ---> HABILITAR uto-proxy de AspectJ */
  12. public class TrackCounterConfig {
  13. @Bean
  14. public CompactDisc sgtPeppers() {
  15. BlankDisc cd = new BlankDisc(); /* ---> BEAN CompactDisc */
  16. cd.setTitle( "Sgt. Pepper's Lonely Hearts Club Band" );
  17. cd.setArtist( "The Beatles" );
  18. List<String> tracks = new ArrayList<String>();
  19. tracks.add( "Sgt. Pepper's Lonely Hearts Club Band" );
  20. tracks.add( "With a Little Help from My Friends" );
  21. tracks.add( "Lucy in the Sky with Diamonds" );
  22. tracks.add( "Getting Better" );
  23. tracks.add( "Fixing a Hole" );
  24. // ...moitidos otras pistas por brevedad...
  25. cd.setTracks( tracks );
  26. return cd;
  27. }
  28.  
  29. @Bean
  30. public TrackCounter trackCounter() { /* ---> BEAN TrackCounter */
  31. return new TrackCounter();
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement