Initial commit representing the g8 akka template so that we have something to compare the changes to incorporate DI
1. Introduced a CountingService POJO. This has an @Named annotation so that it can be discovered by the app context.
2. Added @Named to the Counter actor along with Spring's @Scope("prototype"). JSR-330 specifies that named beans should be created using a prototype scope by default, but Spring diverged here hence why you need the annotation. However this is the only Spring annotation required for named types where singleton is not good enough. Thus if you need to migrate to Guice then you can either leave the annotation there, or if you don't want the Spring dependency then you can remove it.
3. Modified the Counter actor to call upon the injected CounterService.
4. Introduced a Spring-specific AppConfiguration class so that an ActorSystem can be established. You can configure the ActorSystem in the same way that you'd normally configure it.
5. Finally an AnnotationConfigApplicationContext is established and scans the org.typesafe package. Where we were previously instantiating the ActorSystem and Counter actor we now ask the application context.