Getting started

Most service broker applications implement API or web UI endpoints beyond the Open Service Broker API endpoints. These additional endpoints might provide information about the application, provide a dashboard UI, or provide controls over application behavior. Developers may implement these additional endpoints with Spring MVC. Spring WebFlux is currently not supported.

Maven dependencies

To use Spring Cloud Open Service Broker in a Spring MVC application, add the webmvc starter:

<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-open-service-broker-webmvc</artifactId>
        <version>${version}</version>
    </dependency>
</dependencies>

Gradle dependencies

To use Spring Cloud Open Service Broker in a Spring MVC application, add the webmvc starter:

dependencies {
    compile("org.springframework.cloud:spring-cloud-starter-open-service-broker-webmvc:${version}")
}

Configuring the service broker

See the Spring Boot documentation for getting started building a Spring Boot application.

The framework provides default implementations of most of the components needed to implement a service broker. In Spring Boot fashion, you can override the default behavior by providing your own implementation of Spring beans, and the framework will back away from its defaults.

To start, use the @SpringBootApplication annotation on the service broker’s main application class:

@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

This will trigger the inclusion of the default configuration.