1. 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.
1.1. Maven dependencies
To use Spring Cloud Open Service Broker in a Spring web application, add the starter:
<dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-open-service-broker</artifactId> <version>${version}</version> </dependency> </dependencies>
1.2. Gradle dependencies
To use Spring Cloud Open Service Broker in a Spring web application, add the starter:
dependencies { compile("org.springframework.cloud:spring-cloud-starter-open-service-broker:${version}") }
1.3. 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.