Defines Akka HTTP client components useful for common request operations.
Defines an Akka HTTP server that serves all Akka HTTP routes found in the application context.
Defines an Akka HTTP server that serves all Akka HTTP routes found in the application context.
Usage: Import this configuration into your application context.
Example:
@Configuration @Import(Array(classOf[AkkaHttpServerAutoConfiguration])) class Configuration extends MyService
Base trait used to define services.
Base trait used to define services. Defines the service route bean used by [AkkaHttpServerAutoConfiguration].
This trait is designed to be stackable, allowing multiple services to be implemented in a single server.
Usage: Extend this trait and override the route function to create your service.
Example: Note the use of abstract override
and the concatenation of super.route
to make the service stackable.
// Define the service route in trait trait EchoService extends AkkaHttpService { abstract override def route: Route = { get { path("echo" / Segment) { name => complete(name) } } } ~ super.route } // Implement the trait in your application configuration @Configuration @Import(Array(classOf[AkkaHttpServerAutoConfiguration])) class Configuration extends EchoService
Configures Spring to materialize Akka Streams flows via Akka.
Configures Spring to materialize Akka Streams flows via Akka.
Defines autowired implicits needed to materialize Akka Streams flows.
Defines a basic HTTP client useful for common request operations.
Manages the lifecycle of an Akka HTTP ServerBinding
, ensuring its lifecycle matches that of the containing
Spring application context.
Manages the lifecycle of an Akka HTTP ServerBinding
, ensuring its lifecycle matches that of the containing
Spring application context.
This is an internal management class and is not intended for direct use. An instance is automatically created by [AkkaHttpServerAutoConfiguration].
The Spring lifecycle phase (default 10) can be adjusted by setting the http.server.lifecycle.phase configuration property. Note that the phase MUST be greater than that of the ActorSystemLifecycle bean to ensure the underlying ActorSystem is started before, and is terminated after, the Akka HTTP server.
HTTP server settings with defaults.
HTTP server settings with defaults.
This is a standard Spring Boot configuration properties class that will be populated by Spring using property sources available in the application context. HTTP server settings are read from properties prefixed with 'http.server'
Example YAML configuration (application.yaml)
http:
server:
interface: localhost
port: 8080
Defines Akka HTTP client components useful for common request operations.