Files
spring-boot-rest/akka-modules/spring-akka/src/main/java/com/baeldung/akka/AppConfiguration.java
panos-kakos 31bd634134 Java 11501 (#12405)
* added parent module (akka-modules)

* moved akka-http(submodule) to akka-modules(parent)

* moved akka-streams(submodule) to akka-modules(parent)

* moved spring-akka(submodule) to akka-modules(parent)

* deleted submodules that we moved to akka-modules

Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
2022-06-24 22:26:57 +05:30

25 lines
726 B
Java

package com.baeldung.akka;
import akka.actor.ActorSystem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
public class AppConfiguration {
@Autowired
private ApplicationContext applicationContext;
@Bean
public ActorSystem actorSystem() {
ActorSystem system = ActorSystem.create("akka-spring-demo");
SpringExtension.SPRING_EXTENSION_PROVIDER.get(system).initialize(applicationContext);
return system;
}
}