|
|
@ -10,6 +10,12 @@ public class Application {
|
|
|
|
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
|
|
|
|
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
|
|
|
|
SpeakerService service = applicationContext.getBean("speakerService", SpeakerService.class);
|
|
|
|
SpeakerService service = applicationContext.getBean("speakerService", SpeakerService.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showObjectAddress(applicationContext.getBean("speakerService", SpeakerService.class));
|
|
|
|
System.out.println(service.findAll().get(0).getForename());
|
|
|
|
System.out.println(service.findAll().get(0).getForename());
|
|
|
|
|
|
|
|
showObjectAddress(applicationContext.getBean("speakerService", SpeakerService.class));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void showObjectAddress(SpeakerService speakerService) {
|
|
|
|
|
|
|
|
System.out.println(speakerService);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|