This is an example of the tutorial app from Spring's website.
To build the Spring Boot application:
$ bazel build //src/main/java/hello:app
To run the Spring Boot application from Bazel:
$ bazel run //src/main/java/hello:app
To run the tests from Bazel:
$ bazel test //src/test/...
This tutorial code is licensed under Apache 2.0, copyright GoPivotal Inc.
The example above shows how to launch a Spring Boot application from Bazel. Bazel builds a classpath using all of the dependency jars and launches the application.
Spring Boot also supports a deployable jar format in which the Spring Boot application is packaged as a single Java .jar file. This use case is typical in production, where the Bazel executable and Bazel workspace are not available.
Use this external Spring Boot rule implementation if a deployable jar is needed: