From 576754122fd179e5c19fa2cf8a6703955444e581 Mon Sep 17 00:00:00 2001 From: Swagata Roy Date: Tue, 2 Mar 2021 23:41:19 -0500 Subject: [PATCH 1/3] Update README.md Updating Spring Cloud Connectors to Java CFEnv --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4229d999..2d9630c0c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is a sample application for using database services on [Cloud Foundry](http This application has been built to store the same domain objects in one of a variety of different persistence technologies - relational, document, and key-value stores. This is not meant to represent a realistic use case for these technologies, since you would typically choose the one most applicable to the type of data you need to store, but it is useful for testing and experimenting with different types of services on Cloud Foundry. -The application use Spring Java configuration and [bean profiles](http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html) to configure the application and the connection objects needed to use the persistence stores. It also uses the [Spring Cloud Connectors](http://cloud.spring.io/spring-cloud-connectors/) library to inspect the environment when running on Cloud Foundry. See the [Cloud Foundry documentation](http://docs.cloudfoundry.org/buildpacks/java/spring-service-bindings.html) for details on configuring a Spring application for Cloud Foundry. +The application use Spring Java configuration and [bean profiles](http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html) to configure the application and the connection objects needed to use the persistence stores. It also uses the [Java CFEnv](https://github.com/pivotal-cf/java-cfenv/) library to inspect the environment when running on Cloud Foundry. See the [Cloud Foundry documentation](http://docs.cloudfoundry.org/buildpacks/java/spring-service-bindings.html) for details on configuring a Spring application for Cloud Foundry. ## Building From 2fa859a23e1926824f3be2c3719017126bcdae60 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Tue, 16 Mar 2021 17:06:24 -0500 Subject: [PATCH 2/3] Update supported Java versions in README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d9630c0c..600fbf65d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The application use Spring Java configuration and [bean profiles](http://docs.sp ## Building -This project requires Java 8 or later to compile. +This project requires a Java version between 8 and 15 to compile. Java 16 and later versions are not yet supported. To build a runnable Spring Boot jar file, run the following command: From 488aa902a65bc463fbf4395e1ef6c3a337f087a7 Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Wed, 31 Mar 2021 21:02:36 +0000 Subject: [PATCH 3/3] Add support for serving H2C traffic - TomCat will successfully handle `Upgrade: h2c` headers and respond to HTTP/2 requests over cleartext Co-authored-by: Merric de Launey Co-authored-by: Carson Long --- .../samples/music/config/data/H2cConfig.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/org/cloudfoundry/samples/music/config/data/H2cConfig.java diff --git a/src/main/java/org/cloudfoundry/samples/music/config/data/H2cConfig.java b/src/main/java/org/cloudfoundry/samples/music/config/data/H2cConfig.java new file mode 100644 index 000000000..e16bf5ce6 --- /dev/null +++ b/src/main/java/org/cloudfoundry/samples/music/config/data/H2cConfig.java @@ -0,0 +1,15 @@ +package org.cloudfoundry.samples.music.config.data; + +import org.apache.coyote.http2.Http2Protocol; + +import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class H2cConfig { + @Bean + public TomcatConnectorCustomizer customizer() { + return (connector) -> connector.addUpgradeProtocol(new Http2Protocol()); + } +}