Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Extending support for Spring Boot 2.1.6 and Spring Reactive

August 30, 2019
James Falkner
Related topics:
JavaKubernetesSpring Boot
Related products:
Red Hat OpenShift
     

    Red Hat Application Runtimes recently added extended support for the Spring Boot 2.1.6 runtime for Red Hat customers building Spring apps. Red Hat Application Runtimes provides application developers with a variety of application runtimes running on the Red Hat OpenShift Container Platform.

    Introduction to Spring Boot

    Spring Boot lets you create opinionated Spring-based standalone applications. The Spring Boot runtime also integrates with the OpenShift platform, allowing your services to externalize their configuration, implement health checks, provide resiliency and failover, and much more.

    What's new?

    This release introduces extended support for Spring Boot 2.1.6, and two technology preview features:

    • Dekorate, a Java annotation processor for Kubernetes, formerly developed under the name AP4K. Dekorate is a tool for automatically updating Kubernetes and OpenShift configuration files without the need to manually edit individual XML, YAML, or JSON templates. When declared as a dependency in your Maven project, Dekorate automatically picks up annotations and changes them to properties that you set in your application, automatically updating the corresponding deployment configuration and resource definition templates.
    • Vert.X Reactive Components, a set of supported starters for designing reactive applications. The productized starters are based on the community releases Spring WebFlux and Reactor Netty, with a set of additional Eclipse Vert.x extensions for the Spring Boot runtimes that extend the reactive capabilities of Spring WebFlux to include an asynchronous I/O API that handles network communication between individual application components. This addition lets you create a fully Red Hat-supported reactive stack that you can use to build your Spring Boot applications.

    Consult the release notes for a complete list of what's new.

    Get started

    Launcher in action
    Launcher in action
    Launcher in action.

    Using developers.redhat.com/launch, you can immediately create and deploy a Spring Boot application directly to OpenShift Online or to your own local OpenShift cluster. This tool provides a hassle-free way of creating applications from scratch, starting with example applications or importing your own, as well as an easy way to build and deploy those applications to Red Hat OpenShift.

    Examples are available to showcase how developers can use Spring Boot to build the fundamental building blocks of cloud-native applications and services, such as creating secured RESTful APIs, implementing health checks, externalizing configuration, securing resources, or integrating with the OpenShift Service Mesh based on the Istio project.

    Using Dekorate

    To start using Dekorate you just need to add one dependency to your pom.xml:

    <dependency>
      <groupId>io.dekorate</groupId>
      <artifactId>kubernetes-annotations</artifactId>
      <version>${project.version}</version>
    </dependency>
    

    Then, add one of the provided annotations to your project. For example:

    import io.dekorate.kubernetes.annotaion.KubernetesApplication;
    
    @KubernetesApplication
    public class Main {
    
        public static void main(String[] args) {
          //Your application code goes here.
        }
    }
    

    When this project gets compiled, the annotation will trigger the generation of a Deployment in both JSON and YAML that will end up under the target/classes/META-INF/dekorate directory. This Deployment can then be applied to your Kubernetes cluster with kubectl apply -f target/classes/META-INF/dekorate/kubernetes.yml.

    The annotation comes with a lot of optional parameters, which can be used to customize the Deployment and trigger the generation of additional resources, like Service and Ingress. Other features that you can add to your application for various services include:

    • OpenShift to create image streams and build configurations, plus bind to service catalog services.
    • Kubernetes to add labels, annotations, environment variables, volume mounts, ports/services, JVM options, init containers, and inject sidecars.
    • Prometheus to configure monitoring.
    • Jaeger to connect your app to distributed tracing.

    For an excellent overview of more Dekorate functionality, check out Gytis ' blog How to use Dekorate to create Kubernetes manifests.

    Building reactive applications with Spring Boot and Eclipse Vert.x

    The Spring reactive stack is built on Project Reactor, a reactive library that implements backpressure and is compliant with the Reactive Streams specification. It provides the Flux and Mono functional API types that enable asynchronous event stream processing. On top of Project Reactor, Spring provides WebFlux, an asynchronous event-driven web application framework. Reactive applications built with this stack enable non-blocking, asynchronous, event-driven apps that are highly scalable and resilient. They also ease integration with other related reactive libraries like Apache ActiveMQ Artemis, Apache Kafka, or Infinispan (all fully supported via Red Hat Middleware).

    This Spring reactive offering by Red Hat brings the benefits of Reactor and WebFlux to OpenShift and standalone Red Hat Enterprise Linux, and it introduces a set of Eclipse Vert.x extensions for the WebFlux framework. This addition allows you to retain the level of abstraction and rapid prototyping capabilities of Spring Boot, and provides an asynchronous I/O API that handles the network communications between the services in your application in a fully reactive manner.

    To create a basic reactive HTTP web service, add the following dependency to your pom.xml:

    <dependency>
      <groupId>dev.snowdrop</groupId>
      <artifactId>vertx-spring-boot-starter-http</artifactId>
    </dependency>
    

    This addition brings in the required dependencies to create reactive applications. Next, create a reactive sample app:

    package dev.snowdrop.vertx.sample.http;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.context.annotation.Bean;
    import org.springframework.web.reactive.function.server.RouterFunction;
    import org.springframework.web.reactive.function.server.ServerRequest;
    import org.springframework.web.reactive.function.server.ServerResponse;
    import reactor.core.publisher.Mono;
    
    import static org.springframework.web.reactive.function.BodyInserters.fromObject;
    import static org.springframework.web.reactive.function.server.RouterFunctions.route;
    import static org.springframework.web.reactive.function.server.ServerResponse.ok;
    
    @SpringBootApplication
    public class HttpSampleApplication {
    
        public static void main(String[] args) {
            SpringApplication.run(HttpSampleApplication.class, args);
        }
    
        @Bean
        public RouterFunction<ServerResponse> helloRouter() {
            return route()
                .GET("/hello", this::helloHandler)
                .build();
        }
    
        private Mono<ServerResponse> helloHandler(ServerRequest request) {
            String name = request
                .queryParam("name")
                .orElse("World");
            String message = String.format("Hello, %s!", name);
    
            return ok()
                .body(fromObject(message));
        }
    }
    

    Finally, build and test:

    $ mvn clean package
    $ java -jar target/vertx-spring-boot-sample-http.jar
    $ curl localhost:8080/hello
    Hello, World!
    

    There are several other example applications for authentication via OAuth2, reactive email clients, server-sent events, and more in the Spring Boot Runtime Guide.

    For more detail on creating reactive web services with Spring Boot, see the reactive REST service development guide in the Spring community documentation.

    Documentation

    The Runtimes team has been continuously adding and improving on the official documentation for building apps with Spring Boot. This effort includes updates in the Release Notes, Getting Started Guide, and the Spring Boot Runtime Guide.

    Developer interactive learning scenarios

    These self-paced scenarios provide you with a preconfigured Red Hat OpenShift instance, accessible from your browser without any downloads or configuration. Use it to experiment with Spring Boot or learn about other technologies within Red Hat Application Runtimes and see how it helps solve real-world problems:

    A screenshot showing nine interactive learning modules on the Red Hat Interactive Courses homepage.
    Available self-paced learning guides.

    Getting support for Spring Boot

    Support for Spring Boot is available to Red Hat customers through a subscription to Red Hat OpenShift Application Runtimes. Contact your local Red Hat representative or Red Hat Sales for details on how you can enjoy the world-class support offered by Red Hat and its worldwide partner network. More information on what's included can be found in Extending support to Spring Boot 2.x for Red Hat OpenShift Application Runtimes.

    Moving forward, customers can expect support for Spring Boot and other runtimes according to the Red Hat Product Update and Support Lifecycle.

    What’s next for Spring Boot support?

    The Runtimes Spring Boot team is continually taking feedback from customers and the wider community of open source developers, as well as tracking the upstream Spring Boot releases. The team is working to make updates to support based on that feedback, as well as considering support for additional modules from Red Hat and the large Java and Spring community.

    The people behind Red Hat's Spring Boot support

    This offering was produced by Red Hat’s Application Runtimes product and engineering team along with the Snowdrop upstream community, and involved many hours of development, testing, documentation writing, testing some more, and working with the wider Red Hat community of customers, partners, and Spring developers to incorporate contributions, both big and small. We are glad you have chosen to use it and hope that it meets or exceeds your expectations!

    Spring Boot resources

    • Red Hat OpenShift Application Runtimes Developer home page
    • Spring Boot Runtime Guide
    • Spring Boot Issue Tracker
    • Interactive Learning Scenarios for Spring Boot on OpenShift
    • Snowdrop upstream project
    Last updated: January 12, 2024

    Recent Posts

    • Tekton joins the CNCF as an incubating project

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.