From b4130709217fab06a61531ba344df3e43c34b816 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 27 Jul 2020 22:45:00 -0700 Subject: [PATCH 001/216] Edit changelog and include 1.1.9.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 9a19b9c01..e783895fa 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -3,6 +3,19 @@ SPRING BOOT FOR APACHE GEODE & PIVOTAL GEMFIRE CHANGELOG https://github.com/spring-projects/spring-boot-data-geode ========================================================= +Changes in version 1.1.9.RELEASE (2020-07-27) +--------------------------------------------- +Aligns SBDG with Spring Boot 2.1.16.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Upgrades to Spring Framework 5.1.17.RELEASE. +* Upgrades to Spring Boot 2.1.16.RELEASE. +* Upgrades to Spring Data Lovelace-SR19. +* Upgrades to Spring Data for Apache Geode & VMware GemFire 2.1.19.RELEASE. +* Upgrades to Spring Session BOM Bean-SR11. +* Upgrades to Byte Buddy 1.10.13. +* Upgrades to Mockito 3.4.4. + Changes in version 1.3.1.RELEASE (2020-07-27) --------------------------------------------- From ce0a9aacbd528447ed62c46573cadef8b6ce8731 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 27 Jul 2020 22:45:51 -0700 Subject: [PATCH 002/216] Edit changelog and include 1.2.9.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index e783895fa..d169bf043 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -3,6 +3,22 @@ SPRING BOOT FOR APACHE GEODE & PIVOTAL GEMFIRE CHANGELOG https://github.com/spring-projects/spring-boot-data-geode ========================================================= +Changes in version 1.2.9.RELEASE (2020-07-27) +--------------------------------------------- +Aligns SBDG with Spring Boot 2.2.9.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Upgrades to Spring Framework 5.2.8.RELEASE. +* Upgrades to Spring Boot 2.2.9.RELEASE. +* Upgrades to Spring Data Moore-SR9 +* Upgrades to Spring Data for Apache Geode & VMware GemFire 2.2.9.RELEASE. +* Upgrades to Spring Session BOM Corn-SR3. +* Upgrades to Byte Buddy 1.10.13. +* Upgrades to Gradle 6.5.1. +* Upgrades to Mockito 3.4.4. +* Upgrades to VMware GemFire 9.8.8. + + Changes in version 1.1.9.RELEASE (2020-07-27) --------------------------------------------- Aligns SBDG with Spring Boot 2.1.16.RELEASE along with the latest versions of Spring Framework, Spring Data From 8d166f3d5927531dd50ade3c2308ec67f8be941a Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 27 Jul 2020 22:46:44 -0700 Subject: [PATCH 003/216] Edit README to refer to 1.1.9.RELEASE and 1.1.10.BUILD-SNAPSHOT in 1.1.x release line. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 1a5062467..3aacf18e1 100644 --- a/README.adoc +++ b/README.adoc @@ -53,8 +53,8 @@ This, along with many other benefits, are provided by this project. | `current` | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/current/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/#geode-samples[Samples] | `1.0.1.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/#geode-samples[Samples] | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.1.8.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] -| `1.1.9.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.1.9.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] +| `1.1.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.8.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.9.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.1.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] From 5f9a41eca41d2da5d648680659b1a3fe2ac5b5ed Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 27 Jul 2020 22:47:27 -0700 Subject: [PATCH 004/216] Edit README to refer to 1.2.9.RELEASE and 1.2.10.BUILD-SNAPSHOT in 1.2.x release line. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 3aacf18e1..adffa8b5a 100644 --- a/README.adoc +++ b/README.adoc @@ -55,8 +55,8 @@ This, along with many other benefits, are provided by this project. | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.1.9.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] | `1.1.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.2.8.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] -| `1.2.9.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.2.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] +| `1.2.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.1.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] | `1.3.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] From 59d791801935e4013de41368e12f689d318939f8 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 13:12:44 -0700 Subject: [PATCH 005/216] Fix spelling. --- .../src/docs/asciidoc/guides/getting-started.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc index a666a62cb..704fcdb1d 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc @@ -1562,8 +1562,8 @@ In order to acquire the Pivotal Cloud Cache (PCC) / Pivotal GemFire bits used by sign up and register on https://network.pivotal.io/[Pivotal Network] (a.k.a. "_PivNet_"). This should include instructions on how to configure your application Maven POM file with the necessary `` -declaration for acquiring the _Pivotal Cloud Cache_ / Pivotal GemFire bits pulled in by the ` -org.springframework.geode:spring-gemfire-starter` SBDG application dependency as well as the necessary settings in +declaration for acquiring the _Pivotal Cloud Cache_ / Pivotal GemFire bits pulled in by the +`org.springframework.geode:spring-gemfire-starter` SBDG application dependency as well as the necessary settings in `~/.m2/settings.xml` to authenticate and access the Pivotal Commercial Repository server. This is absolutely necessary since Pivotal Cloud Cache (PCC) / Pivotal GemFire bits are not available in _Maven Central_. @@ -1575,7 +1575,7 @@ https://gemfire.docs.pivotal.io/{pivotal-gemfire-version}/gemfire/getting_starte .Required Spring Boot Actuator Bits ***** As of Apache Geode 1.9 and Pivotal GemFire 9.8, upon which Pivotal Cloud Cache (PCC) 1.8 is {pivotal-cloudcache-docs}/product-snapshot.html[based], -both GemFire and Geode require and declare Micrometer on the classpath as a compile-time depedency. +both GemFire and Geode require and declare Micrometer on the classpath as a compile-time dependency. Technically, the Micrometer bits are pulled in by `org.apache.geode:geode-core:1.9.0` and the Micrometer version is determined by the version of Spring Boot you are using: From 688c6097692755d0f9471db2f6cc0c127d9a8740 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 13:13:58 -0700 Subject: [PATCH 006/216] Change Getting Started Sample artifact version to 1.3.0.BUILD-SNAPSHOT matching the project version. --- spring-geode-samples/intro/getting-started/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-samples/intro/getting-started/manifest.yml b/spring-geode-samples/intro/getting-started/manifest.yml index b62f840b1..421342cf5 100644 --- a/spring-geode-samples/intro/getting-started/manifest.yml +++ b/spring-geode-samples/intro/getting-started/manifest.yml @@ -3,7 +3,7 @@ applications: - name: crm-app memory: 768M instances: 1 - path: ./build/libs/spring-geode-samples-getting-started-1.2.0.BUILD-SNAPSHOT.jar + path: ./build/libs/spring-geode-samples-getting-started-1.3.0.BUILD-SNAPSHOT.jar services: - pccServiceOne buildpacks: From 46fa881fad19db1fdfd244c940b19114f9427975 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 14:51:36 -0700 Subject: [PATCH 007/216] Add version property for Pivotal Cloud Cache. --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index f4c8df102..da72f2394 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,7 @@ byteBuddyVersion=1.10.13 findbugsVersion=3.0.2 mockitoVersion=3.4.4 multithreadedtcVersion=1.01 +pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.8.RELEASE springBootVersion=2.3.2.RELEASE From 8b847d6c40499cbf87ccbfc2a25126dd2167c2a7 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 14:52:57 -0700 Subject: [PATCH 008/216] Add artifact version documentation attributes for Apache Geode, Pivotal/VMware GemFire and Pivotal/VMware Cloud Cache. --- spring-geode-docs/spring-geode-docs.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-geode-docs/spring-geode-docs.gradle b/spring-geode-docs/spring-geode-docs.gradle index ae90a674e..69868b9b9 100644 --- a/spring-geode-docs/spring-geode-docs.gradle +++ b/spring-geode-docs/spring-geode-docs.gradle @@ -50,6 +50,9 @@ asciidoctorj { 'github-samples-url': "${githubUrl}/spring-geode-samples", 'highlightjsdir@': "js/highlight", 'docinfodir@': ".", + 'apache-geode-artifact-version' : "${apacheGeodeVersion}", + 'pivotal-cloudcache-artifact-version' : "${pivotalCloudCacheVersion}", + 'pivotal-gemfire-artifact-version' : "${pivotalGemFireVersion}", 'master-apache-geode-version' : "112", 'master-pivotal-gemfire-version' : "910", 'master-pivotal-cloudcache-version' : "1-11", From a64ec4e5bbf0403a6a4c548fde3c61a19a7a5546 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 14:53:28 -0700 Subject: [PATCH 009/216] Add additional documentation on matching client/server versions when using PCC in PCF. --- .../docs/asciidoc/guides/getting-started.adoc | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc index 704fcdb1d..670e87e6d 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc @@ -5,6 +5,9 @@ John Blum :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :apache-geode-website: https://geode.apache.org/ +:cloudcache-name: Pivotal Cloud Cache +:gemfire-name: Pivotal GemFire +:geode-name: Apache Geode :images-dir: ./images :pivotal-cloudcache-version: {master-pivotal-cloudcache-version} :pivotal-cloudcache-docs: https://docs.pivotal.io/p-cloud-cache/{pivotal-cloudcache-version} @@ -1556,7 +1559,40 @@ To: TIP: See the link:../index.html#geode-gemfire-switch[Appendix] for more details on making the switch. -.Acquiring Pivotal Cloud Cache Bits +.Matching Client/Server Versions +***** +It is important to match versions when deploying to Pivotal Platform (formerly known as Pivotal CloudFoundry; PCF) +using {cloudcache-name} (PCC). This is technically a {gemfire-name} restriction and has nothing to do with Spring. + +In a nutshell, older clients can connect to and communicate with the same or newer servers. For example, a 9.9 client +can connect to and communicate with a 9.10 server. Clients can always connect to and communicate with a server having +the same `major.minor` version (e.g. a 9.10 client with a 9.10 server). The `patch` version in `major.minor.patch` +should be irrelevant (e.g. a 9.10.2 client should still be able to connect to and communicate with a 9.10.0 server). + +The opposite is not true. A newer client cannot connect to and communicate with an older server. For example, a 9.10 +client cannot connect to and communicate with a 9.9, or earlier version of a, server. + +Use the following table to make sure your client and server versions are correct when deploying to Pivotal Platform +(PCF) or similar cloud environment hosting and managing {gemfire-name}: + +.Client/Server Versions +[with="100%",subs="verbatim,attributes"] +|=== +| SBDG | Spring Boot | {gemfire-name} | {geode-name} | {cloudcache-name} + +| {spring-boot-data-geode-version} | {spring-boot-version} | {pivotal-gemfire-artifact-version} | {apache-geode-artifact-version} | {pivotal-cloudcache-docs}/product-snapshot.html[{pivotal-cloudcache-artifact-version}] + +| 1.2.x | 2.2.x | 9.8.x | 1.9.x | https://docs.pivotal.io/p-cloud-cache/1-8/product-snapshot.html[1.8.x+] + +| 1.1.x | 2.1.x | 9.5.x | 1.6.x | https://resources.docs.pivotal.io/pdfs/p-cloud-cache-1.5.pdf[1.5.x+] + +|=== + +TIP: Your Spring Boot application is the client and the cloud environment, hosting the {gemfire-name} cluster, +is the server-side. +***** + +.Acquiring {cloudcache-name} Bits ***** In order to acquire the Pivotal Cloud Cache (PCC) / Pivotal GemFire bits used by your Spring Boot application, you must sign up and register on https://network.pivotal.io/[Pivotal Network] (a.k.a. "_PivNet_"). From 7441a526eff0266395178cb35a2924a1f2efaac4 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 15:01:15 -0700 Subject: [PATCH 010/216] Rename 'master' version documentation attributes. Rename 'master-apache-geode-version' to 'apache-geode-doc-version'. Rename 'master-pivotal-cloudcache-version' to 'pivotal-cloudcache-doc-version'. Rename 'master-pivotal-gemfire-version' to 'pivotal-gemfire-doc-version'. --- spring-geode-docs/spring-geode-docs.gradle | 6 +++--- .../src/docs/asciidoc/guides/boot-actuator.adoc | 2 +- .../src/docs/asciidoc/guides/boot-configuration.adoc | 2 +- .../src/docs/asciidoc/guides/caching-http-session.adoc | 2 +- .../src/docs/asciidoc/guides/caching-inline.adoc | 2 +- .../src/docs/asciidoc/guides/caching-look-aside.adoc | 2 +- .../src/docs/asciidoc/guides/caching-multi-site.adoc | 2 +- .../src/docs/asciidoc/guides/caching-near.adoc | 2 +- .../src/docs/asciidoc/guides/getting-started.adoc | 6 +++--- spring-geode-docs/src/docs/asciidoc/index.adoc | 6 +++--- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spring-geode-docs/spring-geode-docs.gradle b/spring-geode-docs/spring-geode-docs.gradle index 69868b9b9..903461b92 100644 --- a/spring-geode-docs/spring-geode-docs.gradle +++ b/spring-geode-docs/spring-geode-docs.gradle @@ -51,11 +51,11 @@ asciidoctorj { 'highlightjsdir@': "js/highlight", 'docinfodir@': ".", 'apache-geode-artifact-version' : "${apacheGeodeVersion}", + 'apache-geode-doc-version' : "112", 'pivotal-cloudcache-artifact-version' : "${pivotalCloudCacheVersion}", + 'pivotal-cloudcache-doc-version' : "1-12", 'pivotal-gemfire-artifact-version' : "${pivotalGemFireVersion}", - 'master-apache-geode-version' : "112", - 'master-pivotal-gemfire-version' : "910", - 'master-pivotal-cloudcache-version' : "1-11", + 'pivotal-gemfire-doc-version' : "910", 'spring-version' : versions['org.springframework:spring-core'], 'spring-boot-version' : "${springBootVersion}", 'spring-boot-data-geode-version' : project.version, diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc index a5ca63316..91148af57 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc @@ -1,6 +1,6 @@ [[geode-samples-boot-actuator]] = Spring Boot Actuator for Apache Geode & Pivotal GemFire -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :images-dir: ./images :spring-boot-docs: https://docs.spring.io/spring-boot/docs/current/reference/html diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc index 084c4ee9a..b4d26d9f6 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc @@ -1,7 +1,7 @@ [[geode-samples-boot-configuration]] = Spring Boot Auto-configuration for Apache Geode & Pivotal GemFire John Blum -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :toc: left :toclevels: 2 diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc index c2a94e0ee..a0d207ebc 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc @@ -1,6 +1,6 @@ [[geode-samples-caching-http-session]] = HTTP Session State Caching with Spring -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :apache-geode-website: https://geode.apache.org/ diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc index b0b2cadf2..e47dc0ef0 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc @@ -1,6 +1,6 @@ [[geode-samples-caching-inline]] = Inline Caching with Spring -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :images-dir: ./images diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc index 1f255254e..3fe62685f 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc @@ -1,6 +1,6 @@ [[geode-samples-caching-lookaside]] = Look-Aside Caching with Spring -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :images-dir: ./images diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc index 7b8e01e35..ed1ba008e 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc @@ -1,6 +1,6 @@ [[geode-samples-caching-multisite]] = Multi-Site Caching with Spring -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :gemfire-name: VMware Tanzu GemFire diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc index 553f78a62..5a7248c2f 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc @@ -1,6 +1,6 @@ [[geode-samples-caching-near]] = Near Caching with Spring -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :images-dir: ./images diff --git a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc index 670e87e6d..8b30b4780 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc @@ -1,7 +1,7 @@ [[geode-samples-getting-started]] = Getting Started Quickly, Easily and Reliably with Spring Boot for Apache Geode & Pivotal Cloud Cache John Blum -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :apache-geode-website: https://geode.apache.org/ @@ -9,11 +9,11 @@ John Blum :gemfire-name: Pivotal GemFire :geode-name: Apache Geode :images-dir: ./images -:pivotal-cloudcache-version: {master-pivotal-cloudcache-version} +:pivotal-cloudcache-version: {pivotal-cloudcache-doc-version} :pivotal-cloudcache-docs: https://docs.pivotal.io/p-cloud-cache/{pivotal-cloudcache-version} :pivotal-cloudcache-website: https://pivotal.io/pivotal-cloud-cache :pivotal-cloudfoundry-website: https://pivotal.io/platform -:pivotal-gemfire-version: {master-pivotal-gemfire-version} +:pivotal-gemfire-version: {pivotal-gemfire-doc-version} :pivotal-gemfire-docs: https://gemfire.docs.pivotal.io/{pivotal-gemfire-version}/geode/reference :pivotal-gemfire-javadoc: https://gemfire-{pivotal-gemfire-version}-javadocs.docs.pivotal.io/ :pivotal-gemfire-website: https://pivotal.io/pivotal-gemfire diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index d5d9b2264..086237635 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -12,19 +12,19 @@ John Blum :toc: left :toclevels: 1 :apache-geode-name: Apache Geode -:apache-geode-version: {master-apache-geode-version} +:apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :apache-geode-website: https://geode.apache.org/ :apache-geode-wiki: https://cwiki.apache.org/confluence/display/GEODE -:pivotal-cloudcache-version: {master-pivotal-cloudcache-version} +:pivotal-cloudcache-version: {pivotal-cloudcache-doc-version} :pivotal-cloudcache-docs: https://docs.pivotal.io/p-cloud-cache/{pivotal-cloudcache-version} :pivotal-cloudcache-website: https://pivotal.io/pivotal-cloud-cache :pivotal-cloudfoundry-version: 2-9 :pivotal-cloudfoundry-docs: https://docs.pivotal.io/platform/application-service/{pivotal-cloudfoundry-version} :pivotal-cloudfoundry-website: https://pivotal.io/platform :pivotal-gemfire-name: VMware GemFire -:pivotal-gemfire-version: {master-pivotal-gemfire-version} +:pivotal-gemfire-version: {pivotal-gemfire-doc-version} :pivotal-gemfire-docs: https://gemfire.docs.pivotal.io/{pivotal-gemfire-version}/geode/reference :pivotal-gemfire-javadoc: https://gemfire-{pivotal-gemfire-version}-javadocs.docs.pivotal.io/ :pivotal-gemfire-website: https://pivotal.io/pivotal-gemfire From 39535538fafafbc84b416e982d979792cf894a76 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 15:04:06 -0700 Subject: [PATCH 011/216] Set 'spring.data.gemfire.management.use-http' property to 'false'. --- .../actuator/src/main/resources/application-client.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-geode-samples/boot/actuator/src/main/resources/application-client.properties b/spring-geode-samples/boot/actuator/src/main/resources/application-client.properties index 0f89c4b8e..43a02c3fe 100644 --- a/spring-geode-samples/boot/actuator/src/main/resources/application-client.properties +++ b/spring-geode-samples/boot/actuator/src/main/resources/application-client.properties @@ -1,3 +1,4 @@ # Temperature Service client application configuration properties server.port=9191 +spring.data.gemfire.management.use-http=false From a918c9a8f1301eb142e16deb53fe53b575b61fb0 Mon Sep 17 00:00:00 2001 From: Patrick Johnson Date: Tue, 21 Apr 2020 16:43:35 -0700 Subject: [PATCH 012/216] Add Security Sample Guide and Code. Resolves gh-81. --- .../src/docs/asciidoc/_includes/samples.adoc | 5 + .../docs/asciidoc/guides/boot-security.adoc | 237 ++++++++++++++++++ .../boot/security/lombok.config | 2 + .../boot/security/manifest.yaml | 10 + .../spring-geode-samples-boot-security.gradle | 22 ++ .../BootGeodeSecurityClientApplication.java | 69 +++++ .../client/controller/SecurityController.java | 44 ++++ .../app/security/client/model/Customer.java | 48 ++++ .../BootGeodeSecurityServerApplication.java | 73 ++++++ .../src/main/resources/application.properties | 5 + .../src/main/resources/shiro.properties | 3 + .../src/main/resources/trusted.keystore | Bin 0 -> 1976 bytes ...rityClientApplicationIntegrationTests.java | 87 +++++++ 13 files changed, 605 insertions(+) create mode 100644 spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc create mode 100644 spring-geode-samples/boot/security/lombok.config create mode 100644 spring-geode-samples/boot/security/manifest.yaml create mode 100644 spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle create mode 100644 spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java create mode 100644 spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java create mode 100644 spring-geode-samples/boot/security/src/main/java/example/app/security/client/model/Customer.java create mode 100644 spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java create mode 100644 spring-geode-samples/boot/security/src/main/resources/application.properties create mode 100644 spring-geode-samples/boot/security/src/main/resources/shiro.properties create mode 100644 spring-geode-samples/boot/security/src/main/resources/trusted.keystore create mode 100644 spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc index 48d3b36c5..d39301885 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc @@ -21,6 +21,11 @@ applications with Spring Boot. | Explains what auto-configuration is provided by SBDG out-of-the-box and what the auto-configuration is doing. | {github-samples-url}/boot/configuration[Boot Auto-Configuration] +| link:guides/boot-security.html[Security with Spring Boot for Apache Geode/Pivotal GemFire] +| Explains how to configure auth and SSL/TLS for Apache Geode and Pivotal Cloud Cache powered +applications with Spring Boot. +| {github-samples-url}/boot/security[Boot Security] + | link:guides/boot-actuator.html[Spring Boot Actuator for Apache Geode/Pivotal GemFire] | Explains how to use Spring Boot Actuator for Apache Geode and how it works. | {github-samples-url}/boot/actuator[Boot Actuator] diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc new file mode 100644 index 000000000..5527031b6 --- /dev/null +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc @@ -0,0 +1,237 @@ +[[geode-samples-boot-security]] += Spring Boot Security for Apache Geode & Pivotal GemFire +Patrick Johnson +:pcc-docs: https://docs.pivotal.io/p-cloud-cache/1-11 +:shiro-docs: https://shiro.apache.org/realm +:gemfire-name: VMware Tanzu GemFire +:geode-name: Apache Geode +:toc: left +:toclevels: 2 +:stylesdir: ../ +:highlightjsdir: ../js/highlight +:docinfodir: guides + +This guide walks you through building a simple Spring Boot application with security, specifically auth and SSL. You +should already be familiar with Spring Boot and Apache Geode/Tanzu GemFire. + +[#index-link] +link:../index.html[Index] + +link:../index.html#geode-samples[Back to Samples] + +[[geode-samples-boot-security-background]] +== Background + +Security is critical to most applications. +It is important to be able to control who can access your application and what they are allowed to do, this is where +auth (authentication and authorization) comes in. Authentication is used to verify a client’s identity (human or +application) in exchange for some sort of credentials. Once authenticated, a client must be authorized before they can +perform any actions. Authorization checks the permissions required to perform an action (read data, edit data, change +configuration, etc.) against the permissions assigned to the client’s identity. Of course, sending passwords and other +data as plain text isn’t very secure, so we also need to enable SSL/TLS to encrypt those things. Now, our apps are +secure. + +TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security[Security] for more information. + +[[geode-samples-boot-security-client]] +== Securing a Client Application + +Enabling auth on the client is mostly taken care of by Spring Boot’s Auto-configuration. In the `application.properties` +file, simply set the properties `spring.data.gemfire.security.username` and `spring.data.gemfire.security.password` to +the username and password your app will use to authenticate. +Enabling SSL on the client requires you to put your `trusted.keystore` file (a Java KeyStore) in a well-known place, such +as your application’s working directory or your home directory, and auto-configuration will do the rest. If your +`trusted.keystore` has a password (which it should), you will need to specify it using the +`spring.data.gemfire.security.ssl.keystore.password` property in your `application.properties` file. You can generate a +Keystore using Java Keytool. + + +TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security-auth-clients[Auth for Clients] +for more information. + +[[geode-samples-boot-security-server]] +== Securing a Server Application + +Auto-configuration doesn’t do as much for you when configuring auth on the server as it does on the client. In order to +enable auth, you need to do two things. First, annotate your configuration class with `@EnableSecurity`. Second, because +Apache Geode’s security is integrated with Apache Shiro, define at least one Shiro Realm as a bean in your Spring +`ApplicationContext`. + +Below is an example Shiro Realm bean: + +[source,java] +---- +include::{samples-dir}/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java[tags=realm] +---- + +You can find more information on Apache Shiro and how to set up a Realm link:{shiro-docs}[here]. + +Enabling SSL on the server is essentially the same as for the client, just put your `trusted.keystore` file (a Java +KeyStore) in a well-known place, like your application’s working directory or your home directory. If your +`trusted.keystore` has a password (which it should), you will need to specify it using the +`spring.data.gemfire.security.ssl.keystore.password` property in your `application.properties` file. You can generate a +Keystore using Java Keytool. + + +TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security-auth-servers[Auth for Servers] +for more information. + +[[geode-samples-boot-security-examle]] +== Example + +To demonstrate the proper way to configure a Spring Boot application with security, we have put together a simple +example. The example is made up of two main parts: + +A client - BootGeodeSecurityClientApplication. + +A server - BootGeodeSecurityServerApplication. + +=== What it Does + +The example is very minimal and only performs some basic data operations. The server starts up, and the client then +connects to the server and tries to do two things: + +1. Write a new value into Customers, which succeeds. +2. Read a value from Customers, which fails because the user that the client authenticates with, is only authorized to +write data, not read it. + +This behavior may change, depending on the credentials used to authenticate. For example, using “cluster_operator” +credentials on the platform will result in both read and write operations succeeding. + + +=== Classes + +[[geode-samples-boot-security-example-classes-client]] +==== BootGeodeSecurityClientApplication + +This class is an Apache Geode client application that is configured to authenticate when connecting to a server and to +communicate using SSL. + +[[geode-samples-boot-security-example-classes-server]] +==== BootGeodeSecurityServerApplication + +This class is an Apache Geode server application that requires authentication for clients to connect to it and is +configured to communicate using SSL. + +[[geode-samples-boot-security-example-classes-customer]] +==== Customer + +This is a simple domain class to represent a customer. The `Customers` region will contain `Customer` objects that will +be accessed from the client. + +[[geode-samples-boot-security-example-classes-controller]] +==== SecurityController + +This class is a RestController that exposes an endpoint at “/message” that verifies the clients use of SSL. + +[[geode-samples-boot-security-example-run]] +=== Running the Example + +[[geode-samples-boot-security-example-run-local]] +==== Running Locally + +To run the example, first start the BootGeodeSecurityServerApplication and then run BootGeodeSecurityClientApplication. +In the terminal you should see the following output: + +[source] +---- +Successfully wrote data to region Customers +Attempting to read data from region Customers +Read failed because "jdoe not authorized for DATA:READ:Customers:2" +---- + +You can also hit the endpoint at https://localhost:8080/message[localhost:8080/message] to verify that the application +is using SSL. + +[[geode-samples-boot-security-example-run-platform]] +==== Running on VMware Tanzu GemFire + +In order for this sample to work, your Tanzu GemFire[VMs] tile must be set up to work with TLS. Instructions to enable +TLS for the TanzuGemfire[VMs] can be found link: {pcc-docs}/prepare-TLS.html[here]. + +Once TLS has been enabled, create your service instance with the `-c '{"tls":true}' flag`. + +For example: + +[source] +---- +cf create-service p-cloudcache [plan-name] [service-instance-name] -c '{"tls":true}' +---- + +where `[plan-name]` is replaced with the plan you are selecting and `[service-instance-name]` is replaced with the +desired name of your service. + +Update your `manifest.yml` file with the `[service-instance-name]` +[source] +---- +services: +- [your-service-instance-name] +---- + +Before deploying the application to the platform, you must update the username and password in the +`application.properties` file with the correct credentials for your service instance. + +Once your Service Instance is created you’ll need to create a service-key for the service. +[source] +---- +cf create-service-key [service-instance-name] [service-key-name] +---- + +where `[service-instance-name]` is replaced with the name of your service instance (from above) and `[service-key-name]` +is what you would like to call this service key. + +Once the service key is created, access the credentials in the service with the following command +[source] +---- +cf service-key [service-instance-name] [service-key-name] +---- + +where `[service-instance-name]` is replaced with the name of your service instance and `[service-key-name]` is replaced +with the name of your service key (from the previous step). + +In the output look for the “users” section. For this example, we used the “cluster_operator” user credentials. +[source] +---- +{ +... + "users": [ + { + "password": "xxxxxxxxxxxxxxxxxxxxxxxx", + "roles": [ + "cluster_operator" + ], + "username": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + { + "password": "xxxxxxxxxxxxxxxxxxxxxx", + "roles": [ + "developer" + ], + "username": "xxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + { + "password": "xxxxxxxxxxxxxxxxxxxxx", + "roles": [ + "readonly" + ], + "username": "xxxxxxxxxxxxxxxx" + } + ], + "wan": {} +} +---- + +Now build the sample with Gradle and push the application to the platform using `cf push`. + +Once the app is running, check the logs with `cf logs security-app --recent` and you should see output like the +following: +[source] +---- +Successfully wrote data to region Customers +Attempting to read data from region Customers +---- + +You can also hit the endpoint at +https://security-app.apps.{cf-instance}.cf-app.com/message[https://security-app.apps.{cf-instance}.cf-app.com/message], +where `{cf-instance}` is replaced with the name of your Cloud Foundry instance, to verify that the application is using +SSL. diff --git a/spring-geode-samples/boot/security/lombok.config b/spring-geode-samples/boot/security/lombok.config new file mode 100644 index 000000000..6aa51d71e --- /dev/null +++ b/spring-geode-samples/boot/security/lombok.config @@ -0,0 +1,2 @@ +# This file is generated by the 'io.freefair.lombok' Gradle plugin +config.stopBubbling = true diff --git a/spring-geode-samples/boot/security/manifest.yaml b/spring-geode-samples/boot/security/manifest.yaml new file mode 100644 index 000000000..f592411d5 --- /dev/null +++ b/spring-geode-samples/boot/security/manifest.yaml @@ -0,0 +1,10 @@ +--- +applications: + - name: security-app + memory: 768M + instances: 1 + path: ./build/libs/spring-geode-samples-boot-security-1.3.0.BUILD-SNAPSHOT.jar + services: + - pccServiceOne + buildpacks: + - https://github.com/cloudfoundry/java-buildpack.git \ No newline at end of file diff --git a/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle b/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle new file mode 100644 index 000000000..fe528f75b --- /dev/null +++ b/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle @@ -0,0 +1,22 @@ +plugins { + id "io.freefair.lombok" version "5.0.0-rc2" +} + +apply plugin: 'io.spring.convention.spring-sample-boot' + +description = "Spring Geode Sample demonstrating Apache Geode security." + +dependencies { + + compile project(":spring-geode-starter") + compile project(":spring-geode-starter-test") + + compile "org.springframework.boot:spring-boot-starter-web" + + compile "org.assertj:assertj-core" + compile "org.projectlombok:lombok" +} + +bootJar { + mainClassName = 'example.app.security.client.BootGeodeSecurityClientApplication' +} diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java new file mode 100644 index 000000000..c4639d788 --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java @@ -0,0 +1,69 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.app.security.client; + +import example.app.security.client.model.Customer; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.ClientCache; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.ApplicationRunner; +import org.springframework.boot.WebApplicationType; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.data.gemfire.config.annotation.EnableClusterConfiguration; +import org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions; + +/** + * The {@link BootGeodeSecurityClientApplication} class is a Spring Boot, Apache Geode {@link ClientCache} + * application that configures security. + * + * @author Patrick Johnson + * @see org.apache.geode.cache.client.ClientCache + * @see org.springframework.boot.SpringApplication + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.context.annotation.Bean + * @see org.springframework.data.gemfire.config.annotation.ClientCacheApplication + * @since 1.3.0 + */ +// tag::class[] +@SpringBootApplication +@EnableClusterConfiguration +@EnableEntityDefinedRegions +public class BootGeodeSecurityClientApplication { + public static void main(String[] args) { + new SpringApplicationBuilder(BootGeodeSecurityClientApplication.class) + .web(WebApplicationType.SERVLET) + .build() + .run(args); + } + + @Bean + ApplicationRunner runner(@Qualifier("Customers") Region customers) { + return args -> { + customers.put(2L, Customer.newCustomer(2L, "William Evans")); + System.out.println(String.format("Successfully wrote data to region %s", customers.getName())); + + try { + System.out.println(String.format("Attempting to read data from region %s", customers.getName())); + customers.get(2L); + } catch (Exception e) { + System.out.println(String.format("Read failed because \"%s\"", e.getCause().getMessage())); + } + }; + } +} +// end::class[] diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java new file mode 100644 index 000000000..2017cef3f --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java @@ -0,0 +1,44 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package example.app.security.client.controller; + +import example.app.security.client.BootGeodeSecurityClientApplication; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.Environment; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * The {@link SecurityController} class is a RestController used by {@link BootGeodeSecurityClientApplication} + * + * @author Patrick Johnson + * @see org.springframework.web.bind.annotation.RestController + * @since 1.3.0 + */ +// tag::class[] +@RestController +public class SecurityController { + + @Autowired + Environment env; + + @GetMapping("/message") + public String getMessage() { + return "I'm using SSL with this keystore: " + env.getProperty("spring.data.gemfire.security.ssl.keystore"); + } +} +// end::class[] diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/model/Customer.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/model/Customer.java new file mode 100644 index 000000000..afef5ced4 --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/model/Customer.java @@ -0,0 +1,48 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.app.security.client.model; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.ToString; +import org.springframework.data.annotation.Id; +import org.springframework.data.gemfire.mapping.annotation.Region; + +/** + * An Abstract Data Type (ADT) modeling a {@literal Customer}. + * + * @author John Blum + * @see Id + * @see Region + * @since 1.0.0 + */ +// tag::class[] +@Region("Customers") +@EqualsAndHashCode +@ToString(of = "name") +@RequiredArgsConstructor(staticName = "newCustomer") +public class Customer { + + @Id @NonNull @Getter + private Long id; + + @NonNull @Getter + private String name; + +} +// end::class[] diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java new file mode 100644 index 000000000..af2d6ada6 --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.app.security.server; + +import org.apache.geode.cache.server.CacheServer; +import org.apache.geode.internal.security.shiro.GeodePermissionResolver; +import org.apache.shiro.realm.text.PropertiesRealm; +import org.springframework.boot.WebApplicationType; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.data.gemfire.config.annotation.CacheServerApplication; +import org.springframework.data.gemfire.config.annotation.EnableSecurity; + +/** + * The {@link BootGeodeSecurityServerApplication} class is a Spring Boot, Apache Geode {@literal peer} + * {@link CacheServer} application serving cache clients. + * + * This Apache Geode peer member server configures security. + * + * @author Patrick Johnson + * @see org.apache.geode.cache.Cache + * @see org.apache.geode.cache.Region + * @see org.apache.geode.cache.server.CacheServer + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.context.annotation.Bean + * @see org.springframework.data.gemfire.config.annotation.CacheServerApplication + * @since 1.3.0 + */ +// tag::class[] +@SpringBootApplication +public class BootGeodeSecurityServerApplication { + + public static void main(String[] args) { + new SpringApplicationBuilder(BootGeodeSecurityServerApplication.class) + .web(WebApplicationType.NONE) + .build() + .run(args); + } + + @CacheServerApplication + @EnableSecurity + static class GeodeServerConfig { + + // tag::realm[] + @Bean + PropertiesRealm shiroRealm() { + + PropertiesRealm propertiesRealm = new PropertiesRealm(); + + propertiesRealm.setResourcePath("classpath:shiro.properties"); + propertiesRealm.setPermissionResolver(new GeodePermissionResolver()); + + return propertiesRealm; + } + // end::realm[] + } +} +// end::class[] + diff --git a/spring-geode-samples/boot/security/src/main/resources/application.properties b/spring-geode-samples/boot/security/src/main/resources/application.properties new file mode 100644 index 000000000..379118521 --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/resources/application.properties @@ -0,0 +1,5 @@ +# Spring Boot client application.properties + +spring.data.gemfire.security.ssl.keystore.password=s3cr3t +spring.data.gemfire.security.username = jdoe +spring.data.gemfire.security.password = p@55w0rd \ No newline at end of file diff --git a/spring-geode-samples/boot/security/src/main/resources/shiro.properties b/spring-geode-samples/boot/security/src/main/resources/shiro.properties new file mode 100644 index 000000000..356746a2c --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/resources/shiro.properties @@ -0,0 +1,3 @@ +# assign user jdoe the role fo viewer and give him DATA:WRITE permissions +user.jdoe = p@55w0rd, viewer +role.viewer = DATA:WRITE \ No newline at end of file diff --git a/spring-geode-samples/boot/security/src/main/resources/trusted.keystore b/spring-geode-samples/boot/security/src/main/resources/trusted.keystore new file mode 100644 index 0000000000000000000000000000000000000000..18c35a2ac5ba4dcb1da475f6c9e52df32b9a636b GIT binary patch literal 1976 zcmchX*H@E?7R8e<6(S`fbwV#8g777Pp+_kbB&a~*h$0Y`071$~7bymmDj|*|Wk3lU z5RoE^h9U|K!Uzr`O%W+kAc9830vTlRqU-u{|A70jAAaYYhqLxNXRk}vB@hS%*bwx) z6l0=dqhnZsX2)13qGKYXSR0MwW!qq=jUhgm29$#GNLdpk6b{`AV4+Y11fB+Dtq07T zUhHHG6!$%w9y?vDerSG}SzW9i)MHktdZ0F+J>sgt9j|q;+LpqHtj%)jx2B$aXy4v4 z5&G#zj@W7$CLO(FA#{|G^YsQA&}B!i2wo)rUM1Lc z)N{1`MUP-`jklv}G1?Ec>GMHwRG4*SiiAk3h>hT{pJ+C$&LubO&VEvSTUjIJDKt|3 z0+qX#+$8+#?7nNh*Gu#r>eJkdSEMMk#j2N}pt%Y&XqCQlK|VXt3m?aiD@~GRmZl7M zsN!)UNZT)2C*!F051a2ISk#~1g^xUv@_Z|66LZVL92Skz&+Ra|h2_*5ot$%vcrIsa zEAf}qOkj_H*|#{)LtWq;R?n%oejC$N#|zkdMwzbG%Q1OH2d58d%NqLC9eCwoRQ3is z)}S>ta-Fh-63N{#<_=5+M|G4a&=a~}D>sBi>qBrLrAkGa6#^if9^DEMn3A=W@PEgP||sC0`uPrL*o8{@%Mz> zkDQv+PSE2kD|?Tsc-UpooOyR!`6J7(oO{A)L4)ny<_A~eSI<4p=)Hk5NauSwrBub6 zHy1Izd%>bq{(H}gf|-4Mp-{02Bb=iC^>zK{=!h zGs6wag27<`0s;mSF`x_*whxX}0%D_yn?c2IfL4+@8W|B38_kZ4Aj*TAzSU4l2-e}K zn2;YVtAvO-9FZ9NgE2oC3o3k@hbf^$BSRu|0wY3p)^O+s7z1fgC?x-c)mU@&{Qc{ati;E=yzYE7dvM9Fo~-tI zp{qdK@!#!8v9s5;E;S3ACK+*O9gbddmFjzD09)JCcp@`)*J<{l8u|P!x3;5=FPpF8 zv9bhL}xV!SCXgv%bh1_L0{oK$C1Y>`XZm<%x?62sxI!C zX0Lul7XJf;}jRpgnke20w$}xSqvPiJ>z-KPO5uLEoaJ*{%Y+Wb@JvPfHUqQiy#;exv;m%bTTMRsUBh%4 zF>TPE=iC=)o(0*-l>E~xb4w@gYALA_|AFdwF0u;{LF0#b89HE+GXr;-UVSaYYSQwMpi(M~Kn5V~;s)UvWCE zQF6mPi8n7O7^?82`@UIo9bQ&nrZ`AiGi?kzKNw8M6A9r}nQyhIZqk%50h2<;Y2q%Nv)uk~JtkT|_gXzu^zLYqth!$1HCt+zD zQUA>d_t0gVvw0H&P*>~xVnbO}SZp^QX8U|80EUZEpR4=1Sc-XEck7q>pGIJy;&VZ3|MF$5P6c)XS~c$`enZxd+m zV7pvTqM>^VJLUX4O}-SsK4sD4s?et*`N_3aQMhtA*+Tg$&`VB}c343{c zq&Y4{a)9hkZJB$VrHRcR%IlEzfOGw8%qHdeD6VeIFM})6defobX|L~%ZH~aJFJ93F zwL#5|2iKH`tH8H#XAGYa(9Y7F^7$9+i+cBao=6}5PsYF~5YQgLSw6X+;{9R4{j0`R z;2m|c-=8v!n_F%?=qfrA4B+T@w30Ab>Cq%cDC$y6DL0&%&AtyKbXJJkTf3Ya2y9~~ RvXP+Im2#NK)A6hL`#=9?OqT!v literal 0 HcmV?d00001 diff --git a/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java b/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java new file mode 100644 index 000000000..25df8d7d1 --- /dev/null +++ b/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.app.security; + +import example.app.security.client.BootGeodeSecurityClientApplication; +import example.app.security.client.model.Customer; +import example.app.security.server.BootGeodeSecurityServerApplication; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.ServerOperationException; +import org.apache.geode.security.NotAuthorizedException; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.gemfire.tests.integration.ClientServerIntegrationTestsSupport; +import org.springframework.data.gemfire.tests.process.ProcessWrapper; +import org.springframework.test.context.junit4.SpringRunner; + +import javax.annotation.Resource; +import java.io.IOException; + +import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * Integration Tests for {@link BootGeodeSecurityClientApplication} and {@link BootGeodeSecurityServerApplication}. + * + * @author Patrick Johsnon + * @see org.springframework.boot.test.context.SpringBootTest + * @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport + * @see org.springframework.test.context.junit4.SpringRunner + * @see example.app.security.client.BootGeodeSecurityClientApplication + * @since 1.3.0 + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = BootGeodeSecurityClientApplication.class) +public class BootGeodeSecurityClientApplicationIntegrationTests extends ClientServerIntegrationTestsSupport { + + private static ProcessWrapper geodeServer; + + @Resource(name = "Customers") + private Region customers; + + @BeforeClass + public static void setup() throws IOException { + int availablePort = findAvailablePort(); + + geodeServer = run(BootGeodeSecurityServerApplication.class, + String.format("-D%s=%d", GEMFIRE_CACHE_SERVER_PORT_PROPERTY, availablePort)); + + waitForServerToStart("localhost", availablePort); + + System.setProperty(GEMFIRE_POOL_SERVERS_PROPERTY, String.format("%s[%d]", "localhost", availablePort)); + } + + @Test + public void dataReadNotAllowed() { + Exception exception = assertThrows(ServerOperationException.class, () -> customers.get(2L).getName()); + assertThat(exception.getCause()).isInstanceOf(NotAuthorizedException.class); + assertThat(exception.getCause().getMessage()).contains("jdoe not authorized for DATA:READ"); + } + + @Test + public void dataWriteAllowed() { + customers.put(3L, Customer.newCustomer(3L, "Samantha Rogers")); + } + + @AfterClass + public static void cleanup() { + stop(geodeServer); + System.clearProperty(GEMFIRE_CACHE_SERVER_PORT_PROPERTY); + } +} From d7b254a9049c274679b3d446bca75bf5883c084e Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 3 Aug 2020 13:01:09 -0700 Subject: [PATCH 013/216] Polish Security Sample Guide. Resolves gh-81. --- .../src/docs/asciidoc/_includes/samples.adoc | 10 +- .../docs/asciidoc/guides/boot-security.adoc | 285 ++++++++++++------ 2 files changed, 204 insertions(+), 91 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc index d39301885..6aab05003 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc @@ -21,15 +21,15 @@ applications with Spring Boot. | Explains what auto-configuration is provided by SBDG out-of-the-box and what the auto-configuration is doing. | {github-samples-url}/boot/configuration[Boot Auto-Configuration] -| link:guides/boot-security.html[Security with Spring Boot for Apache Geode/Pivotal GemFire] -| Explains how to configure auth and SSL/TLS for Apache Geode and Pivotal Cloud Cache powered -applications with Spring Boot. -| {github-samples-url}/boot/security[Boot Security] - | link:guides/boot-actuator.html[Spring Boot Actuator for Apache Geode/Pivotal GemFire] | Explains how to use Spring Boot Actuator for Apache Geode and how it works. | {github-samples-url}/boot/actuator[Boot Actuator] +| link:guides/boot-security.html[Spring Boot Security for Apache Geode/Pivotal GemFire] +| Explains how to configure Auth and TLS with SSL when using Apache Geode and Pivotal Cloud Cache +in Spring Boot applications. +| {github-samples-url}/boot/security[Boot Security] + | link:guides/caching-look-aside.html[Look-Aside Caching with Spring's Cache Abstraction and Apache Geode] | Explains how to enable and use the Spring Cache Abstraction with Apache Geode as the caching provider for Look-Aside Caching. | {github-samples-url}/caching/look-aside[Look-Aside Caching] diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc index 5527031b6..036d05ea4 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc @@ -1,18 +1,18 @@ [[geode-samples-boot-security]] -= Spring Boot Security for Apache Geode & Pivotal GemFire -Patrick Johnson -:pcc-docs: https://docs.pivotal.io/p-cloud-cache/1-11 -:shiro-docs: https://shiro.apache.org/realm += Spring Boot Security for Apache Geode & VMware GemFire +Patrick Johnson, John Blum :gemfire-name: VMware Tanzu GemFire :geode-name: Apache Geode +:pcc-docs: https://docs.pivotal.io/p-cloud-cache/1-11 +:shiro-docs: https://shiro.apache.org/realm :toc: left :toclevels: 2 :stylesdir: ../ :highlightjsdir: ../js/highlight :docinfodir: guides -This guide walks you through building a simple Spring Boot application with security, specifically auth and SSL. You -should already be familiar with Spring Boot and Apache Geode/Tanzu GemFire. +This guide walks you through building a simple Spring Boot application enabled with Security, specifically Auth +and TLS using SSL. You should already be familiar with Spring Boot and {geode-name}/{gemfire-name}. [#index-link] link:../index.html[Index] @@ -22,107 +22,188 @@ link:../index.html#geode-samples[Back to Samples] [[geode-samples-boot-security-background]] == Background -Security is critical to most applications. -It is important to be able to control who can access your application and what they are allowed to do, this is where -auth (authentication and authorization) comes in. Authentication is used to verify a client’s identity (human or -application) in exchange for some sort of credentials. Once authenticated, a client must be authorized before they can -perform any actions. Authorization checks the permissions required to perform an action (read data, edit data, change -configuration, etc.) against the permissions assigned to the client’s identity. Of course, sending passwords and other -data as plain text isn’t very secure, so we also need to enable SSL/TLS to encrypt those things. Now, our apps are -secure. +Security is critical to most applications. It is important to be able to control who or what can access your application +and what the subject is allowed to do. This is where Auth^2^ (Authentication & Authorization) comes in. -TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security[Security] for more information. +Authentication is used to verify a client’s identity (human or application) in exchange for some sort of credentials. +Once authenticated, a client must be authorized before they can perform any actions. Authorization checks the +permissions required to perform an action (e.g. read data, modify data, change configuration, and so on) against the +permissions assigned to the client’s identity + +Of course, sending passwords and other sensitive information as plain text over the wire is not very secure, so we also +need to enable SSL/TLS to encrypt the information as it is transmitted. Now, our applications are secure. + +WARNING: {geode-name} nor SBDG provide any support for _securing_ https://en.wikipedia.org/wiki/Data_at_rest[_data at rest_], +such as with _disk encryption_. This concern is typically left to hardware-based solutions. + +TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security[Security] for more +information. [[geode-samples-boot-security-client]] == Securing a Client Application -Enabling auth on the client is mostly taken care of by Spring Boot’s Auto-configuration. In the `application.properties` -file, simply set the properties `spring.data.gemfire.security.username` and `spring.data.gemfire.security.password` to -the username and password your app will use to authenticate. -Enabling SSL on the client requires you to put your `trusted.keystore` file (a Java KeyStore) in a well-known place, such -as your application’s working directory or your home directory, and auto-configuration will do the rest. If your -`trusted.keystore` has a password (which it should), you will need to specify it using the -`spring.data.gemfire.security.ssl.keystore.password` property in your `application.properties` file. You can generate a -Keystore using Java Keytool. +Enabling auth on the client is mostly taken care of by Spring Boot’s Auto-configuration. + +TIP: For more details on Spring Boot's Auto-configuration applied to Security, and securing the client and server, +see link:boot-configuration.html#geode-samples-boot-configuration-clientserver-security[here]. +In Spring Boot `application.properties`, set the `spring.data.gemfire.security.username` and +`spring.data.gemfire.security.password` properties to the username and password your application will use to +authenticate. -TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security-auth-clients[Auth for Clients] +Enabling SSL on the client requires you to put a `trusted.keystore` file (a _Java KeyStore_) in a well-known place, +such as your application’s working directory or your home directory, and Auto-configuration will do the rest. + +If your `trusted.keystore` has a password (as it should), you will need to specify it using the +`spring.data.gemfire.security.ssl.keystore.password` property in your Spring Boot `application.properties` file. You can +generate a Keystore using https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html[Java Keytool]. + +TIP: See Spring Boot for {geode-name}'s (SBDG) chapter on link:../index.html#geode-security-auth-clients[Auth for Clients] for more information. [[geode-samples-boot-security-server]] == Securing a Server Application -Auto-configuration doesn’t do as much for you when configuring auth on the server as it does on the client. In order to -enable auth, you need to do two things. First, annotate your configuration class with `@EnableSecurity`. Second, because -Apache Geode’s security is integrated with Apache Shiro, define at least one Shiro Realm as a bean in your Spring -`ApplicationContext`. +Auto-configuration does not do as much for you when configuring auth on the server as it does on the client. In order to +enable auth, you need to do two things. -Below is an example Shiro Realm bean: +First, annotate your configuration class with `@EnableSecurity`. Second, because {geode-name}’s security is integrated +with Apache Shiro, define at least one Shiro Realm as a bean in your Spring `ApplicationContext`. +.Example Shiro Realm bean: [source,java] ---- include::{samples-dir}/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java[tags=realm] ---- -You can find more information on Apache Shiro and how to set up a Realm link:{shiro-docs}[here]. +You can find more information on Apache Shiro and how to configure a Realm link:{shiro-docs}[here]. -Enabling SSL on the server is essentially the same as for the client, just put your `trusted.keystore` file (a Java -KeyStore) in a well-known place, like your application’s working directory or your home directory. If your -`trusted.keystore` has a password (which it should), you will need to specify it using the -`spring.data.gemfire.security.ssl.keystore.password` property in your `application.properties` file. You can generate a -Keystore using Java Keytool. +Enabling SSL on the server is essentially the same as for the client, just put your `trusted.keystore` file (a _Java +KeyStore_) in a well-known place, like your application’s working directory or your home directory. If your +`trusted.keystore` has a password (as it should), you will need to specify it using the +`spring.data.gemfire.security.ssl.keystore.password` property in your Spring Boot `application.properties` file. You can +generate a Keystore using https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html[Java Keytool]. - -TIP: See the Spring Boot for {geode-name} (SBDG) chapter on link:../index.html#geode-security-auth-servers[Auth for Servers] +TIP: See Spring Boot for {geode-name}'s (SBDG) chapter on link:../index.html#geode-security-auth-servers[Auth for Servers] for more information. -[[geode-samples-boot-security-examle]] +[[geode-samples-boot-security-example]] == Example -To demonstrate the proper way to configure a Spring Boot application with security, we have put together a simple -example. The example is made up of two main parts: +To demonstrate the proper way to configure a Spring Boot application with security, we put together a simple example. +The example is made up of two main parts: -A client - BootGeodeSecurityClientApplication. +A client - `BootGeodeSecurityClientApplication`. -A server - BootGeodeSecurityServerApplication. +A server - `BootGeodeSecurityServerApplication`. +[[geode-samples-boot-security-example-behavior]] === What it Does -The example is very minimal and only performs some basic data operations. The server starts up, and the client then -connects to the server and tries to do two things: +The example is very minimal and only performs some basic data access operations in a secure context. The server starts +up, and then the client connects to the server and tries to do two things: 1. Write a new value into Customers, which succeeds. -2. Read a value from Customers, which fails because the user that the client authenticates with, is only authorized to +2. Read a value from Customers, which fails because the user that the client authenticates with is only authorized to write data, not read it. -This behavior may change, depending on the credentials used to authenticate. For example, using “cluster_operator” -credentials on the platform will result in both read and write operations succeeding. - +This behavior may change depending on the credentials used to authenticate. For example, running with +“_cluster_operator_” credentials on the platform will result in both read and write operations succeeding. === Classes [[geode-samples-boot-security-example-classes-client]] ==== BootGeodeSecurityClientApplication -This class is an Apache Geode client application that is configured to authenticate when connecting to a server and to -communicate using SSL. +.Spring Boot, {geode-name} Client Application +[source,java] +---- +include::{samples-dir}/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java[tag=class] +---- + +This class is a Spring Boot, {geode-name} client application (i.e. `ClientCache`) configured to authenticate when +connecting to a cluster of servers using connections secured with SSL. + +The `@SpringBootApplication` annotation declares the application to be a Spring Boot application. With SBDG on the +application classpath, a `ClientCache` instance will be auto-configured automatically, making the application a cache +client capable of connecting to the cluster. + +Finally, we declare a `ApplicationRunner` bean to perform some basic data access operations secured by the server +to observe the effects of security. + +TIP: Because SDBG auto-configures a `ClientCache` instance by default, you do not need to explicitly annotate your +`@SpringBootApplication` class with SDG's `@ClientCacheApplication` annotation. In fact doing so disables some of the +auto-configuration, like security, applied by SBDG OOTB. The same is true when you declare one of the +[`@PeerCacheApplication`, `@CacheServerApplication`] annotations, which changes your `@SpringBootApplication` class +completely, from a client to a server-side GemFire/Geode process. Therefore, be careful! See the relevant +link:../index.html#geode-clientcache-applications[chapter] in the reference documentation for more details. [[geode-samples-boot-security-example-classes-server]] ==== BootGeodeSecurityServerApplication -This class is an Apache Geode server application that requires authentication for clients to connect to it and is -configured to communicate using SSL. +.Spring Boot, {geode-name} Server Application +[source,java] +---- +include::{samples-dir}/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java[tag=class] +---- + +This class is a Spring Boot, {geode-name} server application (i.e. `CacheServer`) that requires clients +(i.e. `ClientCache`) to authenticate when connecting to the server and to communicate using SSL. + +Unlike the client application class above, we annotate this `@SpringBootApplication` class with `@CacheServerApplication` +to override the default `ClientCache` auto-configured by SBDG OOTB. This makes the application a GemFire/Geode Server on +startup, capable of serving clients. + +We must additionally annotate the server application class with SBDG's `@EnableSecurity` annotation to enable GemFire +/ Geode Security on the server-side. By explicitly declaring a `PropertiesRealm` bean, we are using Apache Shiro as the +auth provider, supplying the security credentials (users, roles and permissions) via a Java Properties file: + +.Apache Shiro Properties file containing the security credentials configuration +[source,java] +---- +include::{samples-dir}/boot/security/src/main/resources/shiro.properties[] +---- + +In addition to the auth (authentication/authorization) configuration, we must additionally supply a Java Keystore file +to encrypt the connection between the client and server using SSL, as discussed above. All you need to do is create a +Java Keystore file and put it in your application classpath root. SBDG will +link:../index.html#geode-security-ssl[take care of the rest]. + +Of course, if you have secured your Java Keystore file with a password (as you should) then you must additionally supply +the password in `application.properties`, like so: + +.Application.properties containing Auth (username/password) and SSL configuration +[source,java] +---- +include::{samples-dir}/boot/security/src/main/resources/application.properties[] +---- + +The SSL related configuration is used by both the client and server. [[geode-samples-boot-security-example-classes-customer]] ==== Customer -This is a simple domain class to represent a customer. The `Customers` region will contain `Customer` objects that will -be accessed from the client. +.Customer class +[source,java] +---- +include::{samples-dir}/boot/security/src/main/java/example/app/security/client/model/Customer.java[tag=class] +---- + +This is a simple application domain class to represent a customer. The `Customer` class is annotated with SDG's `@Region` +mapping annotation to declare that the "_Customers_" `Region` will contain `Customer` objects that will be accessed +securely from the client. [[geode-samples-boot-security-example-classes-controller]] ==== SecurityController -This class is a RestController that exposes an endpoint at “/message” that verifies the clients use of SSL. +.SecurityController class +[source,java] +---- +include::{samples-dir}/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java[tag=class] +---- + +This class is a Spring `RestController` exposing an REST service endpoint at “_/message_” to verify the clients +use of SSL. [[geode-samples-boot-security-example-run]] === Running the Example @@ -130,39 +211,43 @@ This class is a RestController that exposes an endpoint at “/message” that v [[geode-samples-boot-security-example-run-local]] ==== Running Locally -To run the example, first start the BootGeodeSecurityServerApplication and then run BootGeodeSecurityClientApplication. +To run the example, first start the `BootGeodeSecurityServerApplication` +and then run `BootGeodeSecurityClientApplication`. + In the terminal you should see the following output: -[source] +.Output when running locally +[source,text] ---- -Successfully wrote data to region Customers -Attempting to read data from region Customers +Successfully put [Customer(name=William Evans)] in Region [Customers] +Attempting to read from Region [Customers]... Read failed because "jdoe not authorized for DATA:READ:Customers:2" ---- -You can also hit the endpoint at https://localhost:8080/message[localhost:8080/message] to verify that the application +You can also hit the endpoint at http://localhost:8080/message[localhost:8080/message] to verify the application is using SSL. [[geode-samples-boot-security-example-run-platform]] -==== Running on VMware Tanzu GemFire +==== Running on {gemfire-name} [VMs] -In order for this sample to work, your Tanzu GemFire[VMs] tile must be set up to work with TLS. Instructions to enable -TLS for the TanzuGemfire[VMs] can be found link: {pcc-docs}/prepare-TLS.html[here]. +In order for this sample to work, your {gemfire-name} [VMs] tile must be setup to work with TLS. Instructions to enable +TLS for the {gemfire-name} [VMs] tile can be found {pcc-docs}/prepare-TLS.html[here]. -Once TLS has been enabled, create your service instance with the `-c '{"tls":true}' flag`. +Once TLS has been enabled, create your service instance with the `-c '{"tls":true}'` flag. For example: -[source] +.Create Service Instance enabled with TLS +[source,text] ---- cf create-service p-cloudcache [plan-name] [service-instance-name] -c '{"tls":true}' ---- -where `[plan-name]` is replaced with the plan you are selecting and `[service-instance-name]` is replaced with the -desired name of your service. +Replace `[plan-name]` with the plan you are selecting and `[service-instance-name]` with the desired name +of your service. -Update your `manifest.yml` file with the `[service-instance-name]` -[source] +.Update `manifest.yml` with the `[service-instance-name]` +[source,text] ---- services: - [your-service-instance-name] @@ -171,26 +256,32 @@ services: Before deploying the application to the platform, you must update the username and password in the `application.properties` file with the correct credentials for your service instance. -Once your Service Instance is created you’ll need to create a service-key for the service. -[source] +Once your service instance is created you’ll need to create a service-key for the service. + +.Create Service Key +[source,text] ---- cf create-service-key [service-instance-name] [service-key-name] ---- -where `[service-instance-name]` is replaced with the name of your service instance (from above) and `[service-key-name]` -is what you would like to call this service key. +Replace `[service-instance-name]` with the name of your service instance (from above). `[service-key-name]` is what you +would like to call this service key. + +Once the service key is created, access the credentials in the service with the following command: -Once the service key is created, access the credentials in the service with the following command -[source] +.Review Service Key Details +[source,text] ---- cf service-key [service-instance-name] [service-key-name] ---- -where `[service-instance-name]` is replaced with the name of your service instance and `[service-key-name]` is replaced -with the name of your service key (from the previous step). +Replace `[service-instance-name]` with the name of your service instance and `[service-key-name]` with the name of your +service key (from the previous step above). -In the output look for the “users” section. For this example, we used the “cluster_operator” user credentials. -[source] +In the output, look for the “users” section. For this example, we used the “_cluster_operator_” user credentials. + +.VCAP_SERVICES credentials block +[source,text] ---- { ... @@ -221,17 +312,39 @@ In the output look for the “users” section. For this example, we used the } ---- -Now build the sample with Gradle and push the application to the platform using `cf push`. +Now build the sample with Gradle: + +.Build with Gradle +[source,text] +---- +$ gradlew :spring-geode-samples-boot-security:build +---- + +Then push the application to the platform using `cf push`. + +.Push to CF +[source,text] +[subs="verbatim,attributes"] +---- +$ cf push -u none -p ~/spring-boot-data-geode/spring-geode-samples/boot/security/build/libs/spring-geode-samples-boot-security-{spring-boot-data-geode-version}.jar +... +---- Once the app is running, check the logs with `cf logs security-app --recent` and you should see output like the following: -[source] + +.Log output from the platform +[source,text] ---- -Successfully wrote data to region Customers -Attempting to read data from region Customers +Successfully put [Customer(name=William Evans)] in Region [Customers] +Attempting to read from Region [Customers]... +Read failed because "jdoe not authorized for DATA:READ:Customers:2" ---- You can also hit the endpoint at -https://security-app.apps.{cf-instance}.cf-app.com/message[https://security-app.apps.{cf-instance}.cf-app.com/message], -where `{cf-instance}` is replaced with the name of your Cloud Foundry instance, to verify that the application is using -SSL. +https://security-app.apps..cf-app.com/message[https://security-app.apps..cf-app.com/message]. + +Replace `` with the name of your CloudFoundry instance to verify that the application is using SSL. + +Congratualtions! You have taken your first steps towards securing {geode-name} and {gemfire-name} applications +with Spring Boot. From 9ba5511ca49c6425082003253680bce5ab090cea Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 15:02:13 -0700 Subject: [PATCH 014/216] Polish Security Sample Code. Resolves gh-81. --- .../BootGeodeSecurityClientApplication.java | 54 ++++++++++++------- .../client/controller/SecurityController.java | 13 ++--- .../BootGeodeSecurityServerApplication.java | 47 ++++++++-------- .../src/main/resources/application.properties | 5 +- .../src/main/resources/shiro.properties | 4 +- 5 files changed, 72 insertions(+), 51 deletions(-) diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java index c4639d788..ef62621fc 100644 --- a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java @@ -15,55 +15,71 @@ */ package example.app.security.client; -import example.app.security.client.model.Customer; -import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientCache; + import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.context.annotation.Bean; -import org.springframework.data.gemfire.config.annotation.EnableClusterConfiguration; +import org.springframework.data.gemfire.GemfireTemplate; import org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions; +import org.springframework.geode.config.annotation.EnableClusterAware; + +import example.app.security.client.model.Customer; /** - * The {@link BootGeodeSecurityClientApplication} class is a Spring Boot, Apache Geode {@link ClientCache} - * application that configures security. + * A Spring Boot, Apache Geode {@link ClientCache} application that configures security. * * @author Patrick Johnson + * @author John Blum * @see org.apache.geode.cache.client.ClientCache - * @see org.springframework.boot.SpringApplication + * @see org.springframework.boot.ApplicationRunner * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.builder.SpringApplicationBuilder * @see org.springframework.context.annotation.Bean * @see org.springframework.data.gemfire.config.annotation.ClientCacheApplication - * @since 1.3.0 + * @see org.springframework.geode.config.annotation.EnableClusterAware + * @since 1.4.0 */ // tag::class[] @SpringBootApplication -@EnableClusterConfiguration -@EnableEntityDefinedRegions +@EnableClusterAware +@EnableEntityDefinedRegions(basePackageClasses = Customer.class) public class BootGeodeSecurityClientApplication { + public static void main(String[] args) { + new SpringApplicationBuilder(BootGeodeSecurityClientApplication.class) - .web(WebApplicationType.SERVLET) - .build() - .run(args); + .web(WebApplicationType.SERVLET) + .build() + .run(args); } + // tag::runner[] @Bean - ApplicationRunner runner(@Qualifier("Customers") Region customers) { + ApplicationRunner runner(@Qualifier("customersTemplate") GemfireTemplate customersTemplate) { + return args -> { - customers.put(2L, Customer.newCustomer(2L, "William Evans")); - System.out.println(String.format("Successfully wrote data to region %s", customers.getName())); + + Customer williamEvans = Customer.newCustomer(2L, "William Evans"); + + customersTemplate.put(williamEvans.getId(), williamEvans); + + System.err.printf("Successfully put [%1$s] in Region [%2$s]%n", + williamEvans, customersTemplate.getRegion().getName()); try { - System.out.println(String.format("Attempting to read data from region %s", customers.getName())); - customers.get(2L); - } catch (Exception e) { - System.out.println(String.format("Read failed because \"%s\"", e.getCause().getMessage())); + System.err.printf("Attempting to read from Region [%s]...%n", customersTemplate.getRegion().getName()); + customersTemplate.get(2L); + } + catch (Exception cause) { + System.err.println(String.format("Read failed because \"%s\"", + cause.getCause().getCause().getMessage())); } }; } + // end::runner[] } // end::class[] diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java index 2017cef3f..f6ad2d6e2 100644 --- a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/controller/SecurityController.java @@ -13,32 +13,33 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package example.app.security.client.controller; -import example.app.security.client.BootGeodeSecurityClientApplication; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; +import example.app.security.client.BootGeodeSecurityClientApplication; + /** - * The {@link SecurityController} class is a RestController used by {@link BootGeodeSecurityClientApplication} + * A Spring {@link RestController} used by {@link BootGeodeSecurityClientApplication}. * * @author Patrick Johnson * @see org.springframework.web.bind.annotation.RestController - * @since 1.3.0 + * @since 1.4.0 */ // tag::class[] @RestController public class SecurityController { @Autowired - Environment env; + private Environment environment; @GetMapping("/message") public String getMessage() { - return "I'm using SSL with this keystore: " + env.getProperty("spring.data.gemfire.security.ssl.keystore"); + return String.format("I'm using SSL with this Keystore: %s", + this.environment.getProperty("spring.data.gemfire.security.ssl.keystore")); } } // end::class[] diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java index af2d6ada6..4badcc20c 100644 --- a/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java @@ -17,7 +17,9 @@ import org.apache.geode.cache.server.CacheServer; import org.apache.geode.internal.security.shiro.GeodePermissionResolver; + import org.apache.shiro.realm.text.PropertiesRealm; + import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; @@ -26,48 +28,49 @@ import org.springframework.data.gemfire.config.annotation.EnableSecurity; /** - * The {@link BootGeodeSecurityServerApplication} class is a Spring Boot, Apache Geode {@literal peer} - * {@link CacheServer} application serving cache clients. + * A Spring Boot, Apache Geode {@literal peer} {@link CacheServer} application serving cache clients. * - * This Apache Geode peer member server configures security. + * This Apache Geode {@link CacheServer} and {@literal peer member} configures Apache Geode Security + * using Apache Shiro. * * @author Patrick Johnson + * @author John Blum * @see org.apache.geode.cache.Cache - * @see org.apache.geode.cache.Region * @see org.apache.geode.cache.server.CacheServer + * @see org.apache.shiro.realm.text.PropertiesRealm * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.builder.SpringApplicationBuilder * @see org.springframework.context.annotation.Bean * @see org.springframework.data.gemfire.config.annotation.CacheServerApplication - * @since 1.3.0 + * @see org.springframework.data.gemfire.config.annotation.EnableSecurity + * @see Apache Shiro + * @since 1.4.0 */ // tag::class[] @SpringBootApplication +@CacheServerApplication +@EnableSecurity public class BootGeodeSecurityServerApplication { public static void main(String[] args) { + new SpringApplicationBuilder(BootGeodeSecurityServerApplication.class) - .web(WebApplicationType.NONE) - .build() - .run(args); + .web(WebApplicationType.NONE) + .build() + .run(args); } - @CacheServerApplication - @EnableSecurity - static class GeodeServerConfig { + // tag::realm[] + @Bean + PropertiesRealm shiroRealm() { - // tag::realm[] - @Bean - PropertiesRealm shiroRealm() { + PropertiesRealm propertiesRealm = new PropertiesRealm(); - PropertiesRealm propertiesRealm = new PropertiesRealm(); + propertiesRealm.setResourcePath("classpath:shiro.properties"); + propertiesRealm.setPermissionResolver(new GeodePermissionResolver()); - propertiesRealm.setResourcePath("classpath:shiro.properties"); - propertiesRealm.setPermissionResolver(new GeodePermissionResolver()); - - return propertiesRealm; - } - // end::realm[] + return propertiesRealm; } + // end::realm[] } // end::class[] - diff --git a/spring-geode-samples/boot/security/src/main/resources/application.properties b/spring-geode-samples/boot/security/src/main/resources/application.properties index 379118521..40cf9f138 100644 --- a/spring-geode-samples/boot/security/src/main/resources/application.properties +++ b/spring-geode-samples/boot/security/src/main/resources/application.properties @@ -1,5 +1,6 @@ # Spring Boot client application.properties -spring.data.gemfire.security.ssl.keystore.password=s3cr3t +spring.data.gemfire.management.use-http=false spring.data.gemfire.security.username = jdoe -spring.data.gemfire.security.password = p@55w0rd \ No newline at end of file +spring.data.gemfire.security.password = p@55w0rd +spring.data.gemfire.security.ssl.keystore.password=s3cr3t diff --git a/spring-geode-samples/boot/security/src/main/resources/shiro.properties b/spring-geode-samples/boot/security/src/main/resources/shiro.properties index 356746a2c..83bb3b152 100644 --- a/spring-geode-samples/boot/security/src/main/resources/shiro.properties +++ b/spring-geode-samples/boot/security/src/main/resources/shiro.properties @@ -1,3 +1,3 @@ -# assign user jdoe the role fo viewer and give him DATA:WRITE permissions +# Assign user 'jdoe' the role of 'viewer' having 'DATA:WRITE' permissions. user.jdoe = p@55w0rd, viewer -role.viewer = DATA:WRITE \ No newline at end of file +role.viewer = DATA:WRITE From 6fe9eba497eb859033620d91164a2b27a43e9f9f Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 15:02:36 -0700 Subject: [PATCH 015/216] Polish Security Sample Tests. Resolves gh-81. --- ...rityClientApplicationIntegrationTests.java | 85 ++++++++++--------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java b/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java index 25df8d7d1..1bc35d313 100644 --- a/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java +++ b/spring-geode-samples/boot/security/src/test/java/example/app/security/BootGeodeSecurityClientApplicationIntegrationTests.java @@ -15,73 +15,82 @@ */ package example.app.security; -import example.app.security.client.BootGeodeSecurityClientApplication; -import example.app.security.client.model.Customer; -import example.app.security.server.BootGeodeSecurityServerApplication; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.client.ServerOperationException; -import org.apache.geode.security.NotAuthorizedException; -import org.junit.AfterClass; +import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.io.IOException; + import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; + +import org.apache.geode.cache.client.ServerOperationException; +import org.apache.geode.security.NotAuthorizedException; + +import org.apache.shiro.authz.UnauthorizedException; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.data.gemfire.tests.integration.ClientServerIntegrationTestsSupport; -import org.springframework.data.gemfire.tests.process.ProcessWrapper; +import org.springframework.dao.DataAccessResourceFailureException; +import org.springframework.data.gemfire.GemfireTemplate; +import org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport; import org.springframework.test.context.junit4.SpringRunner; -import javax.annotation.Resource; -import java.io.IOException; - -import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertThrows; +import example.app.security.client.BootGeodeSecurityClientApplication; +import example.app.security.client.model.Customer; +import example.app.security.server.BootGeodeSecurityServerApplication; /** * Integration Tests for {@link BootGeodeSecurityClientApplication} and {@link BootGeodeSecurityServerApplication}. * * @author Patrick Johsnon + * @author John Blum + * @see org.junit.Test + * @see org.apache.geode.security.NotAuthorizedException + * @see org.apache.shiro.authz.UnauthorizedException * @see org.springframework.boot.test.context.SpringBootTest - * @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport + * @see org.springframework.data.gemfire.GemfireTemplate + * @see org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport * @see org.springframework.test.context.junit4.SpringRunner * @see example.app.security.client.BootGeodeSecurityClientApplication + * @see example.app.security.server.BootGeodeSecurityServerApplication * @since 1.3.0 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = BootGeodeSecurityClientApplication.class) -public class BootGeodeSecurityClientApplicationIntegrationTests extends ClientServerIntegrationTestsSupport { - - private static ProcessWrapper geodeServer; +public class BootGeodeSecurityClientApplicationIntegrationTests extends ForkingClientServerIntegrationTestsSupport { - @Resource(name = "Customers") - private Region customers; + @Autowired + @Qualifier("customersTemplate") + @SuppressWarnings("unused") + private GemfireTemplate customersTemplate; @BeforeClass - public static void setup() throws IOException { - int availablePort = findAvailablePort(); - - geodeServer = run(BootGeodeSecurityServerApplication.class, - String.format("-D%s=%d", GEMFIRE_CACHE_SERVER_PORT_PROPERTY, availablePort)); - - waitForServerToStart("localhost", availablePort); - - System.setProperty(GEMFIRE_POOL_SERVERS_PROPERTY, String.format("%s[%d]", "localhost", availablePort)); + public static void startGeodeServer() throws IOException { + startGemFireServer(BootGeodeSecurityServerApplication.class); } @Test public void dataReadNotAllowed() { - Exception exception = assertThrows(ServerOperationException.class, () -> customers.get(2L).getName()); - assertThat(exception.getCause()).isInstanceOf(NotAuthorizedException.class); - assertThat(exception.getCause().getMessage()).contains("jdoe not authorized for DATA:READ"); + + Exception exception = assertThrows(DataAccessResourceFailureException.class, () -> this.customersTemplate.get(2L)); + + assertThat(exception).hasCauseInstanceOf(ServerOperationException.class); + assertThat(exception.getCause()).hasMessageContaining("remote server"); + assertThat(exception.getCause()).hasCauseInstanceOf(NotAuthorizedException.class); + assertThat(exception.getCause().getCause()).hasMessageContaining("jdoe not authorized for DATA:READ"); + assertThat(exception.getCause().getCause()).hasCauseInstanceOf(UnauthorizedException.class); + assertThat(exception.getCause().getCause().getCause()) + .hasMessageContaining("Subject does not have permission [DATA:READ"); + assertThat(exception.getCause().getCause().getCause()).hasNoCause(); } @Test public void dataWriteAllowed() { - customers.put(3L, Customer.newCustomer(3L, "Samantha Rogers")); - } - @AfterClass - public static void cleanup() { - stop(geodeServer); - System.clearProperty(GEMFIRE_CACHE_SERVER_PORT_PROPERTY); + Customer samanthaRogers = Customer.newCustomer(3L, "Samantha Rogers"); + + assertThat(this.customersTemplate.put(samanthaRogers.getId(), samanthaRogers)).isNull(); } } From 0242dd67cdbc38379ed470d75334426de88a9717 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 15:21:02 -0700 Subject: [PATCH 016/216] Switch from System.err message output to using a SLF4J Logger. Resolves gh-81. --- .../BootGeodeSecurityClientApplication.java | 12 ++++--- .../security/src/main/resources/logback.xml | 32 +++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 spring-geode-samples/boot/security/src/main/resources/logback.xml diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java index ef62621fc..9e23c4b5c 100644 --- a/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/client/BootGeodeSecurityClientApplication.java @@ -27,6 +27,9 @@ import org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions; import org.springframework.geode.config.annotation.EnableClusterAware; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import example.app.security.client.model.Customer; /** @@ -49,6 +52,8 @@ @EnableEntityDefinedRegions(basePackageClasses = Customer.class) public class BootGeodeSecurityClientApplication { + private static final Logger logger = LoggerFactory.getLogger("example.app.security"); + public static void main(String[] args) { new SpringApplicationBuilder(BootGeodeSecurityClientApplication.class) @@ -67,16 +72,15 @@ ApplicationRunner runner(@Qualifier("customersTemplate") GemfireTemplate custome customersTemplate.put(williamEvans.getId(), williamEvans); - System.err.printf("Successfully put [%1$s] in Region [%2$s]%n", + logger.info("Successfully put [{}] in Region [{}]", williamEvans, customersTemplate.getRegion().getName()); try { - System.err.printf("Attempting to read from Region [%s]...%n", customersTemplate.getRegion().getName()); + logger.info("Attempting to read from Region [{}]...", customersTemplate.getRegion().getName()); customersTemplate.get(2L); } catch (Exception cause) { - System.err.println(String.format("Read failed because \"%s\"", - cause.getCause().getCause().getMessage())); + logger.info("Read failed because \"{}\"", cause.getCause().getCause().getMessage()); } }; } diff --git a/spring-geode-samples/boot/security/src/main/resources/logback.xml b/spring-geode-samples/boot/security/src/main/resources/logback.xml new file mode 100644 index 000000000..15009c943 --- /dev/null +++ b/spring-geode-samples/boot/security/src/main/resources/logback.xml @@ -0,0 +1,32 @@ + + + + + + + + %d %5p %40.40c:%4L - %m%n + + + + + + %highlight(%m) %n + + + + + + + + + + + + + + + + + + From 23010bd7bd3e007216836b1d2ab4e91db11e2a17 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 15:50:27 -0700 Subject: [PATCH 017/216] Fix HTTP URL to Apache Shiro's project sit in Javadoc. --- .../app/security/server/BootGeodeSecurityServerApplication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java b/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java index 4badcc20c..f0b6d675a 100644 --- a/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java +++ b/spring-geode-samples/boot/security/src/main/java/example/app/security/server/BootGeodeSecurityServerApplication.java @@ -43,7 +43,7 @@ * @see org.springframework.context.annotation.Bean * @see org.springframework.data.gemfire.config.annotation.CacheServerApplication * @see org.springframework.data.gemfire.config.annotation.EnableSecurity - * @see Apache Shiro + * @see Apache Shiro * @since 1.4.0 */ // tag::class[] From 1f9fae3b8573b1b470bfbf4d2595a78fabda0323 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 16:48:50 -0700 Subject: [PATCH 018/216] Edit changelog and add 1.3.2.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index d169bf043..22d4e3840 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -3,6 +3,23 @@ SPRING BOOT FOR APACHE GEODE & PIVOTAL GEMFIRE CHANGELOG https://github.com/spring-projects/spring-boot-data-geode ========================================================= +Changes in version 1.3.2.RELEASE (2020-08-07) +--------------------------------------------- +Upgrades SBDG to Spring Boot 2.3.2.RELEASE. Adds new Security Sample Guide and Code demonstrating how to configure +Apache Geode & Pivotal/VMware GemFire Security (Auth + TLS) using Spring Boot. + +* Adds new Security Sample Guide and Code; +Resolves https://github.com/spring-projects/spring-boot-data-geode/pull/81. +* Adds additional documentation in the Getting Started Guide on matching versions of Apache Geode with Pivotal/VMware +GemFire, Pivotal/VMware Cloud Cache and Spring Boot. +* Fixes minor issue when launching the client Spring Boot application in the Spring Boot Actuator Sample. +* Upgrades to Spring Framework 5.2.8.RELEASE. +* Upgrades to Spring Boot 2.3.2.RELEASE. +* Upgrades to Spring Data Neumann-SR2. +* Upgrades to Spring Data for Apache Geode & VMware GemFire 2.3.2.RELEASE. +* Upgrades to Pivotal/VMware GemFire 9.10.2. + + Changes in version 1.2.9.RELEASE (2020-07-27) --------------------------------------------- Aligns SBDG with Spring Boot 2.2.9.RELEASE along with the latest versions of Spring Framework, Spring Data From 715040130fff8c9b3e0d080f25ed8a7d063c38f0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 16:53:29 -0700 Subject: [PATCH 019/216] Release 1.3.2.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index da72f2394..5048b85d9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 -version=1.3.2.BUILD-SNAPSHOT +version=1.3.2.RELEASE From 4a7daad55bd99f8607f79a229ce2dd6d10677e9b Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 17:06:43 -0700 Subject: [PATCH 020/216] Prepare next development iteration. Set Spring Boot version to 2.3.3.BUILD-SNAPSHOT. Set version to 1.3.3.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5048b85d9..4c35858ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.8.RELEASE -springBootVersion=2.3.2.RELEASE +springBootVersion=2.3.3.BUILD-SNAPSHOT springDataGemFireVersion=2.3.2.RELEASE springDataGeodeVersion=2.3.2.RELEASE springDataGeodeTestVersion=0.0.17.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 -version=1.3.2.RELEASE +version=1.3.3.BUILD-SNAPSHOT From 215c0e6261381e7a7c008f9dd533cd442d149f48 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 7 Aug 2020 17:25:41 -0700 Subject: [PATCH 021/216] Edit README to refer to 1.3.2.RELEASE and 1.3.3.BUILD-SNAPSHOT versions. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index adffa8b5a..501905182 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.1.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.2.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.3.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From 32f62d7af0952fce48d4f94fd3a9cf1168ff9ac9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:18:09 -0700 Subject: [PATCH 022/216] Upgrade to Byte Buddy 1.10.14. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 4c35858ed..6962db6bb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 -byteBuddyVersion=1.10.13 +byteBuddyVersion=1.10.14 findbugsVersion=3.0.2 mockitoVersion=3.4.4 multithreadedtcVersion=1.01 From 309d7fbbff2b3e5edd19876f2794b02d81f57236 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:18:46 -0700 Subject: [PATCH 023/216] Upgrade to Mockito 3.5.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6962db6bb..6b311a2ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.14 findbugsVersion=3.0.2 -mockitoVersion=3.4.4 +mockitoVersion=3.5.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 From a90aeb2cfd2f2582e776846abeb3f195708bef17 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:19:24 -0700 Subject: [PATCH 024/216] Upgrade to Spring Boot 2.3.3.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6b311a2ae..f0a78e753 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.8.RELEASE -springBootVersion=2.3.3.BUILD-SNAPSHOT +springBootVersion=2.3.3.RELEASE springDataGemFireVersion=2.3.2.RELEASE springDataGeodeVersion=2.3.2.RELEASE springDataGeodeTestVersion=0.0.17.RELEASE From e7af99158f2e6719a429433f3603e937b15bbde4 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:20:26 -0700 Subject: [PATCH 025/216] Upgrade to Spring Data Neumann-SR3. Upgrade to Spring Data for Apache Geode & VMware/Pivotal GemFire 2.3.3.RELEASE. Upgrade to Spring Data BOM (Release Train) Neumann-SR3. --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index f0a78e753..546d71528 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.8.RELEASE springBootVersion=2.3.3.RELEASE -springDataGemFireVersion=2.3.2.RELEASE -springDataGeodeVersion=2.3.2.RELEASE +springDataGemFireVersion=2.3.3.RELEASE +springDataGeodeVersion=2.3.3.RELEASE springDataGeodeTestVersion=0.0.17.RELEASE -springDataReleaseTrainVersion=Neumann-SR2 +springDataReleaseTrainVersion=Neumann-SR3 springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE springShellVersion=1.2.0.RELEASE From bab8d296f7c10c6aff0de07556d8477a789da921 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:21:00 -0700 Subject: [PATCH 026/216] Upgrade to Spring Test for Apache Geode & VMware/Pivotal GemFire 0.0.18.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 546d71528..e79ec6db7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ springVersion=5.2.8.RELEASE springBootVersion=2.3.3.RELEASE springDataGemFireVersion=2.3.3.RELEASE springDataGeodeVersion=2.3.3.RELEASE -springDataGeodeTestVersion=0.0.17.RELEASE +springDataGeodeTestVersion=0.0.18.RELEASE springDataReleaseTrainVersion=Neumann-SR3 springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE From 0847a38ce4f0a7a4f283eb0edf995e8e21c3cac7 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:22:08 -0700 Subject: [PATCH 027/216] Upgrade to Spring Build Conventions Gradle Plugin 0.0.34.RELEASE. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 15e1759c8..75b691193 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { dependencies { - classpath 'io.spring.gradle:spring-build-conventions:0.0.33.RELEASE' + classpath 'io.spring.gradle:spring-build-conventions:0.0.34.RELEASE' classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion" } repositories { From eb50cde12f90b6d014316343f6e705ee504e6c9e Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:22:30 -0700 Subject: [PATCH 028/216] Upgrade to Gradle 6.6. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bb8b2fc26..6c9a22477 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From b67dd8430e2c5d6ce7aa95ac521b878786d523fd Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 12 Aug 2020 13:41:11 -0700 Subject: [PATCH 029/216] Remove 'spring.data.gemfire.management.use-http' property configuration and JVM argument for Boot client. The 'spring.data.gemfire.management.use-http' property was set in application.properties. --- .../boot/actuator/spring-geode-samples-boot-actuator.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle b/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle index c55f26a61..fcd5c3750 100644 --- a/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle +++ b/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle @@ -31,5 +31,5 @@ bootJar { bootRun { main = 'example.app.temp.geode.client.BootGeodeClientApplication' - args "--spring.profiles.active=client", "--spring.data.gemfire.management.use-http=false" + args "--spring.profiles.active=client" } From 49b74c4c2fe6a78228b13183c49cd7d443435b32 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 12 Aug 2020 16:08:52 -0700 Subject: [PATCH 030/216] Edit Maven POM URL to point to the SBDG project README. --- gradle/maven-pom-editor.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle/maven-pom-editor.gradle b/gradle/maven-pom-editor.gradle index 1050c2947..3130c4022 100644 --- a/gradle/maven-pom-editor.gradle +++ b/gradle/maven-pom-editor.gradle @@ -15,6 +15,7 @@ def customizePom(gradleProject, pom) { developerConnection = 'scm:git:git@github.com:spring-projects/spring-boot-data-geode.git' url = 'https://github.com/spring-projects/spring-boot-data-geode' } + url = 'https://github.com/spring-projects/spring-boot-data-geode#spring-boot-for-apache-geode--pivotal-gemfire' } } } From b98d4639ea923f54d3f32d16114063c2a21cb31e Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 12 Aug 2020 16:08:17 -0700 Subject: [PATCH 031/216] Add 'org.springframework.geode:spring-geode-bom' (Maven BOM) to project. The Maven BOM (Bill of Materials) will provide a simpler and consistent SBDG module version dependency management experience for users starting at start.spring.io, who have added the 'Spring for Apache Geode' dependency to build Spring Boot applications using Apache Geode. Resolves gh-93. --- spring-geode-bom/spring-geode-bom.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spring-geode-bom/spring-geode-bom.gradle diff --git a/spring-geode-bom/spring-geode-bom.gradle b/spring-geode-bom/spring-geode-bom.gradle new file mode 100644 index 000000000..474d192f2 --- /dev/null +++ b/spring-geode-bom/spring-geode-bom.gradle @@ -0,0 +1,14 @@ +import io.spring.gradle.convention.SpringMavenPlugin + +apply plugin: 'io.spring.convention.bom' +apply from: MAVEN_POM_EDITOR_GRADLE + +sonarqube.skipProject = true + +project.rootProject.allprojects.each { p -> + p.plugins.withType(SpringMavenPlugin) { + if (!project.name.equals(p.name)) { + project.mavenBom.projects.add(p) + } + } +} From f739fab1ed4b6eb545454361727ce8a2450390ac Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 18 Aug 2020 12:03:55 -0700 Subject: [PATCH 032/216] Replace all references to Apache Geode and Pivotal GemFire with documentation variables. Replace all references of Pivotal GemFire with VMware GemFire. --- .../src/docs/asciidoc/_includes/caching.adoc | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc index edbc8f775..7b4eb04c9 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc @@ -1,16 +1,18 @@ [[geode-caching-provider]] -== Caching using Apache Geode or Pivotal GemFire +== Caching using Apache Geode or VMware GemFire +:gemfire-name: VMware GemFire +:geode-name: Apache Geode -One of the quickest, easiest and least invasive ways to get started using Apache Geode or Pivotal GemFire in your -Spring Boot applications is to use either Apache Geode or Pivotal GemFire as a +One of the quickest, easiest and least invasive ways to get started using {geode-name} or {gemfire-name} in your +Spring Boot applications is to use either {geode-name} or {gemfire-name} as a {spring-framework-docs}/integration.html#cache-store-configuration[_caching provider_] in {spring-framework-docs}/integration.html#cache[Spring's Cache Abstraction]. SDG {spring-framework-docs}/integration.html#cache-store-configuration-gemfire[enables] -Apache Geode or Pivotal GemFire to function as a _caching provider_ in Spring's Cache Abstraction. +{geode-name} or {gemfire-name} to function as a _caching provider_ in Spring's Cache Abstraction. -TIP: See the _Spring Data for Apache Geode Reference Guide_ for more details on the +TIP: See the _Spring Data for {geode-name} Reference Guide_ for more details on the {spring-data-geode-docs-html}/#apis:spring-cache-abstraction[support] and {spring-data-geode-docs-html}/#bootstrap-annotation-config-caching[configuration] -of Apache Geode or Pivotal GemFire as a _caching provider_ in Spring's Cache Abstraction. +of {geode-name} or {gemfire-name} as a _caching provider_ in Spring's Cache Abstraction. TIP: Make sure you thoroughly understand the {spring-framework-docs}/integration.html#cache-strategies[concepts] behind Spring's Cache Abstraction before you continue. @@ -27,9 +29,9 @@ looking up a book by ISBN, geocoding a physical address, caching the calculation when the person applies for a financial loan. If you need the proven power of an enterprise-class caching solution, with strong consistency, high availability -and multi-site (WAN) capabilities, then you should consider https://geode.apache.org/[Apache Geode], or alternatively -https://pivotal.io/pivotal-gemfire[Pivotal GemFire]. Additionally, https://pivotal.io/[Pivotal Software, Inc.] -offers Pivotal GemFire as a service, known as https://pivotal.io/platform/services-marketplace/data-management/pivotal-cloud-cache[Pivotal Cloud Cache (PCC)], +and multi-site (WAN) capabilities, then you should consider https://geode.apache.org/[{geode-name}], or alternatively +https://pivotal.io/pivotal-gemfire[{gemfire-name}]. Additionally, https://pivotal.io/[Pivotal Software, Inc.] +offers {gemfire-name} as a service, known as https://pivotal.io/platform/services-marketplace/data-management/pivotal-cloud-cache[Pivotal Cloud Cache (PCC)], when deploying and running your Spring Boot applications in https://pivotal.io/platform[Pivotal Cloud Foundry (PCF)]. Spring's {spring-framework-docs}/integration.html#cache-annotations[declarative, annotation-based caching] makes it @@ -66,22 +68,22 @@ person within the given span of time. If the person's eligibility in the given then the existing decision is returned from the cache. Otherwise, the `processEligibility(..)` method will be invoked and the result of the method will be cached when the method returns, before returning the value to the caller. -Spring Boot for Apache Geode/Pivotal GemFire _auto-configures_ Apache Geode or Pivotal GemFire as the _caching provider_ +Spring Boot for {geode-name}/{gemfire-name} _auto-configures_ {geode-name} or {gemfire-name} as the _caching provider_ when either one is declared on the application classpath, and when no other _caching provider_ (e.g. Redis) has been configured. -If Spring Boot for Apache Geode/Pivotal GemFire detects that another _cache provider_ has already been configured, -then neither Apache Geode nor Pivotal GemFire will function as the _caching provider_. This allows users to configure, -another store, e.g. Redis, as the _caching provider_ and use Apache Geode or Pivotal GemFire as your application's +If Spring Boot for {geode-name}/{gemfire-name} detects that another _cache provider_ has already been configured, +then neither {geode-name} nor {gemfire-name} will function as the _caching provider_. This allows users to configure, +another store, e.g. Redis, as the _caching provider_ and use {geode-name} or {gemfire-name} as your application's persistent store, perhaps. The only other requirement to enable caching in a Spring Boot application is for the declared caches (as specified in Spring's or JSR-107's caching annotations) to have been created and already exist, especially before the operation, on which caching has been applied, is invoked. This means the backend data store must provide the data structure -serving as the "_cache_". For Apache Geode or Pivotal GemFire, this means a `Region`. +serving as the "_cache_". For {geode-name} or {gemfire-name}, this means a `Region`. To configure the necessary Regions backing the caches declared in Spring's cache annotations, this is as simple as -using Spring Data for Apache Geode or Pivotal GemFire's +using Spring Data for {geode-name} or {gemfire-name}'s {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableCachingDefinedRegions.html[`@EnableCachingDefinedRegions`] annotation. The complete Spring Boot application looks like this: @@ -108,14 +110,14 @@ is annotated with Spring's `@Service` stereotype annotation. TIP: You can set the `DataPolicy` of the Region created through the `@EnableCachingDefinedRegions` annotation by setting the `clientRegionShortcut` to a valid enumerated value. -NOTE: Spring Boot for Apache Geode/Pivotal GemFire does not recognize nor apply the `spring.cache.cache-names` property. +NOTE: Spring Boot for {geode-name}/{gemfire-name} does not recognize nor apply the `spring.cache.cache-names` property. Instead, you should use SDG's `@EnableCachingDefinedRegions` on an appropriate Spring Boot application `@Configuration` class. [[geode-caching-provider-look-aside-near-inline]] === Look-Aside Caching, Near Caching and Inline Caching -Three different types of caching patterns can be applied with Spring when using Apace Geode or Pivotal GemFire +Three different types of caching patterns can be applied with Spring when using Apace Geode or {gemfire-name} for your application caching needs. The 3 primary caching patterns include: @@ -176,7 +178,7 @@ pull multiple bits of information to retrieve the Customer record, and so on, he _Near Caching_ is another pattern of caching where the cache is collocated with the application. This is useful when the caching technology is configured using a client/server arrangement. -We already mentioned that Spring Boot for Apache Geode & Pivotal GemFire <> +We already mentioned that Spring Boot for {geode-name} & {gemfire-name} <> an _auto-configured_, `ClientCache` instance, out-of-the-box, by default. The `ClientCache` instance is most effective when the data access operations, including cache access, is distributed to the servers in a cluster accessible by the client, and in most cases, multiple clients. This allows other cache client applications to access the same data. @@ -188,7 +190,7 @@ maintains a subset of the data in the corresponding server-side cache (i.e. Regi only contains the data of interests to the application. This "local" cache (i.e. client-side Region) is consulted before forwarding the lookup request to the server. -To enable _Near Caching_ when using either Apache Geode or Pivotal GemFire, simply change the Region's (i.e. the `Cache` +To enable _Near Caching_ when using either {geode-name} or {gemfire-name}, simply change the Region's (i.e. the `Cache` in Spring's Cache Abstraction) data management policy from `PROXY` (the default) to `CACHING_PROXY`, like so: [source,java] @@ -207,7 +209,7 @@ TIP: The default, client Region data management policy is {apache-geode-javadoc}/org/apache/geode/cache/client/ClientRegionShortcut.html#PROXY[`ClientRegionShortcut.PROXY`]. As such, all data access operations are immediately forwarded to the server. -TIP: Also see the Apache Geode documentation concerning +TIP: Also see the {geode-name} documentation concerning {apache-geode-docs}/developing/events/how_client_server_distribution_works.html[Client/Server Event Distribution] and specifically, "_Client Interest Registration on the Server_" when using local, client CACHING_PROXY Regions to manage state in addition to the corresponding server-side Region. This is necessary to receive updates on entries @@ -221,25 +223,25 @@ The final pattern of caching we'll discuss is _Inline Caching_. When employing _Inline Caching_ and a cache miss occurs, the application service method may still not be invoked since the a Region can be configured to invoke a loader to load the missing entry from an external data source. -With Apache Geode and Pivotal GemFire, the cache, or using Apache Geode/Pivotal GemFire terminology, the Region, can be +With {geode-name} and {gemfire-name}, the cache, or using {geode-name}/{gemfire-name} terminology, the Region, can be configured with a {apache-geode-javadoc}/org/apache/geode/cache/CacheLoader.html[CacheLoader]. This `CacheLoader` is implemented to retrieve missing values from some external data source, which could be an RDBMS or any other type of data store (e.g. another NoSQL store like Apache Cassandra, MongoDB or Neo4j). -TIP: See the Apache Geode User Guide on {apache-geode-docs}/developing/outside_data_sources/how_data_loaders_work.html[Data Loaders] +TIP: See the {geode-name} User Guide on {apache-geode-docs}/developing/outside_data_sources/how_data_loaders_work.html[Data Loaders] for more details. -Likewise, an Apache Geode or Pivotal Gemfire Region can be configured with a +Likewise, an {geode-name} or {gemfire-name} Region can be configured with a {apache-geode-javadoc}/org/apache/geode/cache/CacheWriter.html[CacheWriter]. A `CacheWriter` is responsible for writing any entry put into the Region to the backend data store, such as an RDBMS. This is referred to as a "_write-through_" operations because it is synchronous. If the backend data store fails to be written to then the entry will not be stored in the Region. This helps to ensure some level of consistency between the backing data store -and the Apache Geode or Pivotal GemFire Region. +and the {geode-name} or {gemfire-name} Region. TIP: It is also possible to implement Inline-Caching using an _asynchronous_, _write-behind_ operation by registering an {apache-geode-javadoc}/org/apache/geode/cache/asyncqueue/AsyncEventListener.html[AsyncEventListener] on an {apache-geode-javadoc}/org/apache/geode/cache/asyncqueue/AsyncEventQueue.html[AEQ] tied to a server-side Region. -You should consult the Apache Geode User Guide for more +You should consult the {geode-name} User Guide for more {apache-geode-docs}/developing/events/implementing_write_behind_event_handler.html[details]. NOTE: Since SBDG is currently focused on the client-side, _async_, _write-behind_ behavior is not currently covered with @@ -269,7 +271,7 @@ class CustomerService { ---- The main difference is, there are no Spring or JSR-107 caching annotations applied to the service methods -and the `CustomerRepository` is accessing Apache Geode or Pivotal GemFire directly and NOT the RDBMS. +and the `CustomerRepository` is accessing {geode-name} or {gemfire-name} directly and NOT the RDBMS. [[geode-caching-provider-inline-caching-cacheloader-cachewriter]] ===== Implementing CacheLoaders, CacheWriters for Inline Caching @@ -399,7 +401,7 @@ _Inline Caching_ in the next section. [[geode-caching-provider-inline-caching-using-spring-data-repositories]] ===== Inline Caching using Spring Data Repositories. -Spring Boot for Apache Geode & Pivotal GemFire (SBDG) now offers dedicated support and configuration of _Inline Caching_ +Spring Boot for {geode-name} & {gemfire-name} (SBDG) now offers dedicated support and configuration of _Inline Caching_ using Spring Data Repositories. This is very powerful because it allows you to: @@ -413,12 +415,12 @@ It is our belief that users should be putting data where it is most easily acces and processing Documents, then most likely MongoDB (or Couchbase or another document store) might be the most logical choice to manage your application's Documents. -However, that does not mean you have to give up Apache Geode or Pivotal GemFire in your application/system architecture. -You can leverage each data store for what it is good at. While MongoDB is good at Document handling, Apache Geode +However, that does not mean you have to give up {geode-name} or {gemfire-name} in your application/system architecture. +You can leverage each data store for what it is good at. While MongoDB is good at Document handling, {geode-name} is a highly valuable choice for consistency, high availability, multi-site, low-latency/high-throughput scale-out Use Cases. -As such, using Apache Geode and Pivotal GemFire's `CacheLoader/CacheWriter` mechanism provides a integration point +As such, using {geode-name} and {gemfire-name}'s `CacheLoader/CacheWriter` mechanism provides a integration point between itself and other data stores to best serve your Use Case and application requirements/needs. And now, SBDG just made this even easier. @@ -427,7 +429,7 @@ EXAMPLE Let's say you are using JPA/Hibernate to access (store and retrieve) data in a Oracle Database. -Then, you can configure Apache Geode to read/write-through to the backend Oracle Database when performing cache (Region) +Then, you can configure {geode-name} to read/write-through to the backend Oracle Database when performing cache (Region) operations by delegating to a Spring Data (JPA) Repository. The configuration might look something like: @@ -474,10 +476,10 @@ from the SBDG test suite. A dedicated sample will be provided in a future releas [[geode-caching-provider-advanced-configuration]] === Advanced Caching Configuration -Both Apache Geode and Pivotal GemFire support additional caching capabilities to manage the entries stored in the cache. +Both {geode-name} and {gemfire-name} support additional caching capabilities to manage the entries stored in the cache. As you can imagine, given the cache entries are stored in-memory, it becomes important to monitor and manage the -available memory wisely. After all, by default, both Apache Geode and Pivotal GemFire store data in the JVM Heap. +available memory wisely. After all, by default, both {geode-name} and {gemfire-name} store data in the JVM Heap. Several techniques can be employed to more effectively manage memory, such as using {apache-geode-docs}/developing/eviction/chapter_overview.html[Eviction], possibly @@ -490,14 +492,14 @@ and using {apache-geode-docs}/managing/heap_use/off_heap_management.html[Off-Hea There are several other strategies that can be used as well, as described in {apache-geode-docs}/managing/heap_use/heap_management.html[Managing Heap and Off-heap Memory]. -While this is well beyond the scope of this document, know that Spring Data for Apache Geode & Pivotal GemFire +While this is well beyond the scope of this document, know that Spring Data for {geode-name} & {gemfire-name} make all of these {spring-data-geode-docs-html}/#bootstrap-annotation-config-regions[configuration options] simple. [[geode-caching-provider-disable]] === Disable Caching There may be cases where you do not want your Spring Boot application to cache application state with -{spring-framework-docs}/integration.html#cache[Spring's Cache Abstraction] using either Apache Geode or Pivotal GemFire. +{spring-framework-docs}/integration.html#cache[Spring's Cache Abstraction] using either {geode-name} or {gemfire-name}. In certain cases, you may be using another Spring supported caching provider, such as Redis, to cache and manage your application state, while, even in other cases, you may not want to use Spring's Cache Abstraction at all. @@ -529,9 +531,9 @@ See Spring Boot {spring-boot-docs-html}/boot-features-caching.html#boot-features for more details. TIP: It is possible to include multiple providers on the classpath of your Spring Boot application. For instance, -you might be using Redis to cache your application's state while using either Apache Geode or Pivotal GemFire +you might be using Redis to cache your application's state while using either {geode-name} or {gemfire-name} as your application's persistent store (_System of Record_). NOTE: Spring Boot does not properly recognize `spring.cache.type=[gemfire|geode]` even though -Spring Boot for Apache Geode/Pivotal GemFire is setup to handle either of these property values +Spring Boot for {geode-name}/{gemfire-name} is setup to handle either of these property values (i.e. either "`gemfire`" or "`geode`"). From 77ed1f49d031f2345dac3df54198d9ae9423e447 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 18 Aug 2020 13:13:39 -0700 Subject: [PATCH 033/216] Edit chapter on caching. --- .../src/docs/asciidoc/_includes/caching.adoc | 123 ++++++++++-------- 1 file changed, 72 insertions(+), 51 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc index 7b4eb04c9..f17d3f5c6 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc @@ -115,16 +115,29 @@ Instead, you should use SDG's `@EnableCachingDefinedRegions` on an appropriate S `@Configuration` class. [[geode-caching-provider-look-aside-near-inline]] -=== Look-Aside Caching, Near Caching and Inline Caching +=== Look-Aside Caching, Near Caching, Inline Caching and Multi-Site Caching -Three different types of caching patterns can be applied with Spring when using Apace Geode or {gemfire-name} +Four different types of caching patterns can be applied with Spring when using Apace Geode or {gemfire-name} for your application caching needs. -The 3 primary caching patterns include: +The 4 primary caching patterns include: * _Look-Aside Caching_ * _Near Caching_ * _Inline Caching_ +* _Multi-Site Caching_ + +Typically, when most users think of caching, they are thinking of _Look-Aside Caching_. This is the default caching +pattern applied by _Spring's Cache Abstraction_. + +In a nutshell, _Near Caching_ keeps the data closer to where the data is used thereby improving on performance +due to lower latencies when data is needed (i.e. no network hops). + +Within _Inline Caching_, developers have a choice between synchronous (_Read/Write-Through_) and asynchronous +(_Write-Behind_) configurations depending on the application use case and requirements. + +Within _Multi-Site Caching_, there are _Active-Passive_ and _Active-Active_ arrangements. More details on _Multi-Site +Caching_ will be presented in a later release. [[geode-caching-provider-look-aside-caching]] ==== Look-Aside Caching @@ -218,36 +231,44 @@ in the Region that might have been changed by other clients accessing the same d [[geode-caching-provider-inline-caching]] ==== Inline Caching -The final pattern of caching we'll discuss is _Inline Caching_. +The final pattern of caching we will discuss in this chapter is _Inline Caching_. + +There are two different configurations of _Inline Caching_ that developers can apply to their Spring Boot applications +when using this pattern of caching: Synchronous (_Read/Write-Through_) and Asynchronous (_Write-Behind_). + +NOTE: Asynchronous (currently) only offers write capabilities, from the cache to the backend, external data source. +There is not option to asynchronously and automatically load the cache when the entry value becomes available in the +backend, external data source. + +[[geode-caching-provider-inline-caching-synchronous]] +===== Synchronous Inline Caching When employing _Inline Caching_ and a cache miss occurs, the application service method may still not be invoked -since the a Region can be configured to invoke a loader to load the missing entry from an external data source. +since a Region can be configured to invoke a loader to load the missing entry from an backend, external data source. With {geode-name} and {gemfire-name}, the cache, or using {geode-name}/{gemfire-name} terminology, the Region, can be -configured with a {apache-geode-javadoc}/org/apache/geode/cache/CacheLoader.html[CacheLoader]. This `CacheLoader` is -implemented to retrieve missing values from some external data source, which could be an RDBMS or any other type of +configured with a {apache-geode-javadoc}/org/apache/geode/cache/CacheLoader.html[CacheLoader]. A `CacheLoader` is +implemented to retrieve missing values from an external data source, which could be an RDBMS or any other type of data store (e.g. another NoSQL store like Apache Cassandra, MongoDB or Neo4j). TIP: See the {geode-name} User Guide on {apache-geode-docs}/developing/outside_data_sources/how_data_loaders_work.html[Data Loaders] for more details. -Likewise, an {geode-name} or {gemfire-name} Region can be configured with a -{apache-geode-javadoc}/org/apache/geode/cache/CacheWriter.html[CacheWriter]. A `CacheWriter` is responsible for -writing any entry put into the Region to the backend data store, such as an RDBMS. This is referred to as a -"_write-through_" operations because it is synchronous. If the backend data store fails to be written to then the entry -will not be stored in the Region. This helps to ensure some level of consistency between the backing data store -and the {geode-name} or {gemfire-name} Region. +Likewise, an {geode-name} or {gemfire-name} Region can also be configured with a +{apache-geode-javadoc}/org/apache/geode/cache/CacheWriter.html[CacheWriter]. A `CacheWriter` is responsible for writing +any entry put into the Region to the backend data store, such as an RDBMS. This is referred to as a "_write-through_" +operation because it is synchronous. If the backend data store fails to be updated then the entry will not be stored in +the Region. This helps to ensure some level of consistency between the backend data store and the {geode-name} +or {gemfire-name} Region. -TIP: It is also possible to implement Inline-Caching using an _asynchronous_, _write-behind_ operation by registering -an {apache-geode-javadoc}/org/apache/geode/cache/asyncqueue/AsyncEventListener.html[AsyncEventListener] -on an {apache-geode-javadoc}/org/apache/geode/cache/asyncqueue/AsyncEventQueue.html[AEQ] tied to a server-side Region. +TIP: It is also possible to implement _Inline-Caching_ using _asynchronous_, _write-behind_ operations by registering +an {apache-geode-javadoc}/org/apache/geode/cache/asyncqueue/AsyncEventListener.html[AsyncEventListener] on an +{apache-geode-javadoc}/org/apache/geode/cache/asyncqueue/AsyncEventQueue.html[AEQ] attached to a server-side Region. You should consult the {geode-name} User Guide for more -{apache-geode-docs}/developing/events/implementing_write_behind_event_handler.html[details]. - -NOTE: Since SBDG is currently focused on the client-side, _async_, _write-behind_ behavior is not currently covered with -extensive, convenient support, although, it is still very much possible to do. +{apache-geode-docs}/developing/events/implementing_write_behind_event_handler.html[details]. We cover _asynchronous_, +_write-behind_ _Inline Caching_ in the next section. -The typical pattern of _Inline Caching_ when applied to application code looks like the following: +The typical pattern of _Inline Caching_ when applied to application code looks similar to the following: .Inline Caching Pattern Applied [source,java] @@ -270,15 +291,15 @@ class CustomerService { } ---- -The main difference is, there are no Spring or JSR-107 caching annotations applied to the service methods +The main difference is, there are no Spring or JSR-107 caching annotations applied to the application's service methods and the `CustomerRepository` is accessing {geode-name} or {gemfire-name} directly and NOT the RDBMS. -[[geode-caching-provider-inline-caching-cacheloader-cachewriter]] -===== Implementing CacheLoaders, CacheWriters for Inline Caching +[[geode-caching-provider-inline-caching-synchronous-cacheloader-cachewriter]] +====== Implementing CacheLoaders & CacheWriters for Inline Caching You can use Spring to configure a `CacheLoader` or `CacheWriter` as a bean in the Spring `ApplicationContext` -and then wire it to a Region. Given the `CacheLoader` or `CacheWriter` is a Spring bean like any other bean -in the Spring `ApplicationContext`, you can inject any `DataSource` you like into the Loader/Writer. +and then wire the loader and/or writer to a Region. Given the `CacheLoader` or `CacheWriter` is a Spring bean +like any other bean in the Spring `ApplicationContext`, you can inject any `DataSource` you like into the Loader/Writer. While you can configure client Regions with `CacheLoaders` and `CacheWriters`, it is typically more common to configure the corresponding server-side Region; for example: @@ -296,7 +317,7 @@ class FinancialLoanApplicationServer { @Bean("EligibilityDecisions") PartitionedRegionFactoryBean eligibilityDecisionsRegion( GemFireCache gemfireCache, CacheLoader decisionManagementSystemLoader, - CacheWriter decisionManagemenSystemWriter) { + CacheWriter decisionManagementSystemWriter) { PartitionedRegionFactoryBean eligibilityDecisionsRegion = new PartitionedRegionFactoryBean<>(); @@ -304,7 +325,6 @@ class FinancialLoanApplicationServer { eligibilityDecisionsRegion.setCache(gemfireCache); eligibilityDecisionsRegion.setCacheLoader(decisionManagementSystemLoader); eligibilityDecisionsRegion.setCacheWriter(decisionManagementSystemWriter); - eligibilityDecisionsRegion.setClose(false); eligibilityDecisionsRegion.setPersistent(false); return eligibilityDecisionsRegion; @@ -350,7 +370,7 @@ class DecisionManagementSystemLoader implements CacheLoader entryEvent) { - // Use configured DataSource to save (e.g. INSERT) the entry to the backend data store + // Use configured DataSource to save (e.g. INSERT) the entry value into the backend data store } public void beforeUpdate(EntryEvent entryEvent) { - // Use the configured DataSource to save (e.g. UPDATE or UPSERT) the entry in the backend data store + // Use the configured DataSource to save (e.g. UPDATE or UPSERT) the entry value into the backend data store } public void beforeDestroy(EntryEvent entryEvent) { - // Use the configured DataSource to delete (i.e. DELETE) the entry from the backend data store + // Use the configured DataSource to delete (i.e. DELETE) the entry value from the backend data store } ... @@ -398,8 +418,8 @@ your backend data store (e.g. JDBC, Spring's `JdbcTemplate`, JPA/Hibernate, etc) a `javax.sql.DataSource`. In fact, we will present another, more useful and convenient approach to implementing _Inline Caching_ in the next section. -[[geode-caching-provider-inline-caching-using-spring-data-repositories]] -===== Inline Caching using Spring Data Repositories. +[[geode-caching-provider-inline-caching-synchronous-using-spring-data-repositories]] +====== Inline Caching using Spring Data Repositories Spring Boot for {geode-name} & {gemfire-name} (SBDG) now offers dedicated support and configuration of _Inline Caching_ using Spring Data Repositories. @@ -411,23 +431,23 @@ MongoDB for Documents, Neo4j for Graphs, Elasticsearch for Search, and so on). 2. Use complex mapping strategies (e.g. ORM provided by JPA/Hibernate). -It is our belief that users should be putting data where it is most easily accessible. If you are accessing -and processing Documents, then most likely MongoDB (or Couchbase or another document store) might be -the most logical choice to manage your application's Documents. +It is our belief that users should be storing data where it is most easily accessible. If you are accessing +and processing Documents, then MongoDB, Couchbase or another document store is probably going to be the most logical +choice to manage your application's Documents. However, that does not mean you have to give up {geode-name} or {gemfire-name} in your application/system architecture. -You can leverage each data store for what it is good at. While MongoDB is good at Document handling, {geode-name} +You can leverage each data store for what it is good at. While MongoDB is excellent at handling documents, {geode-name} is a highly valuable choice for consistency, high availability, multi-site, low-latency/high-throughput scale-out -Use Cases. +application use cases. -As such, using {geode-name} and {gemfire-name}'s `CacheLoader/CacheWriter` mechanism provides a integration point -between itself and other data stores to best serve your Use Case and application requirements/needs. +As such, using {geode-name} and {gemfire-name}'s `CacheLoader/CacheWriter` mechanism provides a nice integration point +between itself and other data stores to best serve your application's use case and requirements. -And now, SBDG just made this even easier. +And now, SBDG has just made this even easier. EXAMPLE -Let's say you are using JPA/Hibernate to access (store and retrieve) data in a Oracle Database. +Let's say you are using JPA/Hibernate to access (store and retrieve) data managed in an Oracle Database. Then, you can configure {geode-name} to read/write-through to the backend Oracle Database when performing cache (Region) operations by delegating to a Spring Data (JPA) Repository. @@ -454,18 +474,18 @@ class SpringBootOracleDatabaseApacheGeodeApplication { Out-of-the-box, SBDG provides the `InlineCachingRegionConfigurer` interface. -Given a `Predicate` to express and match the target Region by name along with a Spring Data `CrudRepository`, -the `InlineCachingRegionConfigurer` will configure and adapt the Spring Data `CrudRepository` as a `CacheLoader` -and `CacheWriter` for the Region (e.g. "Customers"), i.e. it enables the Region to use _Inline Caching_. +Given a `Predicate` to express the criteria used to match the target Region by name and a Spring Data `CrudRepository`, +the `InlineCachingRegionConfigurer` will configure and adapt the Spring Data `CrudRepository` as a `CacheLoader` and +`CacheWriter` registered on the Region (e.g. "Customers") to enable _Inline Caching_ functionality. -You simply only need to declare `InlineCachingRegionConfigurer` as a bean in the Spring application context -and make the association between the Region (by name) and the appropriate Spring Data `CrudRepository`. +You simply only need to declare `InlineCachingRegionConfigurer` as a bean in the Spring `ApplicationContext` and make +the association between the Region (by name) and the appropriate Spring Data `CrudRepository`. In this example, we used JPA and Spring Data JPA to store/retrieve the data in the cache (Region) to/from a backend database. But, you can inject any Spring Data Repository for any data store (e.g. Redis, MongoDB, etc) that supports the Spring Data Repository abstraction. -TIP: If you only want to support oneway data access operations when using _Inline Caching_, then you can use either +TIP: If you only want to support one way data access operations when using _Inline Caching_, then you can use either the `RepositoryCacheLoaderRegionConfigurer` for reads or the `RepositoryCacheWriterRegionConfigurer` for writes, instead of the `InlineCachingRegionConfigurer`, which supports both reads and writes. @@ -478,7 +498,7 @@ from the SBDG test suite. A dedicated sample will be provided in a future releas Both {geode-name} and {gemfire-name} support additional caching capabilities to manage the entries stored in the cache. -As you can imagine, given the cache entries are stored in-memory, it becomes important to monitor and manage the +As you can imagine, given that cache entries are stored in-memory, it becomes important to monitor and manage the available memory wisely. After all, by default, both {geode-name} and {gemfire-name} store data in the JVM Heap. Several techniques can be employed to more effectively manage memory, such as using @@ -493,7 +513,8 @@ There are several other strategies that can be used as well, as described in {apache-geode-docs}/managing/heap_use/heap_management.html[Managing Heap and Off-heap Memory]. While this is well beyond the scope of this document, know that Spring Data for {geode-name} & {gemfire-name} -make all of these {spring-data-geode-docs-html}/#bootstrap-annotation-config-regions[configuration options] simple. +make all of these {spring-data-geode-docs-html}/#bootstrap-annotation-config-regions[configuration options] available +and simple to use. [[geode-caching-provider-disable]] === Disable Caching From 8cf9ca98c3f87a9efe08b340989296f9257dccea Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 19 Aug 2020 21:57:25 -0700 Subject: [PATCH 034/216] Define documentation variable to the JDK Javadoc. --- spring-geode-docs/src/docs/asciidoc/index.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 086237635..960bfb9b1 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -11,6 +11,8 @@ John Blum :source-highlighter: prettify :toc: left :toclevels: 1 +:java-version: 8 +:jdk-javadoc: https://docs.oracle.com/javase/{java-version}/docs/api :apache-geode-name: Apache Geode :apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} From 17143c96a9cb220b8c7e6e7e7713e1f329323b37 Mon Sep 17 00:00:00 2001 From: Wayne Lund Date: Mon, 17 Aug 2020 16:43:44 -0700 Subject: [PATCH 035/216] Update .gitignore to exclude bin/ directory. I'm getting these bin/ directories from adding the project from the top of the SBDG project. spring-gemfire-starter/bin/ spring-geode-actuator-autoconfigure/bin/ spring-geode-actuator/bin/ spring-geode-autoconfigure/bin/ spring-geode-docs/bin/ spring-geode-samples/boot/actuator/bin/ spring-geode-samples/boot/configuration/.java-version spring-geode-samples/boot/configuration/bin/ spring-geode-samples/boot/security/bin/ spring-geode-samples/caching/http-session/bin/ spring-geode-samples/caching/inline/bin/ spring-geode-samples/caching/look-aside/bin/ spring-geode-samples/caching/multi-site/bin/ spring-geode-samples/caching/near/bin/ spring-geode-samples/intro/getting-started/bin/ spring-geode-samples/land-shy-fan/ spring-geode-samples/lock-important-pot/ spring-geode-samples/mix-faithful-pot/ spring-geode-starter-logging/bin/ spring-geode-tests/smoke-tests/function-execution-on-region/bin/ spring-geode-tests/smoke-tests/locator-application/bin/ spring-geode-tests/smoke-tests/logging/bin/ spring-geode-tests/smoke-tests/multi-store/bin/ spring-geode-tests/smoke-tests/peer-cache-application/bin/ spring-geode-tests/smoke-tests/spring-initializer/bin/ spring-geode/bin/ Resolves gh-94. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f8ce7361a..2a1addccd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ build/ out/ target/ +bin/ .gradle .springBeans *.iml From 6608afa8412f268cbfd29e4995808b9768740f2b Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 13:45:21 -0700 Subject: [PATCH 036/216] Arrange bin/ directory exclusion alphabetically. Polish for GitHub PR-94. Resolves gh-94. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2a1addccd..d6f56cd92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ .DS_Store +bin/ build/ out/ target/ -bin/ .gradle .springBeans *.iml From f62df3a1f264c5932edc822d09321278da03eb8f Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:50:23 -0700 Subject: [PATCH 037/216] Upgrade Samples Maven POMs to Spring Boot 2.3.3.RELEASE and SBDG 1.3.3.BUILD-SNAPSHOT. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index 0f9054e37..4bd743428 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.1.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index da30996aa..52eeab929 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.1.RELEASE + 2.3.3.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.1.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.1.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.1.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.1.BUILD-SNAPSHOT + 1.3.3.BUILD-SNAPSHOT From ecf2994a01177217b0ac25a20dba4cf7d7c7305c Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 15:57:43 -0700 Subject: [PATCH 038/216] Edit changelog and add 1.3.3.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 22d4e3840..599f1d0eb 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -3,6 +3,25 @@ SPRING BOOT FOR APACHE GEODE & PIVOTAL GEMFIRE CHANGELOG https://github.com/spring-projects/spring-boot-data-geode ========================================================= + +Changes in version 1.3.3.RELEASE (2020-08-20) +--------------------------------------------- +Upgrades SBDG to Spring Boot 2.3.3.RELEASE. Adds a Maven BOM to manage the SBDG module dependency versions collectively +and consistently. + +* Includes a new spring-geode-bom module creating a Maven BOM to manage the SBDG module dependency versions +in a collective and consistent way. +Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/93. +* Revises (Edits) the chapter on "Caching with Apache Geode & Pivotal GemFire". +* Upgrades to Spring Boot 2.3.3.RELEASE. +* Upgrades to Spring Data Neumann-SR3. +* Upgrades to Spring Data for Apache Geode & VMware/Pivotal GemFire 2.3.3.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware/Pivotal GemFire 0.0.18.RELEASE. +* Upgrades to Spring Build Conventions Gradle Plugin 0.0.34.RELEASE. +* Upgrades to Byte Buddy 1.10.14. +* Upgrades to Gradle 6.6. +* Upgrades to Mockito 3.5.0. + Changes in version 1.3.2.RELEASE (2020-08-07) --------------------------------------------- Upgrades SBDG to Spring Boot 2.3.2.RELEASE. Adds new Security Sample Guide and Code demonstrating how to configure From 8ca1d9ddcc033eec47e32d69417a09e1d93d3f91 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 16:01:39 -0700 Subject: [PATCH 039/216] Release 1.3.3.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e79ec6db7..4bfb19bda 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 -version=1.3.3.BUILD-SNAPSHOT +version=1.3.3.RELEASE From df089691d2719f5322b323a2168f27da1c1f5b58 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 16:22:37 -0700 Subject: [PATCH 040/216] Prepare next development iteration. Set Spring Boot version to 2.3.4.BUILD-SNAPSHOT. Set version to 1.3.4.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4bfb19bda..d601250f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.8.RELEASE -springBootVersion=2.3.3.RELEASE +springBootVersion=2.3.4.BUILD-SNAPSHOT springDataGemFireVersion=2.3.3.RELEASE springDataGeodeVersion=2.3.3.RELEASE springDataGeodeTestVersion=0.0.18.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 -version=1.3.3.RELEASE +version=1.3.4.BUILD-SNAPSHOT From 5ed0618998163458153043c596b81328cd808e0c Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 Aug 2020 16:38:11 -0700 Subject: [PATCH 041/216] Edit README to refer to 1.3.3.RELEASE and 1.3.4.BUILD-SNAPSHOT in the 1.3.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 501905182..e41213605 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.2.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.3.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.3.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.4.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From b0f79b5078fabb304b1b9d2d3f2e79b0586c1522 Mon Sep 17 00:00:00 2001 From: John Blum Date: Sat, 8 Aug 2020 15:32:10 -0700 Subject: [PATCH 042/216] Optimize imports. Remove unnecessary @SuppressWarnings(..) annotation declarations. --- .../org/springframework/geode/cache/RepositoryCacheLoader.java | 1 + .../org/springframework/geode/cache/RepositoryCacheWriter.java | 1 + .../cache/support/RepositoryCacheLoaderWriterSupport.java | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoader.java b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoader.java index ebd71bd27..0b78ba171 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoader.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoader.java @@ -21,6 +21,7 @@ import org.apache.geode.cache.CacheLoaderException; import org.apache.geode.cache.CacheRuntimeException; import org.apache.geode.cache.LoaderHelper; + import org.springframework.data.repository.CrudRepository; import org.springframework.geode.cache.support.RepositoryCacheLoaderWriterSupport; diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriter.java b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriter.java index fbc17a839..c45f4edf7 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriter.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriter.java @@ -22,6 +22,7 @@ import org.apache.geode.cache.CacheWriterException; import org.apache.geode.cache.EntryEvent; import org.apache.geode.cache.RegionEvent; + import org.springframework.data.repository.CrudRepository; import org.springframework.geode.cache.support.RepositoryCacheLoaderWriterSupport; import org.springframework.geode.core.util.function.FunctionUtils; diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java b/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java index a68b48896..73577487f 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java @@ -73,7 +73,7 @@ protected boolean isNukeAndPaveEnabled() { .orElse(Boolean.getBoolean(NUKE_AND_PAVE_PROPERTY)); } - @Override @SuppressWarnings("all") + @Override public void setEnvironment(@Nullable Environment environment) { this.environment = environment; } @@ -86,7 +86,6 @@ protected Optional getEnvironment() { return this.repository; } - @SuppressWarnings("all") protected R doRepositoryOp(S entity, Function repositoryOperation) { try { From ffac909358f39c403c9042b95f354a9fe6efcb35 Mon Sep 17 00:00:00 2001 From: John Blum Date: Sat, 15 Aug 2020 18:28:11 -0700 Subject: [PATCH 043/216] Annotate newRepositoryCacheLoader() with @SuppressWarnings('rawtypes'). --- .../geode/cache/RepositoryCacheLoaderRegionConfigurer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoaderRegionConfigurer.java b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoaderRegionConfigurer.java index 30eb685d4..0981b3152 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoaderRegionConfigurer.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheLoaderRegionConfigurer.java @@ -169,6 +169,7 @@ public void configure(String beanName, PeerRegionFactoryBean bean) { * @see org.apache.geode.cache.CacheLoader * @see #getRepository() */ + @SuppressWarnings("rawtypes") protected RepositoryCacheLoader newRepositoryCacheLoader() { return new RepositoryCacheLoader<>(getRepository()); } From 01272aa6f3f02fbe230d9d0ff01df7c0e301cd36 Mon Sep 17 00:00:00 2001 From: John Blum Date: Sat, 15 Aug 2020 18:28:37 -0700 Subject: [PATCH 044/216] Annotate newRepositoryCacheWriter() with @SuppressWarnings('rawtypes'). --- .../geode/cache/RepositoryCacheWriterRegionConfigurer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriterRegionConfigurer.java b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriterRegionConfigurer.java index d8a8adc99..9ef725f7c 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriterRegionConfigurer.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/RepositoryCacheWriterRegionConfigurer.java @@ -165,6 +165,7 @@ public void configure(String beanName, PeerRegionFactoryBean bean) { * @see org.apache.geode.cache.CacheWriter * @see #getRepository() */ + @SuppressWarnings("rawtypes") protected RepositoryCacheWriter newRepositoryCacheWriter() { return new RepositoryCacheWriter<>(getRepository()); } From cf1bb933f58ac0a694f043230b04dfa750ff39bf Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 13:31:11 -0700 Subject: [PATCH 045/216] Fix compiler syntax errors in code snippets. --- .../src/docs/asciidoc/_includes/clientcache-applications.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc index c8aaea8a3..f8e47f66f 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc @@ -29,7 +29,7 @@ main application class: [source,java] ---- @SpringBootApplication -public SpringBootApacheGeodeClientCacheApplication { +public class SpringBootApacheGeodeClientCacheApplication { public static void main(String[] args) { SpringApplication.run(SpringBootApacheGeodeClientCacheApplication.class, args); @@ -68,7 +68,7 @@ For example, perhaps you want to perform some additional `ClientCache` initializ [source,java] ---- @SpringBootApplication -public SpringBootApacheGeodeClientCacheApplication { +public class SpringBootApacheGeodeClientCacheApplication { public static void main(String[] args) { SpringApplication.run(SpringBootApacheGeodeClientCacheApplication.class, args); From b32999ba4b1c01ae686ac79da902e51ffda8239f Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 14:05:53 -0700 Subject: [PATCH 046/216] Add documentation variable reference pointing at Apache Geode source code in GitHub. --- spring-geode-docs/spring-geode-docs.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-geode-docs/spring-geode-docs.gradle b/spring-geode-docs/spring-geode-docs.gradle index 903461b92..d9eaa8972 100644 --- a/spring-geode-docs/spring-geode-docs.gradle +++ b/spring-geode-docs/spring-geode-docs.gradle @@ -52,6 +52,7 @@ asciidoctorj { 'docinfodir@': ".", 'apache-geode-artifact-version' : "${apacheGeodeVersion}", 'apache-geode-doc-version' : "112", + 'apache-geode-src' : "https://github.com/apache/geode/blob/rel/v${apacheGeodeVersion}", 'pivotal-cloudcache-artifact-version' : "${pivotalCloudCacheVersion}", 'pivotal-cloudcache-doc-version' : "1-12", 'pivotal-gemfire-artifact-version' : "${pivotalGemFireVersion}", From 00f95f8f4040a3b384f5f59de1a65336df6f09da Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 14:22:38 -0700 Subject: [PATCH 047/216] Add WARNING about GemFire/Geode's JVM Shutdown Hook in the 'Using Data' chapter, 'Exporting Data' section when using the Cache Data Export functionality. --- .../src/docs/asciidoc/_includes/data.adoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/data.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/data.adoc index 23a4c6bb5..9fefad1fe 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/data.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/data.adoc @@ -1,6 +1,7 @@ [[geode-data-using]] == Using Data :geode-name: Apache Geode +:gemfire-name: VMware Tanzu GemFire One of the most important tasks during development is ensuring your Spring Boot application handles data correctly. In order to verify the accuracy, integrity and availability of your data, your application needs data to work with. @@ -345,6 +346,16 @@ not have an "id" field. This scenario can also occur when inter-operating with n domain objects differently, then serialize the objects using PDX storing them in Regions on the server that are then later consumed by your Spring Boot application. +WARNING: It may be necessary to set the `-Dgemfire.disableShutdownHook` JVM System property to `true` before your Spring +Boot application starts up when using Export. Unfortunately, this Java Runtime shutdown hook is registered and enabled +in {geode-name} & {gemfire-name} by default, which results in the cache and _Regions_ being closed before the SBDG +Export functionality can "export the data", thereby resulting in a `CacheClosedException`. SBDG +{github-url}/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/DataImportExportAutoConfiguration.java#L173-L183[makes a best effort] +to disable the GemFire/Geode shutdown hook when export is enabled, but it is at the mercy of the JVM `ClassLoader` since +GemFire/Geode's JVM shutdown hook +{apache-geode-src}/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java#L2185-L2223[registration] +is declared in a `static` initializer. + [[geode-data-using-import-export-api-extensions]] === Import/Export API Extensions From e034469ad72b6fb4f1500bc47589db5d831ce5ea Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 16:41:28 -0700 Subject: [PATCH 048/216] Add brief section on Multi-Site Caching referring to the Sample Guide and Code. --- .../src/docs/asciidoc/_includes/caching.adoc | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc index f17d3f5c6..da47a198c 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc @@ -53,9 +53,9 @@ Our application might consist of a financial loan service to process a person's @Service class FinancialLoanApplicationService { - @Cacheable("EligibilityDecisions", ...) + @Cacheable("EligibilityDecisions") EligibilityDecision processEligility(Person person, Timespan timespan) { - ... + // ... } } ---- @@ -92,8 +92,6 @@ The complete Spring Boot application looks like this: ---- package example.app; -import ...; - @SpringBootApplication @EnableCachingDefinedRegions class FinancialLoanApplication { @@ -131,10 +129,13 @@ Typically, when most users think of caching, they are thinking of _Look-Aside Ca pattern applied by _Spring's Cache Abstraction_. In a nutshell, _Near Caching_ keeps the data closer to where the data is used thereby improving on performance -due to lower latencies when data is needed (i.e. no network hops). +due to lower latencies when data is needed (i.e. no network hops). This also improves application throughput, +i.e. the amount of work completed in a given time frame. Within _Inline Caching_, developers have a choice between synchronous (_Read/Write-Through_) and asynchronous -(_Write-Behind_) configurations depending on the application use case and requirements. +(_Write-Behind_) configurations depending on the application use case and requirements. Synchronous, Read/Write-Through +_Inline Caching_ is necessary if consistency is a concern. Asynchronous, Write-Behind _Inline Caching_ is applicable +if throughput and low-latency are a priority. Within _Multi-Site Caching_, there are _Active-Passive_ and _Active-Active_ arrangements. More details on _Multi-Site Caching_ will be presented in a later release. @@ -231,7 +232,7 @@ in the Region that might have been changed by other clients accessing the same d [[geode-caching-provider-inline-caching]] ==== Inline Caching -The final pattern of caching we will discuss in this chapter is _Inline Caching_. +The next pattern of caching we will discuss in this chapter is _Inline Caching_. There are two different configurations of _Inline Caching_ that developers can apply to their Spring Boot applications when using this pattern of caching: Synchronous (_Read/Write-Through_) and Asynchronous (_Write-Behind_). @@ -346,8 +347,8 @@ class FinancialLoanApplicationServer { } @Bean - DataSource dataSource(..) { - ... + DataSource dataSource() { + // ... } } ---- @@ -370,9 +371,8 @@ class DecisionManagementSystemLoader implements CacheLoader entryEvent) { // Use the configured DataSource to delete (i.e. DELETE) the entry value from the backend data store } - - ... } ---- @@ -493,6 +491,18 @@ TIP: To see a similar implementation of _Inline Caching_ using a Database (In-Me look at this https://github.com/spring-projects/spring-boot-data-geode/blob/master/spring-geode/src/test/java/org/springframework/geode/cache/inline/database/InlineCachingWithDatabaseIntegrationTests.java[test class] from the SBDG test suite. A dedicated sample will be provided in a future release. +[[geode-caching-provider-multi-site-caching]] +==== Multi-Site Caching + +The final pattern of caching presented in this chapter is _Multi-Site Caching_. + +As described above, there are 2 configuration arrangements depending on your application usage patterns, requirements +and user demographic: _Active-Active_ & _Active-Passive_. + +_Multi-Site Caching_ along with _Active-Active_ and _Active-Passive_ configuration arrangements will be described +in more detail in the Sample link:guides/caching-multi-site.html[Guide]. Also, be sure to review the Sample +{github-samples-url}/caching/multi-site[Code]. + [[geode-caching-provider-advanced-configuration]] === Advanced Caching Configuration From c8f91193367a34f0d1bb5ff47b93fe183a06a06a Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 17:01:19 -0700 Subject: [PATCH 049/216] Rename 'VMware GemFire' to 'VMware Tanzu GemFire'. --- spring-geode-docs/src/docs/asciidoc/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 960bfb9b1..cf38895bc 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -25,7 +25,7 @@ John Blum :pivotal-cloudfoundry-version: 2-9 :pivotal-cloudfoundry-docs: https://docs.pivotal.io/platform/application-service/{pivotal-cloudfoundry-version} :pivotal-cloudfoundry-website: https://pivotal.io/platform -:pivotal-gemfire-name: VMware GemFire +:pivotal-gemfire-name: VMware Tanzu GemFire :pivotal-gemfire-version: {pivotal-gemfire-doc-version} :pivotal-gemfire-docs: https://gemfire.docs.pivotal.io/{pivotal-gemfire-version}/geode/reference :pivotal-gemfire-javadoc: https://gemfire-{pivotal-gemfire-version}-javadocs.docs.pivotal.io/ From ea048170fe9ea63b0b486b2367e7252040ffc818 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 17:05:39 -0700 Subject: [PATCH 050/216] Cross-reference the reference documentation and sample guide for Spring Boot Actuator. --- .../src/docs/asciidoc/_includes/actuator.adoc | 43 +++++++-------- .../docs/asciidoc/guides/boot-actuator.adoc | 54 ++++++++++--------- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/actuator.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/actuator.adoc index 79e523c22..ff70089c9 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/actuator.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/actuator.adoc @@ -1,30 +1,33 @@ [[actuator]] == Spring Boot Actuator -Spring Boot for Apache Geode and Pivotal GemFire (SBDG) adds {spring-boot-docs-html}/production-ready.html[Spring Boot Actuator] -support and dedicated `HealthIndicators` for Apache Geode and Pivotal GemFire. Equally, the provided `HealthIndicators` -will even work with Pivotal Cloud Cache, which is backed by Pivotal GemFire, when pushing your Spring Boot applications -to Pivotal CloudFoundry (PCC). +Spring Boot for {apache-geode-name} and {pivotal-gemfire-name} (SBDG) adds {spring-boot-docs-html}/production-ready.html[Spring Boot Actuator] +support and dedicated `HealthIndicators` for {apache-geode-name} and {pivotal-gemfire-name}. Equally, the provided +`HealthIndicators` will even work with Pivotal Cloud Cache, which is backed by {pivotal-gemfire-name}, when pushing your +Spring Boot applications to Pivotal CloudFoundry (PCC). -Spring Boot `HealthIndicators` provide details about the runtime operation and behavior of your Apache Geode -or Pivotal GemFire based Spring Boot applications. For instance, by querying the right `HealthIndicator` endpoint, -you would be able to get the current hit/miss count for your `Region.get(key)` data access operations. +Spring Boot `HealthIndicators` provide details about the runtime operation and behavior of your {apache-geode-name} +based Spring Boot applications. For instance, by querying the right `HealthIndicator` endpoint, you would be able to +get the current hit/miss count for your `Region.get(key)` data access operations. -In addition to vital health information, SBDG provides basic, pre-runtime configuration meta-data about the Apache Geode -/ Pivotal GemFire components that are monitored by Spring Boot Actuator. This makes it easier to see how +In addition to vital health information, SBDG provides basic, pre-runtime configuration meta-data about the +{apache-geode-name} components that are monitored by Spring Boot Actuator. This makes it easier to see how the application was configured all in one place, rather than in properties files, Spring config, XML, etc. The provided Spring Boot `HealthIndicators` fall under one of three categories: -* Base `HealthIndicators` that apply to all Apache Geode/Pivotal GemFire, Spring Boot applications, regardless of -cache type, such as Regions, Indexes and DiskStores. +* Base `HealthIndicators` that apply to all {apache-geode-name}, Spring Boot applications, regardless of cache type, +such as Regions, Indexes and DiskStores. * Peer `Cache` based `HealthIndicators` that are only applicable to peer `Cache` applications, such as `AsyncEventQueues`, `CacheServers`, `GatewayReceivers` and `GatewaySenders`. * And finally, `ClientCache` based `HealthIndicators` that are only applicable to `ClientCache` applications, such as `ContinuousQueries` and connection `Pools`. The following sections give a brief overview of all the available Spring Boot `HealthIndicators` provided for -Apache Geode/Pivotal GemFire, out-of-the-box. +{apache-geode-name} out-of-the-box. + +TIP: Refer to the corresponding Sample link:guides/boot-actuator.html[Guide] and {github-samples-url}/boot/actuator[Code] +to see the Spring Boot Actuator for {apache-geode-name} in action! [[actuator-base-healthindicators]] === Base `HealthIndicators` @@ -32,10 +35,9 @@ Apache Geode/Pivotal GemFire, out-of-the-box. The following section covers Spring Boot `HealthIndicators` that apply to both peer `Cache` and `ClientCache`, Spring Boot applications. That is, these `HealthIndicators` are not specific to the cache type. -In both Apache Geode and Pivotal GemFire, the cache instance is either a peer `Cache` instance, which makes your -Spring Boot application part of a GemFire/Geode cluster, or more commonly, a `ClientCache` instance that talks to -an existing cluster. Your Spring Boot application can only be one cache type or the other and can only have a single -instance of that cache type. +In {apache-geode-name}, the cache instance is either a peer `Cache` instance, which makes your Spring Boot application +part of a GemFire/Geode cluster, or more commonly, a `ClientCache` instance that talks to an existing cluster. Your +Spring Boot application can only be one cache type or the other and can only have a single instance of that cache type. [[actuator-base-healthindicators-cache]] ==== GeodeCacheHealthIndicator @@ -403,7 +405,7 @@ The peer `Cache` based `HealthIndicators` provide additional details specificall applications. These `HealthIndicators` are only available when the Spring Boot application creates a peer `Cache` instance. -NOTE: The default cache instance created by Spring Boot for Apache Geode/Pivotal GemFire is a `ClientCache` instance. +NOTE: The default cache instance created by Spring Boot for {apache-geode-name} is a `ClientCache` instance. TIP: To control what type of cache instance is created, such as a "peer", then you can explicitly declare either the `@PeerCacheApplication`, or alternatively, the `@CacheServerApplication`, annotation on your `@SpringBootApplication` @@ -412,7 +414,7 @@ annotated class. [[actuator-peercache-healthindicators-cacheservers]] ==== GeodeCacheServersHealthIndicator -The `GeodeCacheServersHealthIndicator` provides details about the configured Apache Geode/Pivotal GemFire `CacheServers`. +The `GeodeCacheServersHealthIndicator` provides details about the configured {apache-geode-name} `CacheServers`. `CacheServer` instances are required to enable clients to connect to the servers in the cluster. This `HealthIndicator` captures basic configuration meta-data and runtime behavior/characteristics of @@ -510,7 +512,7 @@ or serial. ==== GeodeGatewayReceiversHealthIndicator The `GeodeGatewayReceiversHealthIndicator` provide details about the configured (WAN) `GatewayReceivers`, which are -capable of receiving events from remote clusters when using Apache Geode/Pivotal GemFire's +capable of receiving events from remote clusters when using {apache-geode-name}'s {apache-geode-docs}/topologies_and_comm/multi_site_configuration/chapter_overview.html[multi-site, WAN topology]. This `HealthIndicator` captures configuration meta-data along with the running state for each `GatewayReceiver`: @@ -543,7 +545,7 @@ GatewayReceiver's port will be chosen. ==== GeodeGatewaySendersHealthIndicator The `GeodeGatewaySendersHealthIndicator` provides details about the configured `GatewaySenders`. `GatewaySenders` are -attached to Regions in order to send Region events to remote clusters in Apache Geode/Pivotal GemFire's +attached to Regions in order to send Region events to remote clusters in {apache-geode-name}'s {apache-geode-docs}/topologies_and_comm/multi_site_configuration/chapter_overview.html[multi-site, WAN topology]. This `HealthIndicator` captures essential configuration meta-data and runtime characteristics for each `GatewaySender`: @@ -584,4 +586,3 @@ between this GatewaySender and its receiving GatewayReceiver. this sending GatewaySender and its receiving GatewayReceiver will block. |===================================================================================================================== - diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc index 91148af57..0bef985a2 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-actuator.adoc @@ -1,7 +1,9 @@ [[geode-samples-boot-actuator]] -= Spring Boot Actuator for Apache Geode & Pivotal GemFire -:apache-geode-version: {apache-geode-doc-version} -:apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} += Spring Boot Actuator for Apache Geode & VMware Tanzu GemFire +:geode-version: {apache-geode-doc-version} +:geode-name: Apache Geode +:geode-docs: https://geode.apache.org/docs/guide/{geode-version} +:gemfire-name: VMware Tanzu GemFire :images-dir: ./images :spring-boot-docs: https://docs.spring.io/spring-boot/docs/current/reference/html :spring-framework-docs: https://docs.spring.io/spring/docs/current/spring-framework-reference @@ -13,16 +15,19 @@ This guide walks through using {spring-boot-docs}/production-ready.html[Spring Boot Actuator] to assess the state -of your running Apache Geode or Pivotal GemFire, Spring Boot application. +of your running {geode-name} or {gemfire-name}, Spring Boot application. The goal for SBDG's Spring Boot Actuator integration is to enable users to effectively manage and monitor their -Spring Boot applications using Apache Geode or Pivotal GemFire in a production environment. +Spring Boot applications using {geode-name} or {gemfire-name} in a production environment. In particular, SBDG's integration with Spring Boot Actuator currently focuses on enabling {spring-boot-docs}/production-ready-endpoints.html#production-ready-health[Health Information] for your application. In the future, SBDG will provide dedicated support for https://micrometer.io/[Micrometer] metrics. -This guide assumes you are already familiar with Spring Boot and Apache Geode (or Pivotal GemFire). +This guide assumes you are already familiar with Spring Boot and {geode-name}. + +TIP: Refer to the link:../index.html#actuator[Spring Boot Actuator] chapter in the reference documentation +for more information. [#index-link] link:../index.html[Index] @@ -57,7 +62,7 @@ However in this case, we simply model the `TemperatureReading` as: include::{samples-dir}/boot/actuator/src/main/java/example/app/temp/model/TemperatureReading.java[tags=class] ---- -The `TemperatureReading` class is annotated with SDG's `@Region` mapping annotation to declare the Apache Geode Region +The `TemperatureReading` class is annotated with SDG's `@Region` mapping annotation to declare the {geode-name} Region in which `TemperatureReadings` will be persisted. [[geode-samples-boot-actuator-example-temperatureevent]] @@ -98,12 +103,11 @@ along with 2 `@Query` annotated query methods using raw OQL queries. [[geode-samples-boot-actuator-example-temperaturemonitor]] === TemperatureMonitor service class -To receive temperature change events, we need a class to monitor changes. This capability is built on Apache Geode's -{apache-geode-docs}/developing/continuous_querying/chapter_overview.html[Continuous Query (CQ)] functionality. +To receive temperature change events, we need a class to monitor changes. This capability is built on {geode-name}'s +{geode-docs}/developing/continuous_querying/chapter_overview.html[Continuous Query (CQ)] functionality. -With Apache Geode (or Pivotal GemFire) you can register an (OQL) Query with the servers in the cluster that runs -continuously, sending notifications back to the client anytime data changes to match the predicate in our query, -or queries. +With {geode-name} you can register an (OQL) Query with the servers in the cluster that runs continuously, sending +notifications back to the client anytime data changes to match the predicate in our query, or queries. For our purposes, we will simply monitor the temperature anytime it rises above boiling (212 °F) or drops below freezing (32 °F): @@ -154,7 +158,7 @@ data access operations. Now, we need a couple of main application classes to actually have the application do something useful. -We start with an Spring Boot, Apache Geode Server application functioning as the temperature sensor (device) +We start with an Spring Boot, {geode-name} Server application functioning as the temperature sensor (device) using the `TemperatureSensor` class: .BootGeodeServerApplication main class @@ -166,26 +170,26 @@ include::{samples-dir}/boot/actuator/src/main/java/example/app/temp/geode/server This class is annotated with `@SpringBootApplication` making it a proper Spring Boot application. It uses Spring Boot's `SpringApplicationBuilder` to configure and bootstrap the server application. -This class is also annotated with SDG's `@CacheServerApplication` making it a proper Apache Geode Server with a peer +This class is also annotated with SDG's `@CacheServerApplication` making it a proper {geode-name} Server with a peer `Cache` instance along with a `CacheServer` to accept client connections. This effectively overrides SBDG's default `ClientCache` instance. -Additionally, the class enables several other features, such as Spring's _Scheduling Service_, Apache Geode Statistics, +Additionally, the class enables several other features, such as Spring's _Scheduling Service_, {geode-name} Statistics, and entity-defined Regions making the creation of our server-side, partitioned "TemperatureReadings" Region simple. -By enabling Apache Geode statistics, we allow Spring Boot's Actuator, `HealthIndicators` to collect metrics about -our running Apache Geode Server as well. +By enabling {geode-name} statistics, we allow Spring Boot's Actuator, `HealthIndicators` to collect metrics about +our running {geode-name} Server as well. Because we have enabled scheduling (with `@EnableScheduling`) and declared the `TemperatureSensor` class as a bean in the Spring application context, the application will immediately start generating temperature readings, which are recorded to the "TemperatureReadings" Region. -Finally, our class registers a couple Apache Geode Region Indexes to make the Actuator `HealthIndicator` information +Finally, our class registers a couple {geode-name} Region Indexes to make the Actuator `HealthIndicator` information more interesting, particularly since we are running continuous queries. This is a Servlet-based application as well since our Actuator, `HealthIndicator` endpoints are exposed via HTTP. -TIP: There are multiple ways to configure and bootstrap an Apache Geode Server, and the server-side of our application. +TIP: There are multiple ways to configure and bootstrap an {geode-name} Server, and the server-side of our application. Using Spring Boot is one of the easier ways. [[geode-samples-boot-actuator-example-client]] @@ -234,7 +238,7 @@ The `gradlew` command and `runServer` Gradle Task sets the configuration (e.g. S command is ran in the directory where you cloned the `spring-boot-data-geode` project (**not** in `spring-boot-data-geode/spring-geode-samples/boot/actuator/`). -If you wish to adjust the log levels of Apache Geode or Spring Boot while running the client and server applications, +If you wish to adjust the log levels of {geode-name} or Spring Boot while running the client and server applications, then you can set the log levels of the individual Loggers (i.e. `org.apache` and `org.springframework`) in `src/main/resources/logback.xml`: @@ -324,7 +328,7 @@ Both the server and client will continue to run, generating and logging temperat After the application has been running for some time, we can inspect the Spring Boot Actuator, HealthIndicator Endpoints provided by SBDG to monitor our application's health and runtime performance in addition to basic configuration -meta-data used to configure Apache Geode at runtime. +meta-data used to configure {geode-name} at runtime. [[geode-samples-boot-actuator-example-monitor-client]] === Client Health Information @@ -383,7 +387,7 @@ All of this was made possible by including the following dependency on our appli org.springframework.geode spring-geode-starter-actuator - ---- Additionally, in Spring Boot `application.properties`, you must enable the following: @@ -397,11 +401,11 @@ management.endpoint.health.show-details=always [[geode-samples-boot-actuator-conclusion]] == Conclusion -Hopefully this guide has shown you how to use the Spring Boot Actuator feature for Apache Geode and Pivotal GemFire. +Hopefully this guide has shown you how to use the Spring Boot Actuator feature for {geode-name} and {gemfire-name}. You are encouraged to read more about {spring-boot-docs}/production-ready.html[Spring Boot's Actuator] functionality. -Additonally, you can find out more about Apache Geode Statistics -in the {apache-geode-docs}/managing/statistics/chapter_overview.html[User Guide]. +Additionally, you can find out more about {geode-name} Statistics +in the {geode-docs}/managing/statistics/chapter_overview.html[User Guide]. link:../index.html#geode-samples[Back to Samples] From 912e7aa2ed399c18bc0a067ca095e0cb809c225e Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 17:29:14 -0700 Subject: [PATCH 051/216] Cross-reference the reference documentation and sample guide for Spring Boot Auto-configuration. --- .../_includes/configuration-auto.adoc | 116 ++++++++++-------- .../asciidoc/guides/boot-configuration.adoc | 79 ++++++------ 2 files changed, 107 insertions(+), 88 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-auto.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-auto.adoc index 87444a3cf..56abe3926 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-auto.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-auto.adoc @@ -1,9 +1,9 @@ [[geode-configuration-auto]] == Auto-configuration -The following Spring Framework, Spring Data for Apache Geode & Pivotal GemFire (SDG) and Spring Session for Apache Geode -& Pivotal GemFire (SSDG) _Annotations_ are implicitly declared by Spring Boot for Apache Geode & Pivotal GemFire's -(SBDG) _Auto-configuration_. +The following Spring Framework, Spring Data for {apache-geode-name} & {pivotal-gemfire-name} (SDG) and Spring Session +for {apache-geode-name} and {pivotal-gemfire-name} (SSDG) _Annotations_ are implicitly declared by Spring Boot for +{apache-geode-name} & {pivotal-gemfire-name}'s (SBDG) _Auto-configuration_. * `@ClientCacheApplication` * `@EnableGemfireCaching` (or alternatively, Spring Framework's `@EnableCaching`) @@ -21,13 +21,17 @@ NOTE: This means you DO NOT need to explicitly declare any of these _Annotations since they are provided by SBDG already. The only reason you would explicitly declare any of these _Annotations_ is if you wanted to "_override_" Spring Boot's, and in particular, SBDG's _Auto-configuration_. Otherwise, it is unnecessary! -TIP: You should read the chapter in Spring Boot's Reference Guide on +TIP: You should read the chapter in Spring Boot's Reference Documentation on {spring-boot-docs-html}/#using-boot-auto-configuration[Auto-configuration]. -TIP: You should review the chapter in Spring Data for Apache Geode and Pivotal GemFire's (SDG) Reference Guide on -{spring-data-geode-docs-html}/#bootstrap-annotation-config[Annotation-based Configuration]. For a quick reference, +TIP: You should review the chapter in Spring Data for {apache-geode-name} and {pivotal-gemfire-name}'s (SDG) Reference Documentation +on {spring-data-geode-docs-html}/#bootstrap-annotation-config[Annotation-based Configuration]. For a quick reference, or an overview of Annotation-based Configuration, see {spring-data-geode-docs-html}/#bootstap-annotations-quickstart[here]. +TIP: Refer to the corresponding Sample link:guides/boot-configuration.html[Guide] and {github-samples-url}/boot/configuration[Code] +to see Spring Boot Auto-configuration for {apache-geode-name} in action! + + [[geode-configuration-auto-customizing]] === Customizing Auto-configuration @@ -49,7 +53,9 @@ For example, to set the (client or peer) member's name, you can use the `@UseMem ---- @SpringBootApplication @UseMemberName("MyMemberName") -class SpringBootClientCacheApplication { ... } +class SpringBootClientCacheApplication { + ///... +} ---- Alternatively, you could set the `spring.application.name` or the `spring.data.gemfire.name` property in Spring Boot @@ -104,7 +110,9 @@ then you can declare your intent in the `@SpringBootApplication` annotation, lik @SpringBootApplication( exclude = { DataSourceAutoConfiguration.class, PdxAutoConfiguration.class } ) -class SpringBootClientCacheApplication { ... } +class SpringBootClientCacheApplication { + // ... +} ---- WARNING: Make sure you understand what you are doing when you are "disabling" _Auto-configuration_. @@ -117,15 +125,17 @@ Overriding SBDG _Auto-configuration_ was <> with the opinion that application developers will primarily be building Apache Geode -or Pivotal GemFire <> using Spring Boot. +SBDG <> with the opinion that application developers will primarily be building {apache-geode-name} +<> using Spring Boot. -Technically, this means building Spring Boot applications with either an Apache Geode or Pivotal GemFire `ClientCache` -instance connected to a dedicated cluster of Apache Geode or Pivotal GemFire servers that manage the data as part of a +Technically, this means building Spring Boot applications with an {apache-geode-name} `ClientCache` instance connected +to a dedicated cluster of {apache-geode-name} servers that manage the data as part of a {apache-geode-docs}/topologies_and_comm/cs_configuration/chapter_overview.html[client/server] topology. By way of example, this means you *do not* need to explicitly declare and annotate your `@SpringBootApplication` class @@ -182,7 +194,9 @@ with SDG's `@ClientCacheApplication` annotation, like so: ---- @SpringBootApplication @ClientCacheApplication -class SpringBootClientCacheApplication { ... } +class SpringBootClientCacheApplication { + // ... +} ---- This is because SBDG's provided _Auto-configuration_ class is already meta-annotated with SDG's @@ -192,10 +206,12 @@ This is because SBDG's provided _Auto-configuration_ class is already meta-annot [source,java] ---- @SpringBootApplication -class SpringBootClientCacheApplication { ... } +class SpringBootClientCacheApplication { + // ... +} ---- -TIP: Refer to SDG's Referene Guide for more details on Apache Geode or Pivotal GemFire +TIP: Refer to SDG's Reference Documentation for more details on {apache-geode-name} {spring-data-geode-docs-html}/#bootstrap-annotation-config-geode-applications[cache applications], and {spring-data-geode-docs-html}/#bootstrap-annotation-config-client-server-applications[client/server applications] in particular. @@ -206,7 +222,7 @@ in particular. NOTE: The {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/CachingProviderAutoConfiguration.html[`CachingProviderAutoConfiguration`] class corresponds to the {spring-data-geode-javadoc}/org/springframework/data/gemfire/cache/config/EnableGemfireCaching.html[`@EnableGemfireCaching`] annotation. -If you simply used the core Spring Framework to configure either Apache Geode or Pivotal GemFire as a _caching provider_ +If you simply used the core Spring Framework to configure {apache-geode-name} as a _caching provider_ in {spring-framework-docs}/integration.html#cache[Spring's Cache Abstraction], you would need to do this: .Configuring caching using the Spring Framework @@ -228,7 +244,7 @@ class CachingUsingApacheGeodeConfiguration { } ---- -If you were using Spring Data for Apache Geode's `@EnableGemfireCaching` annotation, then the above configuration +If you were using Spring Data for {apache-geode-name}'s `@EnableGemfireCaching` annotation, then the above configuration could be simplified to: .Configuring caching using Spring Data Geode @@ -263,7 +279,7 @@ class CustomerService { @Caching("CustomersByName") Customer findBy(String name) { - ... + // ... } } ---- @@ -278,20 +294,20 @@ corresponds to the {spring-data-geode-javadoc}/org/springframework/data/gemfire/ Without having to enable anything, you simply annotate your application (POJO) component method(s) with the SDG {spring-data-geode-javadoc}/org/springframework/data/gemfire/listener/annotation/ContinuousQuery.html[`@ContinuousQuery`] -annotation to register a CQ and start receiving events. The method acts as a `CqEvent` handler, or in Apache Geode and -Pivotal GemFire's case, the method would be an implementation of +annotation to register a CQ and start receiving events. The method acts as a `CqEvent` handler, or in {apache-geode-name}'s +case, the method would be an implementation of {apache-geode-javadoc}/org/apache/geode/cache/query/CqListener.html[`CqListener`]. .Declare application CQs [source,java] ---- @Component -class MyCustomerApplicationContinuousQueries +class MyCustomerApplicationContinuousQueries { @ContinuousQuery("SELECT customer.* FROM /Customers customers" + " WHERE customer.getSentiment().name().equalsIgnoreCase('UNHAPPY')") public void handleUnhappyCustomers(CqEvent event) { - ... + // ... } } ---- @@ -335,18 +351,18 @@ Then you can inject the Function execution into any application component and us package example.app.service; @Service -interface CustomerService { +class CustomerService { @Autowired private MyCustomerapplicationFunctions customerFunctions; - public void analyzeCustomerSentiment(Customer customer) { + void analyzeCustomerSentiment(Customer customer) { - ... + // ... this.customerFunctions.applyCredit(customer); - ... + // ... } } ---- @@ -400,9 +416,9 @@ class CustomerService { public void processCustomersWithSentiment(Sentiment sentiment) { - this.repository.findBySentimentEqualTo(sentiment).forEach(customer -> { ... }); + this.repository.findBySentimentEqualTo(sentiment).forEach(customer -> { /* ... */ }); - ... + // ... } } ---- @@ -421,13 +437,13 @@ NOTE: The {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoco corresponds to the {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html[`@EnableLogging`] annotation. Logging is an essential application concern to understand what is happening in the system along with when and where -the event occurred. As such, SBDG auto-configures logging for Apache Geode and Pivotal GemFire by default, using -the default log-level, "_config_". +the event occurred. As such, SBDG auto-configures logging for {apache-geode-name} by default, using the default +log-level, "_config_". If you wish to change an aspect of logging, such as the log-level, you would typically do this in Spring Boot `application.properties`: -.Change the log-level for Apache Geode +.Change the log-level for {apache-geode-name} [source,txt] ---- # Spring Boot application.properites. @@ -436,9 +452,9 @@ spring.data.gemfire.cache.log-level=debug ---- Other aspects may be configured as well, such as the log file size and disk space limits for the file system location -used to store the Apache Geode log files at runtime. +used to store the {apache-geode-name} log files at runtime. -Under-the-hood, Apache Geode's logging is based on Log4j. Therefore, you can configure Apache Geode logging using +Under-the-hood, {apache-geode-name}'s logging is based on Log4j. Therefore, you can configure {apache-geode-name} logging using any logging provider (e.g. Logback) and configuration metadata appropriate for that logging provider so long as you supply the necessary adapter between Log4j and whatever logging system you are using. For instance, if you include `org.springframework.boot:spring-boot-starter-logging` then you will be using Logback and you will need the @@ -459,7 +475,7 @@ or even possible in other cases (e.g. when you are using a 3rd party library for In these situations, you need to be able to send your object anywhere without unduly requiring the class type to be serializable as well as to exist on the classpath for every place it is sent. Indeed, the final destination -may not even be a Java application! This is where Apache Geode {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization] +may not even be a Java application! This is where {apache-geode-name} {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization] steps into help. However, you don't have to figure out how to configure PDX to identify the application class types that will need to be @@ -477,7 +493,7 @@ class Customer { @Indexed private String name; - ... + // ... } ---- @@ -493,8 +509,8 @@ and {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigur corresponds to the {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableSecurity.html[`@EnableSecurity`] annotation, but applies Security, and specifically, Authentication/Authorization configuration for both clients and servers. -Configuring your Spring Boot, Apache Geode `ClientCache` application to properly authenticate with a cluster of secure -Apache Geode or Pivotal GemFire servers is as simple as setting a _username_ and _password_ in Spring Boot +Configuring your Spring Boot, {apache-geode-name} `ClientCache` application to properly authenticate with a cluster of +secure{apache-geode-name} servers is as simple as setting a _username_ and _password_ in Spring Boot `application.properties`: .Supplying Authentication Credentials @@ -510,7 +526,7 @@ NOTE: Authentication is even easier to configure in a managed environment like P you don't have to do anything! Authorization is configured on the server-side and is made simple with SBDG and the help of https://shiro.apache.org/[Apache Shiro]. -Of course, this assumes you are using SBDG to configure and bootstrap your Apache Geode cluster in the first place, +Of course, this assumes you are using SBDG to configure and bootstrap your {apache-geode-name} cluster in the first place, which is <>, and made even easier with SBDG. TIP: Refer to the <> for more details. @@ -521,7 +537,7 @@ TIP: Refer to the <> for more details. NOTE: The {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/SslAutoConfiguration.html[`SslAutoConfiguration`] class corresponds to the {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableSsl.html[`@EnableSsl`] annotation. -Configuring SSL for secure transport (TLS) between your Spring Boot, Apache Geode `ClientCache` application +Configuring SSL for secure transport (TLS) between your Spring Boot, {apache-geode-name} `ClientCache` application and the cluster can be a real problematic task, especially to get correct from the start. So, it is something that SBDG makes simple to do out-of-the-box. @@ -539,8 +555,8 @@ TIP: Refer to the <> for more details. NOTE: The {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/SpringSessionAutoConfiguration.html[`SpringSessionAutoConfiguration`] class corresponds to the {spring-session-data-gemfire-javadoc}/org/springframework/session/data/gemfire/config/annotation/EnableSsl.html[`@EnableSsl`] annotation. -Configuring Apache Geode or Pivotal GemFire to serve as the (HTTP) Session state caching provider using Spring Session -is as simple as including the correct starter, e.g. `spring-geode-starter-session`. +Configuring {apache-geode-name} to serve as the (HTTP) Session state caching provider using Spring Session is as simple +as including the correct starter, e.g. `spring-geode-starter-session`. .Using Spring Session [source,xml] @@ -553,10 +569,10 @@ is as simple as including the correct starter, e.g. `spring-geode-starter-sessio ---- -With Spring Session, and specifically Spring Session for Apache Geode or Pivotal GemFire (SSDG), on the classpath of -your Spring Boot, Apache Geode `ClientCache` Web application, you can manage your (HTTP) Session state with either -Apache Geode or Pivotal GemFire. No further configuration is needed. SBDG _Auto-configuration_ detects Spring Session -on the application classpath and does the right thing. +With Spring Session, and specifically Spring Session for {apache-geode-name} (SSDG), on the classpath of your Spring +Boot, {apache-geode-name} `ClientCache` Web application, you can manage your (HTTP) Session state with {apache-geode-name}. +No further configuration is needed. SBDG _Auto-configuration_ detects Spring Session on the application classpath +and does the right thing. TIP: Refer to the <> for more details. @@ -565,7 +581,7 @@ TIP: Refer to the <> for more details. The SBDG {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/RegionTemplateAutoConfiguration.html[`RegionTemplateAutoConfiguration`] class has no corresponding SDG _Annotation_. However, the _Auto-configuration_ of a `GemfireTemplate` for every single -Apache Geode `Region` defined and declared in your Spring Boot application is supplied by SBDG never-the-less. +{apache-geode-name} `Region` defined and declared in your Spring Boot application is supplied by SBDG never-the-less. For example, if you defined a Region using: diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc index b4d26d9f6..eb21117bd 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-configuration.adoc @@ -1,8 +1,9 @@ [[geode-samples-boot-configuration]] -= Spring Boot Auto-configuration for Apache Geode & Pivotal GemFire += Spring Boot Auto-configuration for Apache Geode & VMware Tanzu GemFire John Blum -:apache-geode-version: {apache-geode-doc-version} -:apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} +:geode-version: {apache-geode-doc-version} +:geode-docs: https://geode.apache.org/docs/guide/{geode-version} +:geode-name: Apache Geode :toc: left :toclevels: 2 :stylesdir: ../ @@ -10,10 +11,10 @@ John Blum :docinfodir: guides -This guide walks you through building a simple Customer Service, Spring Boot application using Apache Geode -to manage Customer interactions. You should already be familiar with Spring Boot and Apache Geode. +This guide walks you through building a simple Customer Service, Spring Boot application using {geode-name} +to manage Customer interactions. You should already be familiar with Spring Boot and {geode-name}. -By the end of this lesson, you should have a better understanding of what Spring Boot for Apache Geode's (SBDG) +By the end of this lesson, you should have a better understanding of what Spring Boot for {geode-name}'s (SBDG) _auto-configuration_ support actually does. This guide compliments the link:../index.html#geode-auto-configuration-annotations[Auto-configuration vs. Annotation-based configuration] @@ -21,11 +22,14 @@ chapter with concrete examples. Let's begin. -NOTE: This guide builds on the https://www.youtube.com/watch?v=OvY5wzCtOV0[_Simplifying Apache Geode with Spring Data_] +NOTE: This guide builds on the https://www.youtube.com/watch?v=OvY5wzCtOV0[_Simplifying {geode-name} with Spring Data_] presentation by John Blum during the 2017 SpringOne Platform conference. While this example as well as the example -presented in the talk both use Spring Boot, only this example is using Spring Boot for Apache Geode (SBDG). This guide +presented in the talk both use Spring Boot, only this example is using Spring Boot for {geode-name} (SBDG). This guide improves on the example from the presentation by using SBDG. +TIP: Refer to the link:../index.html#geode-configuration-auto[Auto-configuration] chapter in the reference documentation +for more information. + [#index-link] link:../index.html[Index] @@ -52,7 +56,7 @@ the details we care about. Lombok is useful for testing or prototyping purposes. optional and in most production applications, and I would not recommend it. Additionally, the `Customer` class is annotated with Spring Data Geode's (SDG) `@Region` annotation. `@Region` -is a mapping annotation declaring the Apache Geode cache `Region` in which `Customer` data will be persisted. +is a mapping annotation declaring the {geode-name} cache `Region` in which `Customer` data will be persisted. Finally, the `org.springframework.data.annotation.Id` annotation was used to designate the `Customer.id` field as the identifier for `Customer` objects. The identifier is the Key used in the Entry stored in the "Customers"`Region`. @@ -64,7 +68,7 @@ class with `@Region`, which we will cover below. === `CustomerRepository` interface -Next, we create a _Data Access Object_ (DAO) to persist `Customers` to Apache Geode. We create the DAO +Next, we create a _Data Access Object_ (DAO) to persist `Customers` to {geode-name}. We create the DAO using Spring Data's _Repository_ abstraction: .CustomerRepository inteface @@ -81,12 +85,12 @@ any query methods you may have explicitly defined on the interface in addition t the `CrudRepository` interface extension. In addition to the base `CrudRepository` operations, `CustomerRepository` has additionally defined a -`findByNameLike(:String):Customer` query method. The Apache Geode OQL query is derived from the method declaration. +`findByNameLike(:String):Customer` query method. The {geode-name} OQL query is derived from the method declaration. NOTE: Though it is beyond the scope of this document, Spring Data's _Repository_ infrastructure is capable of generating -data store specific queries (e.g. Apache Geode OQL) for _Repository_ interface query method declarations just by +data store specific queries (e.g. {geode-name} OQL) for _Repository_ interface query method declarations just by introspecting the method signature. The query methods must conform to specific conventions. Alternatively, users -may use `@Query` to annotate query methods to specify the raw query instead (i.e. OQL for Apache Geode, SQL for JDBC, +may use `@Query` to annotate query methods to specify the raw query instead (i.e. OQL for {geode-name}, SQL for JDBC, possibly HQL for JPA, and so on). === `CustomerServiceApplication` (Spring Boot main class) @@ -129,7 +133,7 @@ Simply execute it with `bootRun`: `$ gradlew :spring-geode-samples-boot-configuration:bootRun` -If you wish to adjust the log levels for either Apache Geode or Spring Boot while running the example, then you can set +If you wish to adjust the log levels for either {geode-name} or Spring Boot while running the example, then you can set the log level for the individual Loggers (i.e. `org.apache` or `org.springframework`) in `src/main/resources/logback.xml`: @@ -140,7 +144,7 @@ include::{samples-dir}/boot/configuration/src/main/resources/logback.xml[] ---- [[geode-samples-boot-configuration-autoconfig]] -== Auto-configuration for Apache Geode, Take One +== Auto-configuration for {geode-name}, Take One "_With great power comes great responsibility._" - Uncle Ben @@ -149,16 +153,16 @@ in this example. === Cache instance -First, in order to put anything into Apache Geode you need a cache instance. A cache instance is also required to +First, in order to put anything into {geode-name} you need a cache instance. A cache instance is also required to create `Regions` which ultimately store the application's data (state). Again, a `Region` is just a Key/Value data structure, like `java.util.Map`, mapping a Key to a Value, or an Object. A `Region` is actually much more than a simple `Map` since it is distributed. However, since `Region` implements `java.util.Map`, it can be treated as such. NOTE: A complete discussion of `Region` and it concepts are beyond the scope of this document. You may learn more -by reading Apache Geode's User Guide on {apache-geode-docs}/developing/region_options/chapter_overview.html[Regions]. +by reading {geode-name}'s User Guide on {geode-docs}/developing/region_options/chapter_overview.html[Regions]. -SBDG is opinionated and assumes most Apache Geode applications will be client applications in Apache Geode's -{apache-geode-docs}/topologies_and_comm/cs_configuration/chapter_overview.html[client/server topology]. +SBDG is opinionated and assumes most {geode-name} applications will be client applications in {geode-name}'s +{geode-docs}/topologies_and_comm/cs_configuration/chapter_overview.html[client/server topology]. Therefore, SBDG auto-configures a `ClientCache` instance by default. The intrinsic `ClientCache` _auto-configuration_ provided by SBDG can be made apparent by disabling it: @@ -331,7 +335,7 @@ class CustomerServiceApplication { } ---- The `basePackageClasses` attribute is an alternative to `basePackages`, and a type-safe way to target the packages -(and subpackages) containing the entity classes that your application will persist to Apache Geode. You only need to +(and subpackages) containing the entity classes that your application will persist to {geode-name}. You only need to choose one class from each top-level package for where you want the scan to begin. Spring Data Geode uses this class to determine the package to begin the scan. 'basePackageClasses` accepts an array of `Class` types so you can specify multiple independent top-level packages. The annotation also includes the ability to filter types. @@ -398,15 +402,15 @@ there are no servers or cluster running yet. There are several ways in which to start a cluster. For example, you may use Spring to configure and bootstrap the cluster, which has been demonstrated link:../index.html#geode-cluster-configuration-bootstrapping[here]. -Although, for this example, we are going to use the tools provided with Apache Geode, or Pivotal GemFire, i.e. _Gfsh_ +Although, for this example, we are going to use the tools provided with {geode-name}, i.e. _Gfsh_ (GemFire/Geode Shell) for reasons that will become apparent later. NOTE: You need to https://geode.apache.org/releases/[download] and https://geode.apache.org/docs/guide/18/prereq_and_install.html[install] -a full distribution of Apache Geode to make use of the provided tools. After installation, you will need to set +a full distribution of {geode-name} to make use of the provided tools. After installation, you will need to set the `GEODE` (or `GEMFIRE`) environment variable to the location of your installation. Additionally, add `$GEODE/bin` to your system `$PATH`. -Once Apache Geode has been successfully installed, you can open a command prompt (terminal) and do: +Once {geode-name} has been successfully installed, you can open a command prompt (terminal) and do: .Running Gfsh [source,txt] @@ -479,7 +483,7 @@ NOTE: You will need to change the path to the `spring-boot-data-geode/samples/bo `run --file=...` _Gfsh_ command above based on where you git cloned the `spring-boot-data-geode` project to your computer. -Now, our simple cluster with an Apache Geode Locator and (Cache) Server is running. We can verify by listing +Now, our simple cluster with an {geode-name} Locator and (Cache) Server is running. We can verify by listing and describing the members: .List and Describe Members @@ -589,7 +593,7 @@ gfsh>create region --name=Customers --type=PARTITION But, what if you have hundreds of application domain objects each requiring a Region for persistence? It is not an unusual or unreasonable requirement in any practical enterprise scale application. -While it is not a "convention" in Spring Boot for Apache Geode (SBDG), Spring Data for Apache Geode (SDG) comes to +While it is not a "convention" in Spring Boot for {geode-name} (SBDG), Spring Data for {geode-name} (SDG) comes to our rescue. We simply only need to enable cluster configuration from the client: .Enable Cluster Configuration @@ -689,7 +693,7 @@ Jon Doe That was easy! [[geode-samples-boot-configuration-clientserver-autoconfig]] -== Auto-configuration for Apache Geode, Take Two +== Auto-configuration for {geode-name}, Take Two What may not be apparent in this example up to this point is how the data got from the client to the server. Certainly, our client did send `Jon Doe` to the server, but our `Customer` class is not `java.io.Serializable`. So, how was an @@ -724,16 +728,16 @@ Result : false So, how was the data sent then? How were we able to access the data stored in the server(s) on the cluster with the OQL query `SELECT customer.name FROM /Customers customer` as seen above? -Well, Apache Geode and Pivotal GemFire provide 2 proprietary serialization formats in addition to _Java Serialization_: -{apache-geode-docs}/developing/data_serialization/gemfire_data_serialization.html[Data Serialization] -and {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX], or _Portable Data Exchange_. +Well, {geode-name} provides 2 proprietary serialization formats in addition to _Java Serialization_: +{geode-docs}/developing/data_serialization/gemfire_data_serialization.html[Data Serialization] +and {geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX], or _Portable Data Exchange_. While _Data Serialization_ is more efficient, PDX is more flexible (i.e. "portable"). PDX enables data to be queried in serialized form and is the format used to support both Java and Native Clients (C++, C#) simultaneously. Therefore, PDX is auto-configured in Spring Boot Data Geode (SBDG) by default. This is convenient since you may not want to implement `java.io.Serializable` for all your application domain model -types that you store in Apache Geode. In other cases, you may not even have control over the types referred to by your +types that you store in {geode-name}. In other cases, you may not even have control over the types referred to by your application domain model types to make them `Serializable`, such as when using a 3rd party library. So, SBDG auto-configures PDX and uses Spring Data Geode's `MappingPdxSerializer` as the `PdxSerializer` to de/serialize @@ -872,14 +876,14 @@ see how SBDG helps us properly configure these concerns, easily and reliably. First, we must secure the cluster (i.e. the Locator and Server). -In a nutshell, when using the Apache Geode API (with no help from Spring), you must do the following: +In a nutshell, when using the {geode-name} API (with no help from Spring), you must do the following: 1. (Auth) Implement the `org.apache.geode.security.SecurityManager` interface. 2. (Auth) Configure your custom `SecurityManager` using the GemFire/Geode `security-manager` property in `gemfire.properties`. 3. (Auth) Either create a `gfsecurity.properties` file and set the `security-username` and `security-password` properties, or... 4. (Auth) Implement the `org.apache.geode.security.AuthInitialize` interface and set the `security-peer-auth-init` property -in `gemfire.properties` as described in {apache-geode-docs}/managing/security/implementing_authentication.html[Implementing Authentication] -of the Apache Geode User Guide. +in `gemfire.properties` as described in {geode-docs}/managing/security/implementing_authentication.html[Implementing Authentication] +of the {geode-name} User Guide. 5. (SSL) Then, you must create Java KeyStore (jks) files for both the keystore and truststore used to configure the SSL Socket. 6. (SSL) Configure the Java KeyStores using the GemFire/Geode `ssl-keystore` and `ssl-truststore` properties @@ -958,8 +962,8 @@ include::{samples-dir}/boot/configuration/src/main/resources/application-securit ---- The act of setting a username and password triggers the client Security _auto-configuration_ provided by SBDG. There are -many steps to configuring client Security in Apache Geode/Pivotal GemFire properly, as there was on the server. All you -need to worry about is supplying the credentials. Easy! +many steps to configuring client Security in {geode-name} properly, as there was on the server. All you need to +worry about is supplying the credentials. Easy! To include the `application-security.properties`, simply enable the Spring "security" profile in your run configuration when running the `CustomerServiceApplication` class: @@ -1144,11 +1148,10 @@ and application requirements grow. == Conclusion Hopefully this guide has now given you a better understanding of what the _auto-configuration_ support provided by -Spring Boot for Apache Geode/Pivotal GemFire (SBDG) is giving you when developing Apache Geode or Pivotal GemFire -applications with Spring. +Spring Boot for {geode-name} (SBDG) is giving you when developing {geode-name} applications with Spring. In this guide, we have seen that SBDG provides _auto-configuration_ support for the following -Spring Data for Apache Geode's (SDG) annotations: +Spring Data for {geode-name}'s (SDG) annotations: * `@ClientCacheApplication` * `@EnableGemfireRepositories` From 1908c6e59c4c7e8de1eaa76f631d9c872ee1b258 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 17:45:06 -0700 Subject: [PATCH 052/216] Cross-reference the reference documentation and sample guide for Spring Boot Security. --- .../src/docs/asciidoc/_includes/security.adoc | 91 ++++++++++--------- .../docs/asciidoc/guides/boot-security.adoc | 5 +- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/security.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/security.adoc index c841f2e5c..08b5b2ceb 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/security.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/security.adoc @@ -1,30 +1,33 @@ [[geode-security]] == Security -This sections covers Security configuration for Apache Geode & Pivotal GemFire, which includes both Authentication -& Authorization (collectively, Auth) as well as Transport Layer Security (TLS) using SSL. +This sections covers Security configuration for {apache-geode-name}, which includes both Authentication & Authorization +(collectively, Auth) as well as Transport Layer Security (TLS) using SSL. -NOTE: Securing Data at Rest is not generally supported by either Apache Geode, Pivotal GemFire +NOTE: Securing Data at Rest is not generally supported by either {apache-geode-name}, {pivotal-gemfire-name} or Pivotal Cloud Cache (PCC) yet. +TIP: Refer to the corresponding Sample link:guides/boot-security.html[Guide] and {github-samples-url}/boot/security[Code] +to see Spring Boot Security for {apache-geode-name} in action! + [[geode-security-auth]] === Authentication & Authorization -Apache Geode & Pivotal GemFire employs Username and Password based {apache-geode-docs}/managing/security/authentication_overview.html[Authentication] +{apache-geode-name} employs Username and Password based {apache-geode-docs}/managing/security/authentication_overview.html[Authentication] along with Role-based {apache-geode-docs}/managing/security/authorization_overview.html[Authorization] to secure your client to server data exchanges and operations. -Spring Data for Apache Geode & Pivotal GemFire (SDG) provides {spring-data-geode-docs-html}/#bootstrap-annotation-config-security[first-class support] -for Apache Geode & Pivotal GemFire's Security framework, which is based on the +Spring Data for {apache-geode-name} (SDG) provides {spring-data-geode-docs-html}/#bootstrap-annotation-config-security[first-class support] +for {apache-geode-name}'s Security framework, which is based on the {apache-geode-javadoc}/org/apache/geode/security/SecurityManager.html[SecurityManager] interface. -Additionally, Apache Geode's Security framework is integrated with https://shiro.apache.org/[Apache Shiro], +Additionally, {apache-geode-name}'s Security framework is integrated with https://shiro.apache.org/[Apache Shiro], making the security for servers an even easier and more familiar task. NOTE: Eventually, support and integration with https://spring.io/projects/spring-security[Spring Security] will be provided by SBDG as well. -When you use Spring Boot for Apache Geode & Pivotal GemFire (SBDG), which builds on the bits provided in Spring Data -for Apache Geode & Pivotal GemFire (SDG), it makes short work of enabling Auth in both your clients and servers. +When you use Spring Boot for {apache-geode-name} (SBDG), which builds on the bits provided in Spring Data +for {apache-geode-name} (SDG), it makes short work of enabling Auth in both your clients and servers. [[geode-security-auth-servers]] ==== Auth for Servers @@ -41,58 +44,58 @@ For example: class ApacheGeodeSecurityConfiguration { @Bean - DefaultLdapRealm ldapRealm(..) { + DefaultLdapRealm ldapRealm() { return new DefaultLdapRealm(); } - ... + // ... } ---- When an Apache Shiro Realm (e.g. `DefaultLdapRealm`) is declared and registered in the Spring `ApplicationContext` as a Spring bean, Spring Boot will automatically detect this `Realm` bean (or `Realm` beans if more than 1 is configured) -and the Apache Geode & Pivotal GemFire servers in the cluster will automatically be configured with -Authentication and Authorization enabled. +and the {apache-geode-name} servers in the cluster will automatically be configured with Authentication and Authorization +enabled. -Alternatively, you can provide an custom, application-specific implementation of Apache Geode & Pivotal GemFire's +Alternatively, you can provide an custom, application-specific implementation of {apache-geode-name}'s {apache-geode-javadoc}/org/apache/geode/security/SecurityManager.html[SecurityManager] interface, declared and registered as a bean in the Spring `ApplicationContext`: -.Declaring a custom Apache Geode or Pivotal GemFire `SecurityManager` +.Declaring a custom {apache-geode-name} `SecurityManager` [source,java] ---- @Configuration class ApacheGeodeSecurityConfiguration { @Bean - CustomSecurityManager customSecurityManager(..) { + CustomSecurityManager customSecurityManager() { return new CustomSecurityManager(); } - ... + // ... } ---- Spring Boot will discover your custom, application-specific `SecurityManager` implementation and configure -the servers in the Apache Geode or Pivotal GemFire cluster with Authentication and Authorization enabled. +the servers in the {apache-geode-name} cluster with Authentication and Authorization enabled. TIP: The Spring team recommends that you use Apache Shiro to manage the Authentication & Authorization of your -Apache Geode or Pivotal GemFire servers over implementing Apache Geode or Pivotal GemFire's `SecurityManager` interface. +{apache-geode-name} servers over implementing {apache-geode-name}'s `SecurityManager` interface. [[geode-security-auth-clients]] ==== Auth for Clients -When Apache Geode or Pivotal GemFire servers have been configured with Authentication & Authorization enabled, +When {apache-geode-name} servers have been configured with Authentication & Authorization enabled, then clients must authenticate when connecting. -Spring Boot for Apache Geode & Pivotal GemFire (SBDG) makes this easy, regardless of whether you are running -your Spring Boot, `ClientCache` applications in a local, non-managed environment or even when running in -a managed environment, like Pivotal CloudFoundry (PCF). +Spring Boot for {apache-geode-name} (SBDG) makes this easy, regardless of whether you are running your Spring Boot, +`ClientCache` applications in a local, non-managed environment or even when running in a managed environment, like +Pivotal CloudFoundry (PCF). [[geode-security-auth-clients-non-managed]] ===== Non-Managed Auth for Clients -To enable Auth for clients connecting to a secure Apache Geode or Pivotal GemFire cluster, you simply only need to set +To enable Auth for clients connecting to a secure {apache-geode-name} cluster, you simply only need to set a username and password in your Spring Boot `application.properties` file: [source,txt] @@ -103,7 +106,7 @@ spring.data.gemfire.security.username = jdoe spring.data.gemfire.security.password = p@55w0rd ---- -Spring Boot for Apache Geode & Pivotal GemFire (SBDG) will handle the rest. +Spring Boot for {apache-geode-name} (SBDG) will handle the rest. [[geode-secuirty-auth-clients-managed]] ===== Managed Auth for Clients @@ -114,10 +117,10 @@ is even easier. You do not need to do anything! When your Spring Boot application uses SBDG and is bound to PCC, then when you push (i.e. deploy) your app to PCF, -Spring Boot for Apache Geode & Pivotal GemFire (SBDG) will extract the required Auth credentials from the environment -that you setup when you provisioned a PCC service instance in your PCF organization & space. PCC automatically assigns -2 users with roles "_cluster_operator_" and "_developer_", respectively, to any Spring Boot application bound to the PCC -service instance. +Spring Boot for {apache-geode-name} (SBDG) will extract the required Auth credentials from the environment that you +setup when you provisioned a PCC service instance in your PCF organization & space. PCC automatically assigns 2 users +with roles "_cluster_operator_" and "_developer_", respectively, to any Spring Boot application bound to the PCC service +instance. By default, SBDG will auto-configure your Spring Boot app to run with the user having the "_cluster_operator" Role. This ensures that your Spring Boot app has the necessary permissions (i.e. Authorization) to perform all data access @@ -140,21 +143,21 @@ Securing data in motion is also essential to the integrity of your application. For instance, it would not do much good to send usernames and passwords over plain text Socket connections between your clients and servers, nor send sensitive data over those same connections. -Therefore, both Apache Geode & Pivotal GemFire support SSL between clients & servers, JMX clients (e.g. _Gfsh_) -and the _Manager_, HTTP clients when using the Developer REST API or _Pulse_, between peers in the cluster, -and when using the WAN Gateway to connect multiple sites (i.e. clusters). +Therefore, {apache-geode-name} supports SSL between clients & servers, JMX clients (e.g. _Gfsh_) and the _Manager_, +HTTP clients when using the Developer REST API or _Pulse_, between peers in the cluster, and when using the WAN Gateway +to connect multiple sites (i.e. clusters). -Spring Data for Apache Geode & Pivotal GemFire (SDG) provides +Spring Data for {apache-geode-name} (SDG) provides https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config-ssl[first-class support] for configuring and enabling SSL as well. Still, Spring Boot makes it even easier to configure and enable SSL, especially during development. -Apache Geode & Pivotal GemFire require certain properties to be configured, which translate to the appropriate +{apache-geode-name} requires certain properties to be configured, which translate to the appropriate `javax.net.ssl.*` properties required by the JRE, to create Secure Socket Connections using https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html[JSSE]. But, ensuring that you have set all the required SSL properties correctly is an error prone and tedious task. -Therefore, Spring Boot for Apache Geode & Pivotal GemFire (SBDG) applies some basic conventions for you, out-of-the-box. +Therefore, Spring Boot for {apache-geode-name} (SBDG) applies some basic conventions for you, out-of-the-box. Simply create a `trusted.keystore`, JKS-based `KeyStore` file and place it in 1 of 3 well-known locations: @@ -163,17 +166,17 @@ Simply create a `trusted.keystore`, JKS-based `KeyStore` file and place it in 1 3. In your user home directory (as defined by the `user.home` Java System property). When this file is named `trusted.keystore` and is placed in 1 of these 3 well-known locations, Spring Boot -for Apache Geode & Pivotal GemFire (SBDG) will automatically configure your client to use SSL Socket connections. +for {apache-geode-name} (SBDG) will automatically configure your client to use SSL Socket connections. -If you are using Spring Boot to configure and bootstrap an Apache Geode or Pivotal GemFire server: +If you are using Spring Boot to configure and bootstrap an {apache-geode-name} server: -.Spring Boot configured and bootstrapped Apache Geode or Pivotal GemFire server +.Spring Boot configured and bootstrapped {apache-geode-name} server [source,java] ---- @SpringBootApplication @CacheServerApplication class SpringBootApacheGeodeCacheServerApplication { - ... + // ... } ---- @@ -213,12 +216,12 @@ annotation for all the configuration attributes and the corresponding properties [[geode-security-encryption]] === Securing Data at Rest -Currently, neither Apache Geode nor Pivotal GemFire along with Spring Boot or Spring Data for Apache Geode -and Pivotal GemFire offer any support for securing your data while at rest (e.g. when your data has been overflowed -or persisted to disk). +Currently, neither {apache-geode-name} nor {pivotal-gemfire-name} along with Spring Boot or Spring Data for +{apache-geode-name} and {pivotal-gemfire-name} offer any support for securing your data while at rest (e.g. when your +data has been overflowed or persisted to disk). -To secure data at rest when using Apache Geode or Pivotal GemFire, with or without Spring, you must employ 3rd party -solutions like disk encryption, which is usually highly contextual and technology specific. +To secure data at rest when using {apache-geode-name}, with or without Spring, you must employ 3rd party solutions +like disk encryption, which is usually highly contextual and technology specific. For example, to secure data at rest using Amazon EC2, see https://aws.amazon.com/blogs/security/how-to-protect-data-at-rest-with-amazon-ec2-instance-store-encryption/[Instance Store Encryption]. diff --git a/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc b/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc index 036d05ea4..3c38c5425 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/boot-security.adoc @@ -1,5 +1,5 @@ [[geode-samples-boot-security]] -= Spring Boot Security for Apache Geode & VMware GemFire += Spring Boot Security for Apache Geode & VMware Tanzu GemFire Patrick Johnson, John Blum :gemfire-name: VMware Tanzu GemFire :geode-name: Apache Geode @@ -14,6 +14,9 @@ Patrick Johnson, John Blum This guide walks you through building a simple Spring Boot application enabled with Security, specifically Auth and TLS using SSL. You should already be familiar with Spring Boot and {geode-name}/{gemfire-name}. +TIP: Refer to the link:../index.html#geode-security[Security] chapter in the reference documentation +for more information. + [#index-link] link:../index.html[Index] From fc9e00a4d58e34cb273cbc367e6090e322fa0f49 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:01:35 -0700 Subject: [PATCH 053/216] Cross-reference the reference documentation and sample guide for Look-Aside Caching with Spring using Apache Geode. --- .../src/docs/asciidoc/_includes/caching.adoc | 15 +++++++++------ .../docs/asciidoc/guides/caching-look-aside.adoc | 4 ++++ spring-geode-docs/src/docs/asciidoc/index.adoc | 4 ++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc index da47a198c..6ef2bbe54 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc @@ -1,7 +1,7 @@ [[geode-caching-provider]] -== Caching using Apache Geode or VMware GemFire -:gemfire-name: VMware GemFire -:geode-name: Apache Geode +== Caching using Apache Geode or VMware Tanzu GemFire +:gemfire-name: {pivotal-gemfire-name} +:geode-name: {apache-geode-name} One of the quickest, easiest and least invasive ways to get started using {geode-name} or {gemfire-name} in your Spring Boot applications is to use either {geode-name} or {gemfire-name} as a @@ -18,7 +18,7 @@ TIP: Make sure you thoroughly understand the {spring-framework-docs}/integration behind Spring's Cache Abstraction before you continue. TIP: You can also refer to the relevant section on {spring-boot-docs-html}/#boot-features-caching[Caching] -in _Spring Boot's Reference Guide_. _Spring Boot_ even provides _auto-configuration_ support for a few, +in _Spring Boot's Reference Documentation_. _Spring Boot_ even provides _auto-configuration_ support for a few, simple {spring-boot-docs-html}/#_supported_cache_providers[caching providers] out-of-the-box. Indeed, _caching_ can be a very effective _software design pattern_ to avoid the cost of invoking @@ -112,7 +112,7 @@ NOTE: Spring Boot for {geode-name}/{gemfire-name} does not recognize nor apply t Instead, you should use SDG's `@EnableCachingDefinedRegions` on an appropriate Spring Boot application `@Configuration` class. -[[geode-caching-provider-look-aside-near-inline]] +[[geode-caching-provider-look-aside-near-inline-multi-site]] === Look-Aside Caching, Near Caching, Inline Caching and Multi-Site Caching Four different types of caching patterns can be applied with Spring when using Apace Geode or {gemfire-name} @@ -143,6 +143,9 @@ Caching_ will be presented in a later release. [[geode-caching-provider-look-aside-caching]] ==== Look-Aside Caching +TIP: Refer to the corresponding Sample link:guides/caching-look-aside.html[Guide] and {github-samples-url}/caching/look-aside[Code] +to see _Look-Aside Caching_ using {apache-geode-name} in action! + The caching pattern demonstrated in the example above is a form of https://content.pivotal.io/blog/an-introduction-to-look-aside-vs-inline-caching-patterns[_Look-Aside Caching_]. @@ -285,7 +288,7 @@ class CustomerService { Customer customer = customerRepository.findByAccountNumber(account.getNumber()); - // post-processing locic here. + // post-processing logic here. return customer; } diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc index 3fe62685f..a6ba1d2ea 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc @@ -26,6 +26,10 @@ _Cache Abstraction_ or Apache Geode is required to utilize caching in your Sprin Let's begin. +TIP: Refer to the link:../index.html#geode-caching-provider-look-aside-caching[Look-Aside Caching] section +in the link:../index.html#geode-caching-provider[Caching with Apache Geode or VMware Tanzu GemFire] chapter +in the reference documentation for more information. + [#index-link] link:../index.html[Index] diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index cf38895bc..eb27cbaf6 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -256,3 +256,7 @@ include::{include-dir}/cloudfoundry.adoc[] include::{include-dir}/docker.adoc[] include::{include-dir}/samples.adoc[] include::{include-dir}/appendix.adoc[] + + + + From 273dfe778b836f24656ec1a79ad86e837afcecfd Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:09:01 -0700 Subject: [PATCH 054/216] Cross-reference the reference documentation and sample guide for Inline Caching with Spring using Apache Geode. --- spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc | 3 +++ .../src/docs/asciidoc/guides/caching-inline.adoc | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc index 6ef2bbe54..43e5e0740 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc @@ -235,6 +235,9 @@ in the Region that might have been changed by other clients accessing the same d [[geode-caching-provider-inline-caching]] ==== Inline Caching +TIP: Refer to the corresponding Sample link:guides/caching-inline.html[Guide] and {github-samples-url}/caching/inline[Code] +to see _Inline Caching_ using {apache-geode-name} in action! + The next pattern of caching we will discuss in this chapter is _Inline Caching_. There are two different configurations of _Inline Caching_ that developers can apply to their Spring Boot applications diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc index e47dc0ef0..3776326a0 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc @@ -30,6 +30,10 @@ guide. Therefore, it would be helpful to have read that guide before proceeding Let's begin. +TIP: Refer to the link:../index.html#geode-caching-provider-inline-caching[Inline Caching] section +in the link:../index.html#geode-caching-provider[Caching with Apache Geode or VMware Tanzu GemFire] chapter +in the reference documentation for more information. + [#index-link] link:../index.html[Index] @@ -218,7 +222,7 @@ all regions by simply supplying the following `Predicate`: .Predicate targeting all caches (Regions) [source,java] ---- -regionBeanName -> true; +Predicate predicate = () -> regionBeanName -> true; ---- In our case, we only want to target the Regions that have been used as "caches" as identified in the service methods From db40ebec626e6e079aa35d89c7efe8fb4a706129 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:13:44 -0700 Subject: [PATCH 055/216] Cross-reference the reference documentation and sample guide for Multi-Site Caching with Spring using Apache Geode. --- .../src/docs/asciidoc/guides/caching-multi-site.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc index ed1ba008e..674bdc7e4 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-multi-site.adoc @@ -34,6 +34,10 @@ on _Look-Aside Caching_ before continuing with this guide. Let's begin. +TIP: Refer to the link:../index.html#geode-caching-provider-multi-site-caching[Multi-Site Caching] section +in the link:../index.html#geode-caching-provider[Caching with Apache Geode or VMware Tanzu GemFire] chapter +in the reference documentation for more information. + [#index-link] link:../index.html[Index] From 3d3635c57360826c520393c05ca6b7527a945543 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:22:48 -0700 Subject: [PATCH 056/216] Cross-reference the reference documentation and sample guide for Near Caching with Spring using Apache Geode. --- .../src/docs/asciidoc/_includes/caching.adoc | 3 ++ .../docs/asciidoc/guides/caching-near.adoc | 37 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc index 43e5e0740..51301aca2 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/caching.adoc @@ -192,6 +192,9 @@ pull multiple bits of information to retrieve the Customer record, and so on, he [[geode-caching-provider-near-caching]] ==== Near Caching +TIP: Refer to the corresponding Sample link:guides/caching-near.html[Guide] and {github-samples-url}/caching/near[Code] +to see _Near Caching_ using {apache-geode-name} in action! + _Near Caching_ is another pattern of caching where the cache is collocated with the application. This is useful when the caching technology is configured using a client/server arrangement. diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc index 5a7248c2f..5a9ed4963 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc @@ -1,6 +1,7 @@ [[geode-samples-caching-near]] = Near Caching with Spring :apache-geode-version: {apache-geode-doc-version} +:apache-geode-name: Apache Geode :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :images-dir: ./images @@ -19,10 +20,10 @@ This guide walks you through building a simple Spring Boot application using {spring-framework-docs}/integration.html#cache[Spring's Cache Abstraction] -backed by Apache Geode as the caching provider for Near Caching. +backed by {apache-geode-name} as the caching provider for Near Caching. It is assumed that the reader is familiar with the Spring _programming model_. No prior knowledge of Spring's -_Cache Abstraction_ nor Apache Geode is required to utilize caching in your Spring Boot applications. +_Cache Abstraction_ nor {apache-geode-name} is required to utilize caching in your Spring Boot applications. Additionally, this Sample builds on the concepts introduced in both link:caching-look-aside.html[Look-Aside Caching] as well as link:caching-inline.html[Inline Caching] with Spring. It would be helpful to start by reading the guide on @@ -30,6 +31,10 @@ _Look-Aside Caching_ followed by the guide on _Inline Caching_, first, before co Let's begin. +TIP: Refer to the link:../index.html#geode-caching-provider-near-caching[Near Caching] section +in the link:../index.html#geode-caching-provider[Caching with Apache Geode or VMware Tanzu GemFire] chapter +in the reference documentation for more information. + [#index-link] link:../index.html[Index] @@ -120,9 +125,9 @@ the person's contact information, such as an email address and phone number. [[geode-samples-caching-near-example-server-side]] === Server-side Configuration -First, we will configure and bootstrap an Apache Geode, peer `CacheServer` node using Spring Boot: +First, we will configure and bootstrap an {apache-geode-name}, peer `CacheServer` node using Spring Boot: -.SpringBootApplication for an Apache Geode `CacheServer` +.SpringBootApplication for an {apache-geode-name} `CacheServer` [source,java] ---- include::{samples-dir}/caching/near/src/main/java/example/app/caching/near/server/BootGeodeNearCachingCacheServerApplication.java[tags=class] @@ -153,7 +158,7 @@ include::{samples-dir}/caching/near/src/main/java/example/app/caching/near/serve ---- And finally, we include a Spring `@Profile` to enable an embedded Locator and Manager, allowing us to connect to our -Spring Boot, Apache Geode `CacheServer` application using _Gfsh_ (Geode Shell). Enabling the embedded Locator +Spring Boot, {apache-geode-name} `CacheServer` application using _Gfsh_ (Geode Shell). Enabling the embedded Locator and Manager are not necessary when starting the server or to run our application, but can be useful when debugging. .Embedded Locator & Manager Configuration @@ -162,13 +167,13 @@ and Manager are not necessary when starting the server or to run our application include::{samples-dir}/caching/near/src/main/java/example/app/caching/near/server/BootGeodeNearCachingCacheServerApplication.java[tags=locator-manager] ---- -TIP: For more information on configurating and bootstrapping a small cluster of Apache Geode servers using Spring Boot, -see link:../index.html#geode-cluster-configuration-bootstrapping[Running an Apache Geode or Pivotal GemFire Cluster using Spring Boot]. +TIP: For more information on configurating and bootstrapping a small cluster of {apache-geode-name} servers using Spring Boot, +see link:../index.html#geode-cluster-configuration-bootstrapping[Running an {apache-geode-name} or Pivotal GemFire Cluster using Spring Boot]. [[geode-samples-caching-near-example-client-side]] === Client-side Configuration -Next, we will create and start 2 instances of our Spring Boot, Apache Geode `ClientCache` application, which will use +Next, we will create and start 2 instances of our Spring Boot, {apache-geode-name} `ClientCache` application, which will use the _Look-Aside Caching_ pattern enhanced with_Near Caching_. We start with the `@SpringBootApplication` main class: @@ -235,7 +240,7 @@ Durability can be useful for clients that need to receive events for data it mis order the events occurred. Of course, keep in mind that durable clients use up system resources on the server (e.g. memory). -TIP: To learn more about durable subscriptions, see the Apache Geode +TIP: To learn more about durable subscriptions, see the {apache-geode-name} {apache-geode-docs}/developing/events/implementing_durable_client_server_messaging.html[documentation] The `receiveValues` boolean parameter determines whether the client will receive both KEYS and VALUES when an event @@ -252,7 +257,7 @@ TIP: The `RegexInterest` constructor corresponds to {apache-geode-javadoc}/org/apache/geode/cache/Region.html#registerInterestRegex-java.lang.String-org.apache.geode.cache.InterestResultPolicy-boolean-boolean-[Region.registerInterestRegex(:String, :InterestResultPolicy, :boolean, :boolean)] There is one final bit of configuration on the client-side that we need, and that is to enable subscriptions. We do so -by setting the appropriate Spring Data for Apache Geode (SDG) property +by setting the appropriate Spring Data for {apache-geode-name} (SDG) property (e.g. `spring.data.gemfire.pool.subscriptions-enabled`) in `application.properties`, like so: .Common Client `application.properties` @@ -338,9 +343,9 @@ Now we are ready to run our example application and observe the effects of *_Nea [[geode-samples-caching-near-example-run-server]] === Run the Server -First, we must start our Spring Boot application that configures and bootstraps the Apache Geode `CacheServer`. +First, we must start our Spring Boot application that configures and bootstraps the {apache-geode-name} `CacheServer`. -TIP: If you want to connect to the server with _Gfsh_, you must have a distribution of Apache Geode installed on your +TIP: If you want to connect to the server with _Gfsh_, you must have a distribution of {apache-geode-name} installed on your system and you must enable the "_locator-manager_" profile. The "_locator-manager_" profile can be enabled using the `-Dspring.profiles.active=server,locator-manager` Java System property. Additionally, the `server` profile has been enabled as well. @@ -364,7 +369,7 @@ When running the `BootGeodeNearCachingCacheServerApplication` class, you should ... -// Then you should see a bunch of Apache Geode log output, ending with something like... +// Then you should see a bunch of {apache-geode-name} log output, ending with something like... ... @@ -376,7 +381,7 @@ When running the `BootGeodeNearCachingCacheServerApplication` class, you should NOTE: The Spring Boot Gradle plugin has been configured to run the `BootGeodeNearCachingClientCacheApplication` class, not the server. -Now that the server is running, if you installed Apache Geode on your system and set the `$PATH` to include `$GEODE/bin`, +Now that the server is running, if you installed {apache-geode-name} on your system and set the `$PATH` to include `$GEODE/bin`, then you can run _Gfsh_ and connect to the server: .Connect to the Server with Gfsh @@ -453,7 +458,7 @@ gfsh> [[geode-samples-caching-near-example-run-client-app]] === Run the Client Application -Now it is time to start 2 instances of the Spring Boot, Apache Geode `ClientCache` application hosting +Now it is time to start 2 instances of the Spring Boot, {apache-geode-name} `ClientCache` application hosting our _Yellow Pages_ service. NOTE: Make sure to enable the `client` generic profile in addition to 1 of the client-specific profiles, @@ -565,7 +570,7 @@ _Near Caching_. == Summary In this guide, we learned how to create a Spring Boot application using Spring's Cache Abstraction backed by -Apache Geode using the _Look-Aside Caching_ pattern in our application service methods. We further enhanced +{apache-geode-name} using the _Look-Aside Caching_ pattern in our application service methods. We further enhanced the caching ability of our application with *_Near Caching_*. With *_Near Caching_*, we have the added ability to further improve on the throughput and latency of our application From 7d9f792c3f99cb3fddaab7388f4b62779cb7cf6f Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:40:04 -0700 Subject: [PATCH 057/216] Cross-reference the reference documentation and sample guide for HTTP Session Caching with Spring Session using Apache Geode. --- .../src/docs/asciidoc/_includes/session.adoc | 97 ++++++++++--------- .../asciidoc/guides/caching-http-session.adoc | 28 +++--- 2 files changed, 66 insertions(+), 59 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/session.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/session.adoc index 58afca659..251c0c57f 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/session.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/session.adoc @@ -1,12 +1,12 @@ [[geode-session]] == Spring Session -This section covers auto-configuration of Spring Session using either Apache Geode or Pivotal GemFire to manage -(HTTP) Session state in a reliable (consistent), highly-available (replicated) and clustered manner. +This chapter covers auto-configuration of Spring Session using either {apache-geode-name} or {pivotal-gemfire-name} +to manage (HTTP) Session state in a reliable (consistent), highly-available (replicated) and clustered manner. {spring-session-website}[Spring Session] provides an API and several implementations for managing a user's session information. It has the ability to replace the `javax.servlet.http.HttpSession` in an application container neutral -way along with proving Session IDs in HTTP headers to work with RESTful APIs. +way along with providing Session IDs in HTTP headers to work with RESTful APIs. Furthermore, Spring Session provides the ability to keep the HttpSession alive even when working with WebSockets and reactive Spring WebFlux WebSessions. @@ -14,19 +14,20 @@ and reactive Spring WebFlux WebSessions. A full discussion of Spring Session is beyond the scope of this document, and the reader is encouraged to learn more by reading the {spring-session-docs}[docs] and reviewing the {spring-session-docs}/#samples[samples]. -Of course, Spring Boot for Apache Geode & Pivotal GemFire provides auto-configuration support to configure -either Apache Geode or Pivotal GemFire as the user's session information management provider and store when -{spring-session-data-gemfire-website}[Spring Session for Apache Geode or Pivotal GemFire] is on -your Spring Boot application's classpath. +Of course, Spring Boot for {apache-geode-name} provides auto-configuration support to configure {apache-geode-name} +as the user's session information management provider and store when {spring-session-data-gemfire-website}[Spring Session for {apache-geode-name}] +is on your Spring Boot application's classpath. -TIP: You can learn more about Spring Session for Apache Geode & Pivotal GemFire in -the {spring-session-data-gemfire-docs}[docs]. +TIP: You can learn more about Spring Session for {apache-geode-name} in the {spring-session-data-gemfire-docs}[docs]. + +TIP: Refer to the corresponding Sample link:guides/caching-http-session.html.html[Guide] and {github-samples-url}/caching/http-session[Code] +to see Spring Session for {apache-geode-name} in action! [[geode-session-configuration]] === Configuration -There is nothing special that you need to do in order to use either Apache Geode or Pivotal GemFire as a Spring Session -provider, managing the (HTTP) Session state of your Spring Boot application. +There is nothing special that you need to do in order to use {apache-geode-name} as a Spring Session provider, +managing the (HTTP) Session state of your Spring Boot application. Simply include the appropriate Spring Session dependency on your Spring Boot application's classpath, for example: @@ -55,9 +56,9 @@ Maven POM or Gradle build file: ---- -TIP: You may replace Apache Geode with Pivotal Cloud Cache or Pivotal GemFire by changing the artifact ID +TIP: You may replace {apache-geode-name} with Pivotal Cloud Cache or {pivotal-gemfire-name} by changing the artifact ID from `org.springframework.session:spring-session-data-geode` to `org.springframework.session:spring-session-data-gemfire`. -Alternatively, you may replace Apache Geode with Pivotal Cloud Cache (PCC) or Pivotal GemFire by changing the artifact +Alternatively, you may replace {apache-geode-name} with Pivotal Cloud Cache (PCC) or {pivotal-gemfire-name} by changing the artifact ID from `spring-geode-starter-session` to `spring-gemfire-starter-session`. The version number is the same. After declaring the required Spring Session dependency, then begin your Spring Boot application as you normally would: @@ -72,7 +73,7 @@ public class MySpringBootApplication { SpringApplication.run(MySpringBootApplication.class, args); } - ... + // ... } ---- @@ -87,24 +88,23 @@ as needed by your application: @Controller class MyApplicationController { - @GetRequest(...) + @GetRequest("...") public String processGet(HttpSession session) { // interact with HttpSession } } ---- -The `HttpSession` is replaced by a Spring managed `Session` that will be stored in either Apache Geode -or Pivotal GemFire, or even Pivotal Cloud Cache. +The `HttpSession` is replaced by a Spring managed `Session` that will be stored in {apache-geode-name}. [[geode-session-configuration-custom]] === Custom Configuration -By default, Spring Boot for Apache Geode & Pivotal GemFire (SBDG) applies reasonable and sensible defaults -when configuring Apache Geode or Pivotal GemFire as the provider in Spring Session. +By default, Spring Boot for {apache-geode-name} (SBDG) applies reasonable and sensible defaults when configuring +{apache-geode-name} as the provider in Spring Session. So, for instance, by default, SBDG set the session expiration timeout to 30 minutes. It also uses a -`ClientRegionShortcut.PROXY` as the client Region data management policy for the Apache Geode/Pivotal GemFire +`ClientRegionShortcut.PROXY` as the client Region data management policy for the {apache-geode-name} Region managing the (HTTP) Session state when the Spring Boot application is using a `ClientCache`, which it does by <>. @@ -113,17 +113,17 @@ However, what if the defaults are not sufficient for your application requiremen [[geode-session-configuration-custom-properties]] ==== Custom Configuration using Properties -Spring Session for Apache Geode/Pivotal GemFire publishes +Spring Session for {apache-geode-name} publishes {spring-session-data-gemfire-docs}/#httpsession-gemfire-configuration-properties[well-known configuration properties] -for each of the various Spring Session configuration options when using Apache Geode or Pivotal GemFire -as the (HTTP) Session state management provider. +for each of the various Spring Session configuration options when using {apache-geode-name} as the (HTTP) Session state +management provider. You may specify any of these properties in a Spring Boot `application.properties` file to adjust Spring Session's -configuration when using Apache Geode or Pivotal GemFire. +configuration when using {apache-geode-name}. -In addition to the properties provided in and by Spring Session for Apache Geode/Pivotal GemFire, -Spring Boot for Apache Geode/Pivotal GemFire also recognizes and respects the `spring.session.timeout` property -as well as the `server.servlet.session.timeout` property as discussed {spring-boot-docs-html}/boot-features-session.html[here]. +In addition to the properties provided in and by Spring Session for {apache-geode-name}, Spring Boot for {apache-geode-name} +also recognizes and respects the `spring.session.timeout` property as well as the `server.servlet.session.timeout` +property as discussed {spring-boot-docs-html}/boot-features-session.html[here]. TIP: `spring.session.data.gemfire.session.expiration.max-inactive-interval-seconds` takes precedence over `spring.session.timeout`, which takes precedence over `server.servlet.session.timeout`, when any combination @@ -132,13 +132,13 @@ of these properties have been simultaneously configured in the Spring `Environme [[geode-session-configuration-custom-configurer]] ==== Custom Configuration using a Configurer -Spring Session for Apache Geode/Pivotal GemFire also provides the +Spring Session for {apache-geode-name} also provides the {spring-session-data-gemfire-javadoc}/org/springframework/session/data/gemfire/config/annotation/web/http/support/SpringSessionGemFireConfigurer.html[`SpringSessionGemFireConfigurer`] callback interface, which can be declared in your Spring `ApplicationContext` to programmatically control -the configuration of Spring Session when using Apache Geode or Pivotal GemFire. +the configuration of Spring Session when using {apache-geode-name}. The `SpringSessionGemFireConfigurer`, when declared in the Spring `ApplicationContext`, takes precedence over any of the -Spring Session (for Apache Geode/Pivotal GemFire) configuration properties, and will effectively override them when both +Spring Session (for {apache-geode-name}) configuration properties, and will effectively override them when both are present. More information on using the `SpringSessionGemFireConfigurer` can be found in the @@ -147,11 +147,10 @@ More information on using the `SpringSessionGemFireConfigurer` can be found in t [[geode-session-disable]] === Disabling Session State Caching -There may be cases where you do not want your Spring Boot application to manage (HTTP) Session state using either -Apache Geode or Pivotal GemFire. In certain cases, you may be using another Spring Session provider, -such as Redis, to cache and manage your Spring Boot application's (HTTP) Session state, while, even in other cases, -you do not want to use Spring Session to manage your (HTTP) Session state at all. Rather, you prefer to use your -Web Server's (e.g. Tomcat) `HttpSession` state management. +There may be cases where you do not want your Spring Boot application to manage (HTTP) Session state using {apache-geode-name}. +In certain cases, you may be using another Spring Session provider, such as Redis, to cache and manage your Spring Boot +application's (HTTP) Session state, while, even in other cases, you do not want to use Spring Session to manage your +(HTTP) Session state at all. Rather, you prefer to use your Web Server's (e.g. Tomcat) `HttpSession` state management. Either way, you can specifically call out your Spring Session provider using the `spring.session.store-type` property in `application.properties`, as follows: @@ -180,23 +179,23 @@ spring.session.store-type=none Again, see Spring Boot {spring-boot-docs-html}/boot-features-session.html[docs] for more details. TIP: It is possible to include multiple providers on the classpath of your Spring Boot application. For instance, -you might be using Redis to cache your application's (HTTP) Session state while using either Apache Geode -or Pivotal GemFire as your application's persistent store (_System of Record_). +you might be using Redis to cache your application's (HTTP) Session state while using {apache-geode-name} as your +application's persistent store (_System of Record_). NOTE: Spring Boot does not properly recognize `spring.session.store-type=[gemfire|geode]` even though -Spring Boot for Apache Geode/Pivotal GemFire is setup to handle either of these property values +Spring Boot for {apache-geode-name} is setup to handle either of these property values (i.e. either "`gemfire`" or "`geode`"). [[geode-session-pcc]] === Using Spring Session with Pivotal Cloud Cache Whether you are using Spring Session in a Spring Boot `ClientCache` application connecting to an externally managed -cluster of Apache Geode or Pivotal GemFire servers, or connecting to a cluster of servers in a Pivotal Cloud Cache -instance managed by a Pivotal Platform environment, the setup is the same. +cluster of {apache-geode-name} servers, or connecting to a cluster of servers in a Pivotal Cloud Cache instance +managed by a Pivotal Platform environment, the setup is the same. -Spring Session for Apache Geode, Pivotal GemFire, and Pivotal Cloud Cache (PCC) expects there to exist a cache Region -in the cluster that will store and manage the (HTTP) Session state when your Spring Boot application is a `ClientCache` -application in a client/server topology. +Spring Session for {apache-geode-name}, {pivotal-gemfire-name}, and Pivotal Cloud Cache (PCC) expects there to exist +a cache Region in the cluster that will store and manage the (HTTP) Session state when your Spring Boot application +is a `ClientCache` application in a client/server topology. By default, the cache Region used to store and manage (HTTP) Session state is called "_ClusteredSpringSessions_". @@ -208,7 +207,9 @@ the `@EnableGemFireHttpSession` annotation on your main `@SpringBootApplication` ---- @SpringBootApplication @EnableGemFireHttpSession(regionName = "MySessions") -class MySpringBootSpringSessionApplication { ... } +class MySpringBootSpringSessionApplication { + // ... +} ---- Or alternatively, we recommend users to configure the cache Region name using the well-known and documented property @@ -262,7 +263,9 @@ for more details. ---- @SpringBootApplication @EnableClusterAware -class MySpringBootSpringSessionApplication { ... } +class MySpringBootSpringSessionApplication { + // ... +} ---- However, it is not currently possible to send Expiration Policy configuration metadata to the cluster yet. Therefore, @@ -278,5 +281,5 @@ gfsh> alter region --name=MySessions --entry-idle-time-expiration=1800 That is it! Now your Spring Boot `ClientCache` application using Spring Session in a client/server topology is configured to store -and manage user (HTTP) Session state in the cluster. This works for either standalone, externally managed Apache Geode -or Pivotal GemFire clusters, or when using PCC running in a Pivotal Platform environment. +and manage user (HTTP) Session state in the cluster. This works for either standalone, externally managed {apache-geode-name} +clusters, or when using PCC running in a Pivotal Platform environment. diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc index a0d207ebc..aa1ff73e3 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-http-session.adoc @@ -1,6 +1,7 @@ [[geode-samples-caching-http-session]] = HTTP Session State Caching with Spring :apache-geode-version: {apache-geode-doc-version} +:apache-geode-name: Apache Geode :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :apache-geode-website: https://geode.apache.org/ @@ -22,14 +23,17 @@ This guide walks you through building a simple Spring Boot application using {spring-session-website}[Spring Session] -backed by {apache-geode-website}[Apache Geode] to manage HTTP Session state. +backed by {apache-geode-website}[{apache-geode-name}] to manage HTTP Session state. It is assumed that the reader is familiar with the Spring _programming model_ as well as the _Java Servlet_ API. -No prior knowledge of Spring Session or Apache Geode is required to utilize HTTP Session State Caching in your +No prior knowledge of Spring Session or {apache-geode-name} is required to utilize HTTP Session State Caching in your Spring Boot applications. Let's begin. +TIP: Refer to the link:../index.html#geode-session[Spring Session] chapter in the reference documentation +for more information. + [#index-link] link:../index.html[Index] @@ -63,7 +67,7 @@ continuity and provide a consistent, uninterrupted experience, the HTTP Session One way to do this is to employ a data management solution in your application architecture that 1) makes the HTTP Session highly available and 2) makes the HTTP Session resilient to failures in the system architecture. -Apache Geode is ideal for managing HTTP Session state given that it can distribute data/state across a scaled-out, +{apache-geode-name} is ideal for managing HTTP Session state given that it can distribute data/state across a scaled-out, highly-available architecture by replicating data in a redundant and organized (partitioned) manner, thereby making the data resilient to network and hardware failures. @@ -94,8 +98,8 @@ image::{images-dir}/Spring-Session-Framework-Architecture.png[] Again, the `SessionRepository` interface is the central component of the framework enabling any backend data store to be adapted and serve as a provider for managing the HTTP Sessions. -This is effectively how https://github.com/spring-projects/spring-session-data-geode[Spring Session for Apache Geode -& Pivotal GemFire] works. +This is effectively how https://github.com/spring-projects/spring-session-data-geode[Spring Session for {apache-geode-name}] +works. [[geode-samples-caching-http-session-example]] == Example @@ -153,9 +157,9 @@ the application is switched to a client/server topology to the "_DEFAULT_" Pool. used to store HTTP Session state as "_Sessions_" (default name is "_ClusteredSpringSessions_"). TIP: In most production deployments, you will likely be using a client/server topology, where the HTTP Session is -managed by a cluster of Apache Geode or Pivotal GemFire servers so that the HTTP Session can be shared across multiple -instances of the Spring Boot, Web application. This would be especially true in a cloud environment when utilizing a -Microservices architecture. However, for example purposes, we tried to keep the sample as simple as possible. +managed by a cluster of {apache-geode-name} servers so that the HTTP Session can be shared across multiple instances +of the Spring Boot, Web application. This would be especially true in a cloud environment when utilizing a Microservices +architecture. However, for example purposes, we tried to keep the sample as simple as possible. NOTE: The default data management policy for the client cache (a.k.a. Region) used to manage HTTP Session state is a `PROXY`, which is the basis for the client/server topology. Therefore, the default configuration assumes you will be @@ -259,9 +263,9 @@ First, we must add Spring Session to the application's classpath. We do this si ---- The `spring-geode-starter-session` dependency adds Spring Session to the application's classpath at runtime -and positions Apache Geode as the provider used to manage the HTTP Session state. +and positions {apache-geode-name} as the provider used to manage the HTTP Session state. -With Apache Geode, we gain all the benefits of using a highly concurrent, highly distributed data management solution +With {apache-geode-name}, we gain all the benefits of using a highly concurrent, highly distributed data management solution that provides high availability (HA) and resiliency in a cloud environment. That's it! This is all we have to do to replace the Servlet's Container's HTTP Session management facilities with a @@ -277,7 +281,7 @@ Now we see that the implementing class for the `javax.servlet.http.HttpSession` Easy! Of course, the ability to scale-out and optimize the data management policies for HTTP Session management is very -provider-specific (e.g. Apache Geode) and highly dependent on the use case as well a application requirements, +provider-specific (e.g. {apache-geode-name}) and highly dependent on the use case as well a application requirements, therefore is beyond the scope of this guide. [[geode-samples-caching-http-session-summary]] @@ -286,7 +290,7 @@ therefore is beyond the scope of this guide. Spring Session is a powerful framework for managing your HTTP Session state. Not only does it allow you to plugin different backend data management providers (as of this writing): -* https://github.com/spring-projects/spring-session-data-geode#spring-session-for-apache-geode--pivotal-gemfire[_Apache Geode (or Pivotal GemFire)_] +* https://github.com/spring-projects/spring-session-data-geode#spring-session-for-apache-geode--pivotal-gemfire[_{apache-geode-name}_] * {spring-session-website}[_Hazelast_] * {spring-session-website}[_JDBC_] * https://spring.io/projects/spring-session-data-mongodb[_MongoDB_] From 6a0d4c009bba64cad148a45a89607ddd81a872fc Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:53:02 -0700 Subject: [PATCH 058/216] Add another numbered bullet point of Apache Geode's excessive use of static initializer blocks. --- .../src/docs/asciidoc/_includes/geode-api-ext.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index bed75ba67..e7ca9e399 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -31,7 +31,8 @@ https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle[_Open/Closed Princip https://en.wikipedia.org/wiki/SOLID[SOLID] principles. 11. Components (e.g. `Pool`) that are difficult to test properly: {geode-name} often incorrectly refers to implementation classes rather than interfaces leading to `ClassCastExceptions` and violation of the _Program to Interfaces_ principle. -12. Untimely shutdown and release of resources that run interference when writing _Integration Tests_. +12. Excessive use of `static` initializer blocks making {geode-name} difficult to test. +13. Untimely shutdown and release of resources that run interference when writing _Integration Tests_. This list goes on making {geode-name}'s APIs difficult and confusing to use at times, especially without prior knowledge or experience. Users very often get this wrong and it is the main reason why Spring's APIs for {geode-name} are so From 998d37d8ae6c8ba69af1d1e0089763d7f0c29e67 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 3 Sep 2020 18:56:11 -0700 Subject: [PATCH 059/216] Add Asciidoc TIP referring to the 'Getting Started' Sample Guide and Code. --- spring-geode-docs/src/docs/asciidoc/index.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index eb27cbaf6..51b3d0d29 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -151,6 +151,9 @@ As such, it would be pertinent to begin your Spring Boot education {spring-boot- Finally, we arrive at Spring Boot for {apache-geode-name} & {pivotal-gemfire-name} (SBDG). +TIP: Refer to the corresponding Sample link:guides/getting-started.html[Guide] and {github-samples-url}/intro/getting-started[Code] +to see Spring Boot for {apache-geode-name} in action! + [[maven-gradle]] == Using Spring Boot for {apache-geode-name} & {pivotal-gemfire-name} From 8fb0c2112b0edfb894d0fe02247407929a76a30a Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 17:48:57 -0700 Subject: [PATCH 060/216] Replace references to 'Pivotal GemFire' with 'VMware Tanzu GemFire'. Fix compiler syntax errors in code snippets. Introduce documentation variables where applicable. Format source code. Optimize imports. --- CONTRIBUTING.adoc | 4 +- README.adoc | 36 +-- build.gradle | 2 +- .../spring-gemfire-starter-actuator.gradle | 2 +- .../spring-gemfire-starter-logging.gradle | 2 +- .../spring-gemfire-starter-session.gradle | 2 +- .../spring-gemfire-starter-test.gradle | 2 +- .../spring-gemfire-starter.gradle | 2 +- ...GeodeHealthIndicatorAutoConfiguration.java | 2 +- ...BaseGeodeHealthIndicatorConfiguration.java | 2 +- ...ientCacheHealthIndicatorConfiguration.java | 2 +- ...PeerCacheHealthIndicatorConfiguration.java | 4 +- .../CacheNameAutoConfiguration.java | 4 +- .../GemFirePropertiesAutoConfiguration.java | 2 +- .../LoggingAutoConfiguration.java | 2 +- .../RegionTemplateAutoConfiguration.java | 4 +- .../SpringSessionAutoConfiguration.java | 2 +- ...ingSessionPropertiesAutoConfiguration.java | 4 +- .../configuration/GemFireProperties.java | 4 +- .../SpringSessionProperties.java | 6 +- .../support/CacheProperties.java | 9 +- .../support/CacheServerProperties.java | 7 +- .../support/ClientCacheProperties.java | 5 +- .../support/ClientSecurityProperties.java | 9 +- .../support/ClusterProperties.java | 7 +- .../support/DiskStoreProperties.java | 6 +- .../support/EntityProperties.java | 7 +- .../support/LocatorProperties.java | 8 +- .../support/LoggingProperties.java | 5 +- .../support/ManagementProperties.java | 6 +- .../support/ManagerProperties.java | 6 +- .../configuration/support/PdxProperties.java | 17 +- .../support/PeerCacheProperties.java | 7 +- .../support/PeerSecurityProperties.java | 9 +- .../configuration/support/PoolProperties.java | 6 +- .../support/SecurityProperties.java | 7 +- .../support/ServiceProperties.java | 5 +- .../configuration/support/SslProperties.java | 5 +- .../boot/autoconfigure/package-info.java | 2 +- .../EnableSubscriptionConfiguration.java | 4 +- ...itional-spring-configuration-metadata.json | 10 +- ...atureReadingsContinuousQueriesHandler.java | 2 +- ...AutoConfiguredCachingIntegrationTests.java | 4 +- ...allyConfiguredCachingIntegrationTests.java | 6 +- ...ePropertiesPrecedenceIntegrationTests.java | 8 +- ...iguredContinuousQueryIntegrationTests.java | 2 +- ...redFunctionExecutionsIntegrationTests.java | 2 +- .../function/executions/Calculator.java | 4 +- ...gingAutoConfigurationIntegrationTests.java | 4 +- ...onfiguredRepositoriesIntegrationTests.java | 3 +- .../repository/repo/CustomerRepository.java | 3 +- ...dCloudSecurityContextIntegrationTests.java | 4 +- ...HybridSecurityContextIntegrationTests.java | 3 +- ...dLocalSecurityContextIntegrationTests.java | 4 +- .../AutoConfiguredSslIntegrationTests.java | 2 +- ...figuredSessionCachingIntegrationTests.java | 7 +- ...figuredSessionCachingIntegrationTests.java | 4 +- ...figuredSessionCachingIntegrationTests.java | 2 +- ...pertiesSessionCachingIntegrationTests.java | 5 +- ...ationOfSessionCachingIntegrationTests.java | 5 +- ...application-gemfire-config-test.properties | 2 +- .../application-security-cloud.properties | 2 +- .../application-security-hybrid.properties | 2 +- ...plication-security-local-client.properties | 2 +- ...plication-security-local-server.properties | 2 +- .../application-security-multi.properties | 2 +- ...application-session-config-test.properties | 2 +- .../test/resources/application-ssl.properties | 2 +- spring-geode-docs/spring-geode-docs.gradle | 2 +- .../src/docs/asciidoc/_includes/appendix.adoc | 122 ++++---- .../_includes/clientcache-applications.adoc | 86 +++--- .../docs/asciidoc/_includes/cloudfoundry.adoc | 41 ++- .../_includes/configuration-annotations.adoc | 31 +- .../_includes/configuration-declarative.adoc | 88 +++--- .../_includes/configuration-externalized.adoc | 23 +- .../_includes/configuration-properties.adoc | 19 +- .../asciidoc/_includes/continuous-query.adoc | 26 +- .../_includes/data-serialization.adoc | 29 +- .../docs/asciidoc/_includes/functions.adoc | 19 +- .../_includes/gemfire-properties.adoc | 2 +- .../asciidoc/_includes/geode-api-ext.adoc | 2 +- .../src/docs/asciidoc/_includes/logging.adoc | 26 +- .../docs/asciidoc/_includes/repositories.adoc | 13 +- .../src/docs/asciidoc/_includes/samples.adoc | 11 +- .../docs/asciidoc/_includes/templates.adoc | 33 +-- .../docs/asciidoc/guides/caching-inline.adoc | 15 +- .../asciidoc/guides/caching-look-aside.adoc | 22 +- .../docs/asciidoc/guides/caching-near.adoc | 2 +- .../docs/asciidoc/guides/getting-started.adoc | 140 ++++----- .../src/docs/asciidoc/index-docinfo.xml | 2 +- .../src/docs/asciidoc/index.adoc | 7 +- ...ringBootApacheGeodeLocatorApplication.java | 2 +- .../resources/application-security.properties | 2 +- .../src/main/resources/application.properties | 2 +- .../cache/support/CacheWriterSupport.java | 2 +- .../RepositoryCacheLoaderWriterSupport.java | 2 +- .../ClusterAvailableConfiguration.java | 2 +- .../ClusterNotAvailableConfiguration.java | 2 +- .../config/annotation/EnableClusterAware.java | 5 +- .../annotation/EnableSecurityManager.java | 2 +- .../EnableSecurityManagerProxy.java | 2 +- .../annotation/GroupsConfiguration.java | 7 +- .../annotation/LocatorsConfiguration.java | 10 +- .../annotation/MemberNameConfiguration.java | 7 +- .../annotation/UseDistributedSystemId.java | 4 +- .../geode/config/annotation/UseGroups.java | 4 +- .../geode/config/annotation/UseLocators.java | 2 +- .../config/annotation/UseMemberName.java | 8 +- ...bleAnnotationConfigApplicationContext.java | 8 +- .../core/env/support/CloudCacheService.java | 16 +- ...onExecutionAutoConfigurationRegistrar.java | 4 +- .../support/SecurityManagerProxy.java | 8 +- .../support/SecurityManagerSupport.java | 7 +- spring-geode/src/main/resources/changelog.txt | 274 +++++++++--------- ...vailableConfigurationIntegrationTests.java | 14 +- ...vailableConfigurationIntegrationTests.java | 2 +- ...LocatorsConfigurationIntegrationTests.java | 2 +- 117 files changed, 712 insertions(+), 776 deletions(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index cdec9b29a..6e383b521 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,6 +1,6 @@ -= Contributing to Spring Boot for Apache Geode & Pivotal GemFire += Contributing to Spring Boot for Apache Geode & VMware Tanzu GemFire -Spring Boot for Apache Geode & Pivotal GemFire (SBDG) is released under the Apache 2.0 license. If you would like to +Spring Boot for Apache Geode & VMware Tanzu GemFire (SBDG) is released under the Apache 2.0 license. If you would like to contribute something, or simply want to hack on the code this document should help you get started. == Sign the Contributor License Agreement diff --git a/README.adoc b/README.adoc index e41213605..b5fbb2ab7 100644 --- a/README.adoc +++ b/README.adoc @@ -1,45 +1,45 @@ image:https://api.travis-ci.org/spring-projects/spring-boot-data-geode.svg?branch=master["Build Status", link="https://travis-ci.org/spring-projects/spring-boot-data-geode"] [[about]] -== Spring Boot for Apache Geode & Pivotal GemFire +== Spring Boot for Apache Geode & VMware Tanzu GemFire -_Spring Boot for Apache Geode & Pivotal GemFire_ extends https://projects.spring.io/spring-boot/[_Spring Boot_] with +_Spring Boot for Apache Geode & VMware Tanzu GemFire_ extends https://projects.spring.io/spring-boot/[_Spring Boot_] with _auto-configuration_ support as well as other _convention or configuration_ features to simplify the development -of _Spring_ applications using either https://geode.apache.org/[Apache Geode] or https://pivotal.io/pivotal-gemfire[Pivotal GemFire] +of _Spring_ applications using either https://geode.apache.org/[Apache Geode] or https://pivotal.io/pivotal-gemfire[VMware Tanzu GemFire] in a _Spring_ context. This project builds on both https://github.com/spring-projects/spring-data-geode[_Spring Data for Apache Geode_] -and https://projects.spring.io/spring-data-gemfire/[_Spring Data for Pivotal GemFire_] +and https://projects.spring.io/spring-data-gemfire/[_Spring Data for VMware Tanzu GemFire_] as well as https://spring.io/projects/spring-boot[Spring Boot]. [[project-goals]] === Project Goals This project adds _Spring Boot_ **auto-configuration** support for both https://geode.apache.org/[Apache Geode] -and https://pivotal.io/pivotal-gemfire[Pivotal GemFire]. +and https://pivotal.io/pivotal-gemfire[VMware Tanzu GemFire]. Among other things, this project builds on https://projects.spring.io/spring-boot/[_Spring Boot_] -as well as https://projects.spring.io/spring-data-gemfire/[_Spring Data for Apache Geode & Pivotal GemFire_] +as well as https://projects.spring.io/spring-data-gemfire/[_Spring Data for Apache Geode & VMware Tanzu GemFire_] and additionally offers... -1. _Auto-configures_ an _Apache Geode_ or _Pivotal GemFire_ (PCC) +1. _Auto-configures_ an _Apache Geode_ or _VMware Tanzu GemFire_ (PCC) https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html[ClientCache] -instance automatically when either _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_ +instance automatically when either _Spring Data for Apache Geode_ or _Spring Data for VMware Tanzu GemFire_ are on the application's CLASSPATH. -2. _Auto-configures_ either _Apache Geode_ or _Pivotal GemFire_ (PCC) as a _caching provider_ in +2. _Auto-configures_ either _Apache Geode_ or _VMware Tanzu GemFire_ (PCC) as a _caching provider_ in https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache[_Spring's Cache Abstraction_] -when either _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_ are on the application's CLASSPATH. +when either _Spring Data for Apache Geode_ or _Spring Data for VMware Tanzu GemFire_ are on the application's CLASSPATH. -3. _Auto-configures_ _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_ +3. _Auto-configures_ _Spring Data for Apache Geode_ or _Spring Data for VMware Tanzu GemFire_ https://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#gemfire-repositories[Repositories] -when _Spring Data for Apache Geode_ or _Spring Data for Pivotal GemFire_ are on the application's CLASSPATH +when _Spring Data for Apache Geode_ or _Spring Data for VMware Tanzu GemFire_ are on the application's CLASSPATH and _Spring Boot_ detects SDG _Repositories_ in your _Spring Boot_ application. -4. Provides additional support for _Spring Boot_/_Spring Data for Apache Geode_/_Pivotal GemFire_ applications +4. Provides additional support for _Spring Boot_/_Spring Data for Apache Geode_/_VMware Tanzu GemFire_ applications deployed to PCF using Pivotal Cloud Cache (PCC). Additionally, if your application requires (HTTP) Session State Caching services, you can also take advantage of -https://github.com/spring-projects/spring-session-data-geode[_Spring Session for Apache Geode/Pivotal GemFire_]. +https://github.com/spring-projects/spring-session-data-geode[_Spring Session for Apache Geode/VMware Tanzu GemFire_]. This, along with many other benefits, are provided by this project. @@ -66,17 +66,17 @@ This, along with many other benefits, are provided by this project. === Examples The single, most relevant "_source of truth_" on how to get started quickly and effectively, using Spring Boot -for Apache Geode & Pivotal GemFire (SBDG) to solve problems, is to start with the +for Apache Geode & VMware Tanzu GemFire (SBDG) to solve problems, is to start with the https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/#geode-samples[Samples]. There, you will find different examples with documentation and code showing you how to use SBDG to appropriately handle specific application concerns, like Caching. You can find an example of using SBDG in the Pivotal Cloud Cache (PCC) https://github.com/pivotal-cf/PCC-Sample-App-PizzaStore[Pizza Store] -GitHub repository, which is a Spring Boot, Pivotal GemFire `ClientCache` application that connects to PCC when the app +GitHub repository, which is a Spring Boot, VMware Tanzu GemFire `ClientCache` application that connects to PCC when the app is deployed to PCF. The https://github.com/jxblum/contacts-application/tree/master/boot-example[boot-example] found in the -_Contacts Application Reference Implementation_ for _Spring Data for Apache Geode & Pivotal GemFire_ (SDG) uses SBDG +_Contacts Application Reference Implementation_ for _Spring Data for Apache Geode & VMware Tanzu GemFire_ (SDG) uses SBDG to manage Books in a _System of Record_ Use Case. Then, there is a series of examples that walks a user through a series of steps starting by building a simple, @@ -112,5 +112,5 @@ Please see our https://github.com/spring-projects/spring-boot-data-geode/securit [[license]] == License -_Spring Boot_, _Spring Boot for Apache Geode_ and _Spring Boot for Pivotal GemFire_ is Open Source Software +_Spring Boot_, _Spring Boot for Apache Geode_ and _Spring Boot for VMware Tanzu GemFire_ is Open Source Software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license]. diff --git a/build.gradle b/build.gradle index 75b691193..71cfaa657 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { apply plugin: 'io.spring.convention.root' group = 'org.springframework.geode' -description = 'Spring Boot for Apache Geode & Pivotal GemFire' +description = 'Spring Boot for Apache Geode & VMware Tanzu GemFire' //ext['spring.version'] = "$springVersion" //ext['spring-framework.version'] = "$springVersion" diff --git a/spring-gemfire-starter-actuator/spring-gemfire-starter-actuator.gradle b/spring-gemfire-starter-actuator/spring-gemfire-starter-actuator.gradle index d56b6c75c..932cc0485 100644 --- a/spring-gemfire-starter-actuator/spring-gemfire-starter-actuator.gradle +++ b/spring-gemfire-starter-actuator/spring-gemfire-starter-actuator.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot Actuator Starter for Pivotal GemFire" +description = "Spring Boot Actuator Starter for VMware Tanzu GemFire" dependencies { diff --git a/spring-gemfire-starter-logging/spring-gemfire-starter-logging.gradle b/spring-gemfire-starter-logging/spring-gemfire-starter-logging.gradle index afe6d363b..275c06099 100644 --- a/spring-gemfire-starter-logging/spring-gemfire-starter-logging.gradle +++ b/spring-gemfire-starter-logging/spring-gemfire-starter-logging.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot Logging Starter for Pivotal GemFire with Logback as the logging provider and adaptation of Log4j to SLF4J" +description = "Spring Boot Logging Starter for VMware Tanzu GemFire with Logback as the logging provider and adaptation of Log4j to SLF4J" dependencies { diff --git a/spring-gemfire-starter-session/spring-gemfire-starter-session.gradle b/spring-gemfire-starter-session/spring-gemfire-starter-session.gradle index 1e468d994..f64025671 100644 --- a/spring-gemfire-starter-session/spring-gemfire-starter-session.gradle +++ b/spring-gemfire-starter-session/spring-gemfire-starter-session.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot Starter for Spring Session using Pivotal GemFire" +description = "Spring Boot Starter for Spring Session using VMware Tanzu GemFire" dependencies { diff --git a/spring-gemfire-starter-test/spring-gemfire-starter-test.gradle b/spring-gemfire-starter-test/spring-gemfire-starter-test.gradle index 4a0b71003..c7dc23584 100644 --- a/spring-gemfire-starter-test/spring-gemfire-starter-test.gradle +++ b/spring-gemfire-starter-test/spring-gemfire-starter-test.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot Test Starter for Pivotal GemFire" +description = "Spring Boot Test Starter for VMware Tanzu GemFire" dependencies { diff --git a/spring-gemfire-starter/spring-gemfire-starter.gradle b/spring-gemfire-starter/spring-gemfire-starter.gradle index c15ce7eb8..82aed97cb 100644 --- a/spring-gemfire-starter/spring-gemfire-starter.gradle +++ b/spring-gemfire-starter/spring-gemfire-starter.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot Starter for Pivotal GemFire" +description = "Spring Boot Starter for VMware Tanzu GemFire" dependencies { diff --git a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/GeodeHealthIndicatorAutoConfiguration.java b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/GeodeHealthIndicatorAutoConfiguration.java index b3a861b5f..e478d84c8 100644 --- a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/GeodeHealthIndicatorAutoConfiguration.java +++ b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/GeodeHealthIndicatorAutoConfiguration.java @@ -32,7 +32,7 @@ import org.springframework.geode.boot.autoconfigure.ClientCacheAutoConfiguration; /** - * Spring Boot {@link EnableAutoConfiguration auto-configuration} for Apache Geode/Pivotal GemFire + * Spring Boot {@link EnableAutoConfiguration auto-configuration} for Apache Geode * {@link HealthIndicator HealthIndicators}. * * @author John Blum diff --git a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/BaseGeodeHealthIndicatorConfiguration.java b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/BaseGeodeHealthIndicatorConfiguration.java index 538d7ded4..78298e655 100644 --- a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/BaseGeodeHealthIndicatorConfiguration.java +++ b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/BaseGeodeHealthIndicatorConfiguration.java @@ -29,7 +29,7 @@ import org.springframework.geode.boot.actuate.GeodeRegionsHealthIndicator; /** - * Spring {@link Configuration @Configuration} class declaring Spring beans for general Apache Geode/Pivotal GemFire + * Spring {@link Configuration @Configuration} class declaring Spring beans for general Apache Geode * peer {@link Cache} and {@link ClientCache} {@link HealthIndicator HealthIndicators}. * * @author John Blum diff --git a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/ClientCacheHealthIndicatorConfiguration.java b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/ClientCacheHealthIndicatorConfiguration.java index 61428801e..da1b2ca23 100644 --- a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/ClientCacheHealthIndicatorConfiguration.java +++ b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/ClientCacheHealthIndicatorConfiguration.java @@ -33,7 +33,7 @@ import org.springframework.geode.boot.actuate.GeodePoolsHealthIndicator; /** - * Spring {@link Configuration @Configuration} class declaring Spring beans for Apache Geode/Pivotal GemFire + * Spring {@link Configuration @Configuration} class declaring Spring beans for Apache Geode * {@link ClientCache} {@link HealthIndicator HealthIndicators}. * * @author John Blum diff --git a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/PeerCacheHealthIndicatorConfiguration.java b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/PeerCacheHealthIndicatorConfiguration.java index 0e3e71426..08d607175 100644 --- a/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/PeerCacheHealthIndicatorConfiguration.java +++ b/spring-geode-actuator-autoconfigure/src/main/java/org/springframework/geode/boot/actuate/autoconfigure/config/PeerCacheHealthIndicatorConfiguration.java @@ -43,8 +43,8 @@ import org.springframework.lang.Nullable; /** - * Spring {@link Configuration @Configuration} class declaring Spring beans for Apache Geode/Pivotal GemFire - * peer {@link Cache} {@link HealthIndicator HealthIndicators}. + * Spring {@link Configuration @Configuration} class declaring Spring beans for Apache Geode peer {@link Cache} + * {@link HealthIndicator HealthIndicators}. * * @author John Blum * @see org.apache.geode.cache.Cache diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/CacheNameAutoConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/CacheNameAutoConfiguration.java index f8c2c2321..55b701b63 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/CacheNameAutoConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/CacheNameAutoConfiguration.java @@ -36,8 +36,8 @@ /** * Spring Boot {@link EnableAutoConfiguration auto-configuration} class used to configure the Apache Geode - * / Pivotal GemFire {@link ClientCache} application or peer {@link Cache} member node name - * (i.e. {@literal gemfire.name}) with the Spring Boot {@literal spring.application.name} property. + * {@link ClientCache} application or peer {@link Cache} member node name (i.e. {@literal gemfire.name}) + * with the Spring Boot {@literal spring.application.name} property. * * @author John Blum * @see org.apache.geode.cache.Cache diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/GemFirePropertiesAutoConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/GemFirePropertiesAutoConfiguration.java index 3ea0a3cac..533f526f3 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/GemFirePropertiesAutoConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/GemFirePropertiesAutoConfiguration.java @@ -30,7 +30,7 @@ /** * Spring Boot {@link EnableAutoConfiguration auto-configuration} class used to configure Spring Boot * {@link ConfigurationProperties @ConfigurationProperites} classes and beans from the Spring {@link Environment} - * containing Apache Geode / Pivotal GemFire configuration properties. + * containing Apache Geode configuration properties. * * @author John Blum * @see org.apache.geode.cache.GemFireCache diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/LoggingAutoConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/LoggingAutoConfiguration.java index c0c023135..ff1f49708 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/LoggingAutoConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/LoggingAutoConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.data.gemfire.config.annotation.EnableLogging; /** - * Spring Boot {@link EnableAutoConfiguration Auto-Configuration} for Apache Geode and Pivotal GemFire logging. + * Spring Boot {@link EnableAutoConfiguration Auto-Configuration} for Apache Geode logging. * * @author John Blum * @see org.springframework.boot.autoconfigure.EnableAutoConfiguration diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/RegionTemplateAutoConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/RegionTemplateAutoConfiguration.java index 3e1df8de0..b7b5b7f72 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/RegionTemplateAutoConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/RegionTemplateAutoConfiguration.java @@ -65,8 +65,8 @@ /** * Spring Boot {@link EnableAutoConfiguration auto-configuration} class used to configure a {@link GemfireTemplate} - * for each Apache Geode / Pivotal GemFire {@link Region} declared/defined in - * the Spring {@link ConfigurableApplicationContext} in order to perform {@link Region} data access operations. + * for each Apache Geode {@link Region} declared/defined in the Spring {@link ConfigurableApplicationContext} + * in order to perform {@link Region} data access operations. * * @author John Blum * @see org.apache.geode.cache.GemFireCache diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionAutoConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionAutoConfiguration.java index 5a2fd4d8e..67be3c417 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionAutoConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionAutoConfiguration.java @@ -48,7 +48,7 @@ /** * Spring Boot {@link EnableAutoConfiguration auto-configuration} for configuring either Apache Geode - * or Pivotal GemFire as an (HTTP) {@link Session} state management provider in Spring Session. + * as an (HTTP) {@link Session} state management provider in Spring Session. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionPropertiesAutoConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionPropertiesAutoConfiguration.java index 1d673dfaf..07c145ade 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionPropertiesAutoConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SpringSessionPropertiesAutoConfiguration.java @@ -32,8 +32,8 @@ /** * Spring Boot {@link EnableAutoConfiguration auto-configuration} class used to configure Spring Boot * {@link ConfigurationProperties @ConfigurationProperites} classes and beans from the Spring {@link Environment} - * containing Spring Session configuration properties used to configure either Apache Geode or Pivotal GemFire - * to manage (HTTP) Session state. + * containing Spring Session configuration properties used to configure either Apache Geode to manage (HTTP) Session + * state. * * @author John Blum * @see org.apache.geode.cache.GemFireCache diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/GemFireProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/GemFireProperties.java index a0d9576b5..1d85abd90 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/GemFireProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/GemFireProperties.java @@ -33,8 +33,8 @@ import org.springframework.geode.boot.autoconfigure.configuration.support.ServiceProperties; /** - * Spring Boot {@link ConfigurationProperties} for well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * Spring Boot {@link ConfigurationProperties} for well-known, documented Spring Data for Apache Geode(SDG) + * {@link Properties}. * * This class assists the application developer in the auto-completion / content-assist of the well-known, documented * SDG {@link Properties}. diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/SpringSessionProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/SpringSessionProperties.java index 4736e3c11..7a698855d 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/SpringSessionProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/SpringSessionProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration; import org.apache.geode.cache.RegionShortcut; @@ -23,9 +22,8 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty; /** - * Spring Boot {@link ConfigurationProperties} used to configure Spring Session for Apache Geode or Pivotal GemFire - * (SSDG) in order to manage (HTTP) Session state with Spring Session, backed by either Apache Geode - * or Pivotal GemFire. + * Spring Boot {@link ConfigurationProperties} used to configure Spring Session for Apache Geode (SSDG) in order to + * manage (HTTP) Session state with Spring Session, backed by Apache Geode. * * @author John Blum * @see org.springframework.boot.context.properties.ConfigurationProperties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheProperties.java index 8a697a765..4c3cb1eda 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -27,11 +26,11 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire peer {@link Cache}, - * {@link ClientCache} and {@link CacheServer} objects. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode peer {@link Cache}, {@link ClientCache} + * and {@link CacheServer} objects. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheServerProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheServerProperties.java index f7065abb8..8152a2e7c 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheServerProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/CacheServerProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -25,10 +24,10 @@ import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy; /** - * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode / Pivotal GemFire {@link CacheServer}. + * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode {@link CacheServer}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientCacheProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientCacheProperties.java index 16b5d871f..5e8020533 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientCacheProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientCacheProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -23,9 +22,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode / Pivotal GemFire {@link ClientCache}. + * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode {@link ClientCache}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientSecurityProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientSecurityProperties.java index 2e42a5236..53f8dd5ac 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientSecurityProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClientSecurityProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -23,11 +22,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode / Pivotal GemFire {@link ClientCache} - * Security (authentication & authorization). + * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode {@link ClientCache} Security + * (authentication & authorization). * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClusterProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClusterProperties.java index f1fa45c01..a3678f553 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClusterProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ClusterProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -26,10 +25,10 @@ /** * Spring Boot {@link ConfigurationProperties} used to configure the {@link DataPolicy} of all {@link Region Regions} - * in an Apache Geode / Pivotal GemFire cluster. + * in an Apache Geode cluster. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/DiskStoreProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/DiskStoreProperties.java index e04b57b8e..ccd9b2fff 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/DiskStoreProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/DiskStoreProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -24,10 +23,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire - * {@link DiskStore DiskStores}. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode {@link DiskStore DiskStores}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/EntityProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/EntityProperties.java index fba7e1819..75dc43375 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/EntityProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/EntityProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -25,10 +24,10 @@ /** * Spring Boot {@link ConfigurationProperties} used to configure the application base {@link Package package} * containing the application entity classes. The entity classes are then used to create and configure - * Apache Geode / Pivotal GemFire {@link Region Regions}. + * Apache Geode {@link Region Regions}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LocatorProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LocatorProperties.java index 5176c6ae6..50216694b 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LocatorProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LocatorProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -23,14 +22,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an embedded Apache Geode / Pivotal GemFire - * {@link Locator}. + * Spring Boot {@link ConfigurationProperties} used to configure an embedded Apache Geode {@link Locator}. * * A {@link Locator} enables location services used by nodes to join an existing cluster as a peer member * and is also used by clients to discover servers in the cluster. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LoggingProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LoggingProperties.java index 8a890ffda..6eff74942 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LoggingProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/LoggingProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -21,9 +20,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire logging. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode logging. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagementProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagementProperties.java index 82ddea188..f8b7b0388 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagementProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagementProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -21,10 +20,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire management services, - * such as HTTP. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode management services, such as HTTP. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagerProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagerProperties.java index 673719fdf..431b358df 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagerProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ManagerProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -21,12 +20,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an embedded Apache Geode / Pivotal GemFire - * {@literal Manager}. + * Spring Boot {@link ConfigurationProperties} used to configure an embedded Apache Geode {@literal Manager}. * * A {@literal Manager} allows users to manage a cluster with tools like {@literal Gfsh} or {@literal Pulse}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PdxProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PdxProperties.java index 3d478c33a..3335b3c2e 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PdxProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PdxProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -21,17 +20,15 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire - * {@literal PDX} serialization. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode {@literal PDX} serialization. * - * PDX serialization is an alternative serialization format to Java Serialization provided by - * Apache Geode / Pivotal GemFire. PDX enables interoperability with native language clients (e.g. C++), - * enables objects stored in GemFire/Geode to be queried without causing deserialization and is a more efficient - * format than Java Serialization. While PDX is more robust in some ways, it is less robust in others. For example, - * PDX does not handle cyclic references in the object graph. + * PDX serialization is an alternative serialization format to Java Serialization provided by Apache Geode. PDX enables + * interoperability with native language clients (e.g. C++), enables objects stored in GemFire/Geode to be queried + * without causing deserialization and is a more efficient format than Java Serialization. While PDX is more robust + * in some ways, it is less robust in others. For example, PDX does not handle cyclic references in the object graph. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerCacheProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerCacheProperties.java index 5155b794c..eda422238 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerCacheProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerCacheProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -23,10 +22,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode / Pivotal GemFire peer {@link Cache}. + * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode peer {@link Cache}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerSecurityProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerSecurityProperties.java index 51c99cdbf..e454908df 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerSecurityProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PeerSecurityProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -23,11 +22,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode / Pivotal GemFire peer {@link Cache} - * Security (authentication & authorization). + * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode peer {@link Cache} Security + * (authentication & authorization). * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PoolProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PoolProperties.java index ac0f43634..7b1689e8c 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PoolProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/PoolProperties.java @@ -23,10 +23,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode / Pivotal GemFire peer {@link Pool}. + * Spring Boot {@link ConfigurationProperties} used to configure an Apache Geode client {@link Pool}. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SecurityProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SecurityProperties.java index 6293d8eb6..4ffcba194 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SecurityProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SecurityProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -22,13 +21,13 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire Security. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode Security. * * Security configuration covers Authentication & Authorization (AUTH) as well as Secure Transport using SSL * (i.e. securing data in motion). Securing data at rest (e.g. disk based encryption) is not yet supported. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire - * (SDG) {@link Properties}. + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode (SDG) + * {@link Properties}. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ServiceProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ServiceProperties.java index 2c3c704a9..27df74dd8 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ServiceProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/ServiceProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -22,12 +21,12 @@ import org.springframework.data.gemfire.config.annotation.EnableMemcachedServer; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire embedded services. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode embedded services. * * Currently, the supported embedded services include HTTP service (Jetty), Memcached (protocol) server * and a Redis (protocol) server. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SslProperties.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SslProperties.java index d3be447c5..cce95e4bc 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SslProperties.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/configuration/support/SslProperties.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.configuration.support; import java.util.Properties; @@ -23,12 +22,12 @@ import org.springframework.data.gemfire.config.annotation.EnableSsl; /** - * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode / Pivotal GemFire Socket layer SSL. + * Spring Boot {@link ConfigurationProperties} used to configure Apache Geode Socket layer SSL. * * The SSL configuration is used to secure communications and data in motion between clients and servers * as well as between peers in a cluster. * - * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode/Pivotal GemFire + * The configuration {@link Properties} are based on well-known, documented Spring Data for Apache Geode * (SDG) {@link Properties}. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java index b4e974b15..7392792e7 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java @@ -15,6 +15,6 @@ */ /** - * Spring Boot auto-configuration for Apache Geode & Pivotal GemFire. + * Spring Boot auto-configuration for Apache Geode. */ package org.springframework.geode.boot.autoconfigure; diff --git a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/support/EnableSubscriptionConfiguration.java b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/support/EnableSubscriptionConfiguration.java index ca1ecd083..aca040536 100644 --- a/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/support/EnableSubscriptionConfiguration.java +++ b/spring-geode-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/support/EnableSubscriptionConfiguration.java @@ -28,8 +28,8 @@ import org.springframework.data.gemfire.config.annotation.PoolConfigurer; /** - * A Spring {@link Configuration} class used to enable subscription on the Apache Geode & Pivotal GemFire - * {@literal DEFAULT} {@link Pool} as well as the SDG {@literal gemfirePool} {@link Pool}, only. + * A Spring {@link Configuration} class used to enable subscription on the Apache Geode {@literal DEFAULT} {@link Pool} + * as well as the SDG {@literal gemfirePool} {@link Pool}, only. * * @author John Blum * @see org.apache.geode.cache.client.Pool diff --git a/spring-geode-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-geode-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 2f05d4056..f2c891f6c 100644 --- a/spring-geode-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-geode-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -88,7 +88,7 @@ { "name": "session", "type": "org.springframework.geode.boot.autoconfigure.configuration.support.SpringSessionProperties", - "description": "Configuration properties for Spring Session backed by Apache Geode or Pivotal GemFire." + "description": "Configuration properties for Spring Session backed by Apache Geode." }, { "name": "ssl", @@ -100,7 +100,7 @@ { "name": "spring.data.gemfire.name", "type": "java.lang.String", - "description": "Name of the Apache Geode / Pivotal GemFire member." + "description": "Name of the Apache Geode member." }, { "name": "spring.data.gemfire.locators", @@ -149,7 +149,7 @@ "name": "spring.data.gemfire.cache.log-level", "type": "java.lang.String", "default": "config", - "description": "Configure the log-level of an Apache Geode / Pivotal GemFire cache." + "description": "Configure the log-level of an Apache Geode cache." }, { "name": "spring.data.gemfire.cache.name", @@ -405,7 +405,7 @@ "name": "spring.data.gemfire.logging.level", "type": "java.lang.String", "default": "config", - "description": "Configures the log-level of an Apache Geode / Pivotal GemFire cache; Alias for 'spring.data.gemfire.cache.log-level'." + "description": "Configures the log-level of an Apache Geode cache; Alias for 'spring.data.gemfire.cache.log-level'." }, { "name": "spring.data.gemfire.logging.log-disk-space-limit", @@ -840,7 +840,7 @@ "name": "spring.data.gemfire.service.http.dev-rest-api-start", "type": "java.lang.Boolean", "default": false, - "description": "Configures whether to start the Developer REST API web service. A full installation of Apache Geode or Pivotal GemFire is required and you must set the $GEODE environment variable." + "description": "Configures whether to start the Developer REST API web service. A full installation of Apache Geode is required and you must set the $GEODE environment variable." }, { "name": "spring.data.gemfire.service.memcached.port", diff --git a/spring-geode-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java b/spring-geode-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java index 199b53757..578850a40 100644 --- a/spring-geode-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java +++ b/spring-geode-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java @@ -26,7 +26,7 @@ import org.springframework.data.gemfire.listener.annotation.ContinuousQuery; /** - * The {@link TemperatureReadingsContinuousQueriesHandler} class is a POJO containing Apache Geode/Pivotal GemFire + * The {@link TemperatureReadingsContinuousQueriesHandler} class is a POJO containing Apache Geode * Continuous Query (CQ) definitions. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java index 561ba8fe4..f65e5c01e 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java @@ -43,8 +43,8 @@ import example.app.books.service.support.CachingBookService; /** - * Integration tests testing the auto-configuration of Spring's Cache Abstraction with Apache Geode - * or Pivotal GemFire as the caching provider. + * Integration Tests testing the auto-configuration of Spring's Cache Abstraction with Apache Geode + * as the caching provider. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/ManuallyConfiguredCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/ManuallyConfiguredCachingIntegrationTests.java index 20e0db2e1..df709f682 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/ManuallyConfiguredCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/ManuallyConfiguredCachingIntegrationTests.java @@ -35,9 +35,9 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration tests for {@link CachingProviderAutoConfiguration} asserting that neither Apache Geode - * nor Pivotal GemFire is configured as the caching provider in Spring's Cache Abstraction when another - * caching provider (i.e. {@link CacheManager} bean) has been declared and configured. + * Integration Tests for {@link CachingProviderAutoConfiguration} asserting that Apache Geode is not configured as + * the caching provider in Spring's Cache Abstraction when another caching provider (i.e. {@link CacheManager} bean) + * has been declared and configured. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/configuration/GeodePropertiesVsSpringDataGeodePropertiesPrecedenceIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/configuration/GeodePropertiesVsSpringDataGeodePropertiesPrecedenceIntegrationTests.java index 5e954266f..a9df26346 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/configuration/GeodePropertiesVsSpringDataGeodePropertiesPrecedenceIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/configuration/GeodePropertiesVsSpringDataGeodePropertiesPrecedenceIntegrationTests.java @@ -35,11 +35,11 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests asserting and testing the precedence of GemFire, Spring and Spring Data for Apache Geode - * & Pivotal GemFire (SDG) {@link Properties} precedence. + * Integration Tests asserting and testing the precedence of GemFire, Spring and Spring Data for Apache Geode (SDG) + * {@link Properties} precedence. * - * Essentially, SDG {@link Properties} should take precedence over (i.e. override) both Spring And Apache Geode - * or Pivotal GemFire {@link Properties}. + * Essentially, SDG {@link Properties} should take precedence over (i.e. override) both Spring and Apache Geode + * {@link Properties}. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java index 39f9ea4af..6d69d103a 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java @@ -54,7 +54,7 @@ import example.geode.query.cq.event.TemperatureReadingsContinuousQueriesHandler; /** - * Integration Tests testing the auto-configuration of Apache Geode/Pivotal GemFire Continuous Query. + * Integration Tests testing the auto-configuration of Apache Geode Continuous Query. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java index d2bc7dc18..d3397081d 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java @@ -42,7 +42,7 @@ import org.springframework.util.Assert; /** - * Integration Tests testing the auto-configuration of Spring Data for Apache Geode/Pivotal GemFire + * Integration Tests testing the auto-configuration of Spring Data for Apache Geode * Function implementations and executions support. * * @author John Blum diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java index 7ada4b42e..4401d292c 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java @@ -13,20 +13,18 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.function.executions; import org.springframework.data.gemfire.function.annotation.OnMember; /** - * The {@link Calculator} interface defines Apache Geode/Pivotal GemFire Functions. + * The {@link Calculator} interface defines Apache Geode Functions. * * @author John Blum * @see org.springframework.data.gemfire.function.annotation.OnRegion * @since 1.0.0 */ @OnMember(groups = "test") -@SuppressWarnings("all") // TODO change Function returns type when SDG properly handles Function method return types/values public interface Calculator { diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java index a5f0d7f1c..9524b6039 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/logging/LoggingAutoConfigurationIntegrationTests.java @@ -33,8 +33,8 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests asserting the configuration and behavior of Apache Geode & Pivotal GemFire logging - * when configured with Spring Boot auto-configuration. + * Integration Tests asserting the configuration and behavior of Apache Geode logging when configured with + * Spring Boot auto-configuration. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java index 4585dd3de..d952b61d0 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java @@ -38,8 +38,7 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests testing the auto-configuration of Spring Data Repositories backed by either Apache Geode - * or Pivotal GemFire. + * Integration Tests testing the auto-configuration of Spring Data Repositories backed by Apache Geode. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java index 8bed7f609..0d1065055 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.boot.autoconfigure.repository.repo; import org.springframework.data.repository.CrudRepository; @@ -21,7 +20,7 @@ /** * The {@link CustomerRepository} interface defines a Spring Data {@link CrudRepository} for performing basic CRUD - * and simple query data access operations on {@link Customer} objects stored in Apache Geode or Pivotal GemFire. + * and simple query data access operations on {@link Customer} objects stored in Apache Geode. * * @author John Blum * @see org.springframework.data.repository.CrudRepository diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java index f80140af7..779b96eac 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java @@ -34,8 +34,8 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests testing the auto-configuration of Apache Geode/Pivotal GemFire Security - * authentication/authorization in a cloud, managed context (e.g. Pivotal CloudFoundry) + * Integration Tests testing the auto-configuration of Apache Geode Security authentication/authorization in a cloud, + * managed context (e.g. CloudFoundry). * * @author John Blum * @see java.security.Principal diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/hybrid/AutoConfiguredHybridSecurityContextIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/hybrid/AutoConfiguredHybridSecurityContextIntegrationTests.java index b0157d5f1..8bc57a7f0 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/hybrid/AutoConfiguredHybridSecurityContextIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/hybrid/AutoConfiguredHybridSecurityContextIntegrationTests.java @@ -42,8 +42,7 @@ * Pivotal Cloud Cache (PCC) service instance. * * This Use Case is common when users want to deploy their Spring Boot, {@link ClientCache} apps to - * Pivotal CloudFoundry (PCF) however, want to connect those apps to an external Apache Geode or Pivotal GemFire - * cluster. + * Pivotal CloudFoundry (PCF) however, want to connect those apps to an external Apache Geode cluster. * * @author John Blum * @see java.util.Properties diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java index d4ef8fee2..93fba130d 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java @@ -31,8 +31,8 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests testing the auto-configuration of Apache Geode/Pivotal GemFire Security - * authentication/authorization in a local, non-managed context. + * Integration Tests testing the auto-configuration of Apache Geode Security authentication/authorization in a local, + * non-managed context. * * @author John Blum * @see java.security.Principal diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java index 7d09f8195..c429d9325 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java @@ -53,7 +53,7 @@ import example.echo.config.EchoServerConfiguration; /** - * Integration Tests testing the auto-configuration of Apache Geode/Pivotal GemFire SSL. + * Integration Tests testing the auto-configuration of Apache Geode SSL. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingIntegrationTests.java index f127b69ec..cd251c64f 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingIntegrationTests.java @@ -42,11 +42,10 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests for auto-configuration of Spring Session using either Apache Geode or Pivotal GemFire - * as the {@link Session} state management provider. + * Integration Tests for auto-configuration of Spring Session using either Apache Geode as the {@link Session} state + * management provider. * - * This test asserts that the Spring Boot auto-configuration properly configures Spring Session - * with either Apache Geode or Pivotal GemFire + * This test asserts that the Spring Boot auto-configuration properly configures Spring Session with Apache Geode. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/CustomConfiguredSessionCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/CustomConfiguredSessionCachingIntegrationTests.java index 274485882..61b0e240c 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/CustomConfiguredSessionCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/CustomConfiguredSessionCachingIntegrationTests.java @@ -51,8 +51,8 @@ import org.springframework.web.context.support.GenericWebApplicationContext; /** - * Integration Test for the auto-configuration of Spring Session using either Apache Geode or Pivotal GemFire - * as the {@link Session} state management provider. + * Integration Test for the auto-configuration of Spring Session using Apache Geode as the {@link Session} state + * management provider. * * This test asserts that the Spring Boot auto-configuration can be customized using either {@link Properties} * or a {@link SpringSessionGemFireConfigurer}. diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredSessionCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredSessionCachingIntegrationTests.java index 729d36d7e..54f2fff62 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredSessionCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredSessionCachingIntegrationTests.java @@ -41,7 +41,7 @@ /** * Integration Tests for auto-configuration of Spring Session using a custom Spring Session {@link Session} state - * management provider, asserting that neither Apache Geode nor Pivotal GemFire is configured. + * management provider, asserting that Apache Geode is configured. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredWithPropertiesSessionCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredWithPropertiesSessionCachingIntegrationTests.java index 36ba738c9..8ff4ec9b3 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredWithPropertiesSessionCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/ManuallyConfiguredWithPropertiesSessionCachingIntegrationTests.java @@ -35,10 +35,9 @@ import org.springframework.test.context.junit4.SpringRunner; /** - * Integration Tests asserting the configuration of Spring Session using Spring Boot's + * Integration Tests asserting the configuration of Spring Session using Spring Boot' * {@literal spring.session.store-type} configuration property set to {@literal none} - * and assert neither Apache Geode nor Pivotal GemFire was configured as the Session - * state management provider. + * and assert Apache Geode was not configured as the Session state management provider. * * @author John Blum * @see org.apache.geode.cache.GemFireCache diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/NoAutoConfigurationOfSessionCachingIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/NoAutoConfigurationOfSessionCachingIntegrationTests.java index 06f88701f..8e484fee8 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/NoAutoConfigurationOfSessionCachingIntegrationTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/NoAutoConfigurationOfSessionCachingIntegrationTests.java @@ -32,9 +32,8 @@ import org.springframework.web.context.WebApplicationContext; /** - * Integration tests for {@link SpringSessionAutoConfiguration} asserting that Spring Session - * (for Apache Geode/Pivotal GemFire) is not auto-configured when the Spring {@link ApplicationContext} - * is not a {@link WebApplicationContext}. + * Integration tests for {@link SpringSessionAutoConfiguration} asserting that Spring Session (for Apache Geode) + * is not auto-configured when the Spring {@link ApplicationContext} is not a {@link WebApplicationContext}. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode-autoconfigure/src/test/resources/application-gemfire-config-test.properties b/spring-geode-autoconfigure/src/test/resources/application-gemfire-config-test.properties index ea6c04121..78569ffe1 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-gemfire-config-test.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-gemfire-config-test.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties containing Spring Data for Apache Geode / Pivotal GemFire properties. +# Spring Boot application.properties containing Spring Data for Apache Geode properties. spring.data.gemfire.name=GemFirePropertiesIntegrationTests spring.data.gemfire.locators=localhost[11235],localhost[12480] diff --git a/spring-geode-autoconfigure/src/test/resources/application-security-cloud.properties b/spring-geode-autoconfigure/src/test/resources/application-security-cloud.properties index 9ebd74ea3..d656a6aa8 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-security-cloud.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-security-cloud.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties for testing Apache Geode/Pivotal GemFire Security in a cloud context. +# Spring Boot application.properties for testing Apache Geode Security in a cloud context. vcap.application.application_id=c50bb519-2739-4fa3-8750-02c051e35735 vcap.application.application_name=boot-test diff --git a/spring-geode-autoconfigure/src/test/resources/application-security-hybrid.properties b/spring-geode-autoconfigure/src/test/resources/application-security-hybrid.properties index 4adf0522a..cc391ef09 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-security-hybrid.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-security-hybrid.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties used in server for testing Apache Geode/Pivotal GemFire Security in a hybrid cloud context. +# Spring Boot application.properties used in server for testing Apache Geode Security in a hybrid cloud context. test.security.context.username=phantom test.security.context.password=s3cr3t diff --git a/spring-geode-autoconfigure/src/test/resources/application-security-local-client.properties b/spring-geode-autoconfigure/src/test/resources/application-security-local-client.properties index 606716a64..c6f21c7c9 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-security-local-client.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-security-local-client.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties used in client for testing Apache Geode/Pivotal GemFire Security in a local context. +# Spring Boot application.properties used in client for testing Apache Geode Security in a local context. spring.data.gemfire.security.username=ghostrider spring.data.gemfire.security.password=p@55w0rd diff --git a/spring-geode-autoconfigure/src/test/resources/application-security-local-server.properties b/spring-geode-autoconfigure/src/test/resources/application-security-local-server.properties index 1d5bd4809..7628328e0 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-security-local-server.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-security-local-server.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties used in server for testing Apache Geode/Pivotal GemFire Security in a local context. +# Spring Boot application.properties used in server for testing Apache Geode Security in a local context. test.security.context.username=ghostrider test.security.context.password=p@55w0rd diff --git a/spring-geode-autoconfigure/src/test/resources/application-security-multi.properties b/spring-geode-autoconfigure/src/test/resources/application-security-multi.properties index 46e0cc184..8f0004efc 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-security-multi.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-security-multi.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties used in server for testing Apache Geode/Pivotal GemFire Security in a multi-cloudcache service instance (PCF) context. +# Spring Boot application.properties used in server for testing Apache Geode Security in a multi-cloudcache service instance (PCF) context. test.security.context.username=master test.security.context.password=p@55w0rd diff --git a/spring-geode-autoconfigure/src/test/resources/application-session-config-test.properties b/spring-geode-autoconfigure/src/test/resources/application-session-config-test.properties index fd6f2bc66..a48fe87fc 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-session-config-test.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-session-config-test.properties @@ -1,4 +1,4 @@ -# Spring Session for Apache Geode/Pivotal GemFire (Test) Properties +# Spring Session for Apache Geode (SSDG) Test Properties spring.session.data.gemfire.cache.client.pool.name=DEAD spring.session.data.gemfire.cache.client.region.shortcut=LOCAL diff --git a/spring-geode-autoconfigure/src/test/resources/application-ssl.properties b/spring-geode-autoconfigure/src/test/resources/application-ssl.properties index e3d7e0e2c..27c3f5f3a 100644 --- a/spring-geode-autoconfigure/src/test/resources/application-ssl.properties +++ b/spring-geode-autoconfigure/src/test/resources/application-ssl.properties @@ -1,4 +1,4 @@ -# Spring Boot application.properties for testing Apache Geode/Pivotal GemFire SSL +# Spring Boot application.properties for testing Apache Geode SSL spring.boot.data.gemfire.security.ssl.keystore.name=test-trusted.keystore spring.data.gemfire.security.ssl.keystore.password=s3cr3t diff --git a/spring-geode-docs/spring-geode-docs.gradle b/spring-geode-docs/spring-geode-docs.gradle index d9eaa8972..9ab4fa9c3 100644 --- a/spring-geode-docs/spring-geode-docs.gradle +++ b/spring-geode-docs/spring-geode-docs.gradle @@ -7,7 +7,7 @@ import org.apache.tools.ant.filters.ReplaceTokens apply plugin: 'io.spring.convention.docs' apply plugin: 'io.spring.convention.spring-test' -description = "Generate Javadoc and Reference Documentation on Spring Boot for Apache Geode & Pivotal GemFire" +description = "Generate Javadoc and Reference Documentation on Spring Boot for Apache Geode & VMware Tanzu GemFire" dependencies { diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc index dc239de31..1edd58001 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc @@ -1,8 +1,10 @@ [[appendix]] == Appendix +:geode-name: {apache-geode-name} +:gemfire-name: {pivotal-gemfire-name} +:cloud-cache-name: {pivotal-cloudcache-name} -The following appendices provide additional help while developing Spring Boot applications backed by Apache Geode -or Pivotal GemFire. +The following appendices provide additional help while developing Spring Boot applications backed by {geode-name}. _Table of Contents_ @@ -24,9 +26,9 @@ include::configuration-properties.adoc[leveloffset=+1] [[geode-auto-configuration-disable]] === Disabling Auto-configuration -If you would like to disable the _auto-configuration_ of any feature provided by Spring Boot for Apache Geode -or Pivotal GemFire, then you can specify the _auto-configuration_ class in the `exclude` attribute -of the `@SpringBootApplication` annotation, as follows: +If you would like to disable the _auto-configuration_ of any feature provided by Spring Boot for {geode-name}, +then you can specify the _auto-configuration_ class in the `exclude` attribute of the `@SpringBootApplication` +annotation, as follows: .Disable Auto-configuration of PDX [source,java] @@ -58,7 +60,7 @@ public class MySpringBootApplication { [[geode-auto-configuration-disable-classes]] ==== Complete Set of Auto-configuration Classes -The current set of _auto-configuration_ classes in Spring Boot for Apache Geode & Pivotal GemFire (SBDG) include: +The current set of _auto-configuration_ classes in Spring Boot for {geode-name} (SBDG) include: * `CacheNameAutoConfiguration` * `CachingProviderAutoConfiguration` @@ -77,30 +79,31 @@ The current set of _auto-configuration_ classes in Spring Boot for Apache Geode * `SslAutoConfiguration` [[geode-gemfire-switch]] -=== Switch from Apache Geode to Pivotal Cloud Cache (a.k.a. Pivotal GemFire) +=== Switch from {geode-name} to {gemfire-name} for VMs (formerly known as Pivotal Cloud Cache) -First, understand that {pivotal-gemfire-website}[Pivotal GemFire] is being succeeded by {pivotal-cloudcache-website}[Pivotal Cloud Cache] (PCC). -Therefore, all references to Pivotal GemFire implies for Pivotal Cloud Cache (PCC) as well. +First, understand that {pivotal-gemfire-website}[Pivotal GemFire] is being succeeded by +{pivotal-cloudcache-website}[Pivotal Cloud Cache] (PCC) or {cloud-cache-name}. Therefore, all references to +Pivotal GemFire implies for Pivotal Cloud Cache (PCC) or {cloud-cache-name} as well. -When it comes to Spring's support, whether you are developing with Open Source Software (OSS) {apache-geode-website}[Apache Geode] +When it comes to Spring's support, whether you are developing with Open Source Software (OSS) {apache-geode-website}[{geode-name}] or developing for {pivotal-cloudcache-website}[Pivotal Cloud Cache], Spring has you covered. At a strategic-level, this means: -1. From _Open Source Software_ (e.g. Apache Geode) to _Commercial_ (e.g. Pivotal Cloud Cache) +1. From _Open Source Software_ (e.g. {geode-name}) to _Commercial_ (e.g. Pivotal Cloud Cache) 2. From _Non-Managed Environments_ (e.g. Standalone, Externally Managed) to _Managed Environments_ (e.g. Pivotal Platform) 3. With _**little**_ to _**no code or configuration**_ changes necessary. It just works! You may also migrate your Spring Boot applications away from Pivotal Platform using the commercial software offering, -Pivotal Cloud Cache, and switch back to Open Source Apache Geode running in a standalone, externally managed environment. +Pivotal Cloud Cache, and switch back to Open Source {geode-name} running in a standalone, externally managed environment. SBDG will never lock you in! It is, and always will be, your choice! -Technically, this means to go from Apache Geode to Pivotal Cloud Cache (PCC), you must change 2 things. +Technically, this means to go from {geode-name} to Pivotal Cloud Cache (PCC), you must change 2 things. First, you must switch the dependency from `spring-geode-starter` to `spring-gemfire-starter`: -.Maven POM with Spring Boot for Apache Geode +.Maven POM with Spring Boot for {geode-name} [source,xml] [subs="verbatim,attributes"] ---- @@ -111,7 +114,7 @@ First, you must switch the dependency from `spring-geode-starter` to `spring-gem ---- -.Gradle build file with Spring Boot for Apache Geode +.Gradle build file with Spring Boot for {geode-name} [source,groovy] [subs="verbatim,attributes"] ---- @@ -122,7 +125,7 @@ dependencies { To: -.Maven POM with Spring Boot for Pivotal GemFire +.Maven POM with Spring Boot for {gemfire-name} [source,xml] [subs="verbatim,attributes"] ---- @@ -133,7 +136,7 @@ To: ---- -.Gradle build file with Spring Boot for Pivotal GemFire +.Gradle build file with Spring Boot for {gemfire-name} [source,groovy] [subs="verbatim,attributes"] ---- @@ -142,10 +145,10 @@ dependencies { } ---- -Second, to obtain the commercial Pivotal Cloud Cache (PCC) or Pivotal GemFire bits, you must declare the appropriate -repository declaration in your Maven POM or Gradle build file: +Second, to obtain the commercial Pivotal Cloud Cache (PCC) or {gemfire-name} bits, you must declare +the appropriate repository declaration in your Maven POM or Gradle build file: -.Maven Repository definition to acquire PCC or Pivotal GemFire bits +.Maven Repository definition to acquire PCC or {gemfire-name} bits [source,xml] ---- @@ -157,7 +160,7 @@ repository declaration in your Maven POM or Gradle build file: ---- -.Gradle Repository definition to acquire PCC or Pivotal GemFire bits +.Gradle Repository definition to acquire PCC or {gemfire-name} bits [source,groovy] ---- repositories { @@ -188,9 +191,9 @@ and password to configure access to the server in your Maven settings (i.e. ~/.m ---- -TIP: For more details on acquiring the Pivotal Cloud Cache (PCC) or Pivotal GemFire bits, see Pivotal GemFire's +TIP: For more details on acquiring the Pivotal Cloud Cache (PCC) or {gemfire-name} bits, see {gemfire-name}'s https://gemfire.docs.pivotal.io/{pivotal-gemfire-version}/gemfire/getting_started/installation/obtain_gemfire_maven.html[documentation]. -When using the `spring-gemfire-starter`, you do not need to declare the Pivotal GemFire dependencies noted in +When using the `spring-gemfire-starter`, you do not need to declare the {gemfire-name} dependencies noted in the documentation. The `spring-gemfire-starter` does that for you! You only need to declare the repository and configure your settings. @@ -200,7 +203,7 @@ Done! It should just work without any code or configuration changes and if this is not the case, for whatever reason, then we will work to correct it, short of any feature differences between Pivotal Cloud Cache (PCC) that cannot be accomplished -with Apache Geode itself, of course. +with {geode-name} itself, of course. Spring Boot's _auto-configuration_ and _convention over configuration_ approach tries to determine the runtime environment in order to handle infrastructure logistics so you do not have to. This is true inside or outside @@ -208,29 +211,29 @@ of a managed environment so that we can provide users with a consistent and reli and issues that arise by switching environments in the first place. Switching environments is especially common as you migrate your Spring Boot applications from DEV to TEST, followed by STAGING, and finally, to PRODUCTION. -Of course, it will nearly always be easier to "run" Apache Geode as a "managed" service inside Pivotal Platform (PCF) -using Pivotal Cloud Cache (PCC) than it will be to manage an externally run Apache Geode cluster, especially if your +Of course, it will nearly always be easier to "run" {geode-name} as a "managed" service inside Pivotal Platform (PCF) +using Pivotal Cloud Cache (PCC) than it will be to manage an externally run {geode-name} cluster, especially if your Use Cases require maximum performance and high availability. We highly recommend this approach when and where possible, but it is still your choice. [[geode-cluster-configuration-bootstrapping]] -=== Running an Apache Geode or Pivotal GemFire cluster using Spring Boot from your IDE +=== Running an {geode-name} cluster using Spring Boot from your IDE -As described in <>, it is possible to configure and run a small Apache Geode -or Pivotal GemFire cluster from inside your IDE using Spring Boot. This is extremely helpful during development -since it allows you to manually spin up, test and debug your applications quickly and easily. +As described in <>, it is possible to configure and run a small {geode-name} cluster +from inside your IDE using Spring Boot. This is extremely helpful during development since it allows you to manually +spin up, test and debug your applications quickly and easily. -Spring Boot for Apache Geode/Pivotal GemFire includes such a class: +Spring Boot for {geode-name} includes such a class: -.Spring Boot application class used to configure and bootstrap an Apache Geode/Pivotal GemFire server +.Spring Boot application class used to configure and bootstrap an {geode-name} server [source,java] ---- include::{docs-src-dir}/org/springframework/geode/docs/example/app/server/SpringBootApacheGeodeCacheServerApplication.java[tags=class] ---- -This class is a proper Spring Boot application that can be used to configure and bootstrap multiple Apache Geode -or Pivotal GemFire servers and joining them together to form a small cluster simply by modifying -the runtime configuration of this class ever so slightly. +This class is a proper Spring Boot application that can be used to configure and bootstrap multiple {geode-name} servers +and join them together to form a small cluster simply by modifying the runtime configuration of this class ever so +slightly. Initially you will want to start a single, primary server with the embedded Locator and Manager service. @@ -241,7 +244,7 @@ route data requests directly to the server hosting the data (a.k.a. single-hop a is partitioned/sharded across servers in the cluster. Locator Pools include support for load balancing connections and handling automatic fail-over in the event of failed connections, among other things. -The Manager service enables you to connect to this server using _Gfsh_ (the Apache Geode and Pivotal GemFire +The Manager service enables you to connect to this server using _Gfsh_ (the {geode-name} {apache-geode-docs}/tools_modules/gfsh/chapter_overview.html[shell tool]). To start our primary server, create a run configuration in your IDE for the `SpringBootApacheGeodeCacheServerApplication` @@ -421,9 +424,8 @@ Client Connections : 0 Now, let's start some additional servers to scale-out our cluster. -To do so, you simply need to vary the name of the members we will add to our cluster as peers. Apache Geode -and Pivotal GemFire require that the members in a cluster be named and the names of each member in the cluster -be unique. +To do so, you simply need to vary the name of the members we will add to our cluster as peers. {geode-name} requires +that the members in a cluster be named and the names of each member in the cluster be unique. Additionally, since we are running multiple instances of our `SpringBootApacheGeodeCacheServerApplication` class, which also embeds a `CacheServer` instance enabling cache clients to connect, we need to be careful to vary our @@ -548,47 +550,45 @@ Running : true Client Connections : 0 ---- -Congratulations! You just started a small Apache Geode/Pivotal GemFire cluster, with 3 members, using Spring Boot -from inside your IDE. +Congratulations! You just started a small {geode-name} cluster, with 3 members, using Spring Boot from inside your IDE. -It is pretty simple to build and run a Spring Boot, Apache Geode/Pivotal GemFire, `ClientCache` application -that connects to this cluster. Simply include and use Spring Boot for Apache Geode/Pivotal GemFire, ;-). +It is pretty simple to build and run a Spring Boot, {geode-name}, `ClientCache` application that connects to +this cluster. Simply include and use Spring Boot for {geode-name}, ;-). [[geode-testing]] === Testing -https://github.com/spring-projects/spring-test-data-geode[Spring Test for Apache Geode & Pivotal GemFire] is a new, -soon to be released and upcoming project to help developers write both _Unit_ and _Integration Tests_ -when using either Apache Geode or Pivotal GemFire in a Spring context. +https://github.com/spring-projects/spring-test-data-geode[Spring Test for {geode-name}] is a new, soon to be released +and upcoming project to help developers write both _Unit_ and _Integration Tests_ when using {geode-name} +in a Spring context. In fact, the entire {github-url}/tree/master/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure[test suite] -in Spring Boot for Apache Geode & Pivotal GemFire is based on this project. +in Spring Boot for {geode-name} is based on this project. -All Spring projects integrating with either Apache Geode or Pivotal GemFire will use this new test framework for all -their testing needs, making this new test framework for Apache Geode and Pivotal GemFire a proven and reliable solution -for all your Apache Geode/Pivotal GemFire application testing needs when using Spring as well. +All Spring projects integrating with either {geode-name} will use this new test framework for all their testing needs, +making this new test framework for {geode-name} a proven and reliable solution for all your {geode-name} application +testing needs when using Spring as well. Later on, this reference guide will include and dedicate an entire chapter on testing. [[geode-examples]] === Examples -The definitive source of truth on how to best use Spring Boot for Apache Geode & Pivotal GemFire (or Pivotal Cloud Cache -(PCC)) is to refer to the <>. +The definitive source of truth on how to best use Spring Boot for {geode-name} is to refer to the <>. Refer to the Pivotal Cloud Cache (PCC), https://github.com/pivotal-cf/PCC-Sample-App-PizzaStore[Pizza Store], -Spring Boot application for an example of how to use Spring Boot for Pivotal GemFire (SBDG) in a `ClientCache` +Spring Boot application for an example of how to use Spring Boot for {gemfire-name} (SBDG) in a `ClientCache` application interfacing with PCC. Additionally, you may refer to the https://github.com/jxblum/temperature-service[Temperature Service], Spring Boot application, which implements a Temperature Sensor and Monitoring, Internet of Things (IOT) example. The example uses -SBDG to showcase Apache Geode CQ, Function Implementations/Executions and positions Apache Geode as a _caching provider_ +SBDG to showcase {geode-name} CQ, Function Implementations/Executions and positions {geode-name} as a _caching provider_ in Spring's Cache Abstraction. It is a working, sophisticated and complete example, and is highly recommended as a good starting point for real-world use cases. You may also refer to the https://github.com/jxblum/contacts-application/tree/master/boot-example[boot-example] -from the _Contact Application_ Reference Implementation (RI) for Spring Data for Apache Geode & Pivotal GemFire -(SDG) as yet another example. +from the _Contact Application_ Reference Implementation (RI) for Spring Data for {geode-name} (SDG) +as yet another example. [[references]] === References @@ -596,8 +596,8 @@ from the _Contact Application_ Reference Implementation (RI) for Spring Data for 1. Spring Framework {spring-framework-docs}[Reference Guide] | {spring-framework-javadoc}[Javadoc] 2. Spring Boot {spring-boot-docs-html}[Reference Guide] | {spring-boot-javadoc}[Javadoc] 3. Spring Data Commons {spring-data-commons-docs-html}[Reference Guide] | {spring-data-commons-javadoc}[Javadoc] -4. Spring Data for Apache Geode {spring-data-geode-docs-html}[Reference Guide] | {spring-data-geode-javadoc}[Javadoc] -5. Spring Session for Apache Geode {spring-session-data-gemfire-docs}[Reference Guide] | {spring-session-data-gemfire-javadoc}[Javadoc] -6. Spring Test for Apache Geode {spring-test-data-gemfire-website}[README] -7. Apache Geode {apache-geode-docs}[User Guide] | {apache-geode-javadoc}[Javadoc] -8. Pivotal GemFire {pivotal-gemfire-docs}[User Guide] | {pivotal-gemfire-javadoc}[Javadoc] +4. Spring Data for {geode-name} {spring-data-geode-docs-html}[Reference Guide] | {spring-data-geode-javadoc}[Javadoc] +5. Spring Session for {geode-name} {spring-session-data-gemfire-docs}[Reference Guide] | {spring-session-data-gemfire-javadoc}[Javadoc] +6. Spring Test for {geode-name} {spring-test-data-gemfire-website}[README] +7. {geode-name} {apache-geode-docs}[User Guide] | {apache-geode-javadoc}[Javadoc] +8. {gemfire-name} {pivotal-gemfire-docs}[User Guide] | {pivotal-gemfire-javadoc}[Javadoc] diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc index f8e47f66f..aea6515fd 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/clientcache-applications.adoc @@ -1,17 +1,17 @@ [[geode-clientcache-applications]] == Building ClientCache Applications -The first, opinionated option provided to you by Spring Boot for Apache Geode & Pivotal GemFire (SBDG) out-of-the-box is -a {apache-geode-javadoc}/org/apache/geode/cache/client/ClientCache.html[ClientCache] instance, simply by declaring -either Spring Boot for Apache Geode or Spring Boot for Pivotal GemFire on your application classpath. +The first, opinionated option provided to you by Spring Boot for Apache Geode (SBDG) out-of-the-box is a +{apache-geode-javadoc}/org/apache/geode/cache/client/ClientCache.html[ClientCache] instance, simply by declaring +Spring Boot for Apache Geode (SBDG) on your application classpath. -It is assumed that most application developers using Spring Boot to build applications backed by either Apache Geode -or Pivotal GemFire will be building cache client applications deployed in an Apache Geode or Pivotal GemFire +It is assumed that most application developers using Spring Boot to build applications backed by Apache Geode will be +building cache client applications deployed in an Apache Geode {apache-geode-docs}/topologies_and_comm/cs_configuration/chapter_overview.html[Client/Server topology]. A client/server topology is the most common and traditional architecture employed by enterprise applications. -For example, you can begin building a Spring Boot, Apache Geode or Pivotal GemFire, `ClientCache` application -with either the `spring-geode-starter` or `spring-gemfire-starter` on your application's classpath: +For example, you can begin building a Spring Boot, Apache Geode `ClientCache` application with either +the `spring-geode-starter` or `spring-gemfire-starter` on your application's classpath: .Spring Boot for Apache Geode on the application classpath [source,xml] @@ -37,12 +37,12 @@ public class SpringBootApacheGeodeClientCacheApplication { } ---- -Your application now has a `ClientCache` instance, which is able to connect to an Apache Geode or Pivotal GemFire server -running on `localhost`, listening on the default `CacheServer` port, `40404`. +Your application now has a `ClientCache` instance, which is able to connect to an Apache Geode server running on +`localhost`, listening on the default `CacheServer` port, `40404`. -By default, an Apache Geode or Pivotal GemFire server (i.e. `CacheServer`) must be running in order to use -the `ClientCache` instance. However, it is perfectly valid to create a `ClientCache` instance and perform -data access operations using `LOCAL` Regions. This is very useful during development. +By default, an Apache Geode server (i.e. `CacheServer`) must be running in order to use the `ClientCache` instance. +However, it is perfectly valid to create a `ClientCache` instance and perform data access operations using `LOCAL` +Regions. This is very useful during development. TIP: To develop with `LOCAL` Regions, you only need to define your cache Regions with the {apache-geode-javadoc}/org/apache/geode/cache/client/ClientRegionShortcut.html#LOCAL[`ClientRegionShortcut.LOCAL`] @@ -53,7 +53,7 @@ environment, you simply change the data management policy of the client Region f or even a `CACHING_PROXY`, data management policy which will cause the data to be sent/received to and from 1 or more servers, respectively. -TIP: Compare and contrast the above configuration with Spring Data for Apache Geode/Pivotal GemFire's +TIP: Compare and contrast the above configuration with Spring Data for Apache Geode's {spring-data-geode-docs-html}/#bootstrap-annotation-config-geode-applications[approach]. It is uncommon to ever need a direct reference to the `ClientCache` instance provided by SBDG injected into your @@ -103,12 +103,12 @@ It is the 2nd part, "_get out of the way quickly as requirements start to diverg that we refer to here. If your application requirements demand you use Spring Boot to configure and bootstrap an embedded, peer `Cache` -Apache Geode or Pivotal GemFire application, then simply declare your intention with either SDG's +Apache Geode application, then simply declare your intention with either SDG's {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/PeerCacheApplication.html[`@PeerCacheApplication`] annotation, or alternatively, if you need to enable connections from `ClientCache` apps as well, use the SDG {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/CacheServerApplication.html[`@CacheServerApplication`] annotation: -.Spring Boot, Apache Geode/Pivotal GemFire CacheServer Application +.Spring Boot, Apache Geode CacheServer Application [source,java] ---- @SpringBootApplication @@ -121,8 +121,8 @@ public class SpringBootApacheGeodeCacheServerApplication { } ---- -TIP: An Apache Geode/Pivotal GemFire "server" is not necessarily a "`CacheServer`" capable of serving cache clients. -It is merely a peer member node in a GemFire/Geode cluster (a.k.a. distributed system) that stores and manages data. +TIP: An Apache Geode "server" is not necessarily a "`CacheServer`" capable of serving cache clients. It is merely a +peer member node in a GemFire/Geode cluster (a.k.a. distributed system) that stores and manages data. By explicitly declaring the `@CacheServerApplication` annotation, you are telling Spring Boot that you do not want the default, `ClientCache` instance, but rather an embedded, peer `Cache` instance with a `CacheServer` component, @@ -133,7 +133,7 @@ to "locate" servers in a cluster, as well as an embedded _Manager_, which allows to be managed and monitored using {apache-geode-docs}/tools_modules/gfsh/chapter_overview.html[_Gfsh_], GemFire/Geode's shell tool: -.Spring Boot, Apache Geode/Pivotal GemFire CacheServer Application with _Locator_ and _Manager_ services enabled +.Spring Boot, Apache Geode `CacheServer` Application with _Locator_ and _Manager_ services enabled [source,java] ---- @SpringBootApplication @@ -197,9 +197,9 @@ Client Connections : 0 ---- You can even start additional servers in _Gfsh_, which will connect to your Spring Boot configured and bootstrapped -Apache Geode or Pivotal GemFire `CacheServer` application. These additional servers started in _Gfsh_ know about -the Spring Boot, GemFire/Geode server because of the embedded _Locator_ service, which is running on `localhost`, -listening on the default _Locator_ port, `10334`: +Apache Geode `CacheServer` application. These additional servers started in _Gfsh_ know about the Spring Boot, +Apache Geode server because of the embedded _Locator_ service, which is running on `localhost`, listening on +the default _Locator_ port, `10334`: [source,text] ---- @@ -268,7 +268,7 @@ GfshServer | 10.0.0.121(GfshServer:30270):1025 Then, modify the `SpringBootApacheGeodeCacheServerApplication` class to connect to the existing cluster, like so: -.Spring Boot, Apache Geode/Pivotal GemFire CacheServer Application with _Locator_ and _Manager_ services enabled +.Spring Boot, Apache Geode `CacheServer` Application with _Locator_ and _Manager_ services enabled [source,java] ---- @SpringBootApplication @@ -317,8 +317,8 @@ Running : true Client Connections : 0 ---- -In both scenarios, the Spring Boot configured and bootstrapped Apache Geode (or Pivotal GemFire) server -and the _Gfsh_ _Locator_ and _Server_ formed a cluster. +In both scenarios, the Spring Boot configured and bootstrapped Apache Geode server and the _Gfsh_ _Locator_ and _Server_ +formed a cluster. While you can use either approach and Spring does not care, it is far more convenient to use Spring Boot and your IDE to form a small cluster while developing. By leveraging Spring profiles, it is far simpler and much faster to @@ -342,10 +342,10 @@ TIP: See the Appendix, <> for more de In addition to `ClientCache`, `CacheServer` and peer `Cache` applications, SDG, and by extension SBDG, now supports Locator-based, Spring Boot applications. -An Apache Geode or Pivotal GemFire Locator is a location-based service, or alternatively and more typically, -a standalone process enabling clients to "locate" a cluster of Apache Geode/Pivotal GemFire servers to manage data. -Many cache clients can connect to the same cluster in order to share data. Running multiple clients is common in a -Microservices architecture where you need to scale-up the number of app instances to satisfy the demand. +An Apache Geode Locator is a location-based service, or alternatively and more typically, a standalone process enabling +clients to "locate" a cluster of Apache Geode servers to manage data. Many cache clients can connect to the same cluster +in order to share data. Running multiple clients is common in a Microservices architecture where you need to scale-up +the number of app instances to satisfy the demand. A Locator is also used by joining members of an existing cluster to scale-out and increase capacity of the logically pooled system resources (i.e. Memory, CPU and Disk). A Locator maintains metadata that is sent to the clients to @@ -398,8 +398,8 @@ class SpringBootApacheGeodeLocatorApplication { Instead of using the `@EnableLocator` annotation, you now use the `@LocatorApplication` annotation. The `@LocatorApplication` annotation works in the same way as the `@PeerCacheApplication` and `@CacheServerApplication` -annotations, bootstrapping a Apache Geode or Pivotal GemFire process, overriding the default `ClientCache` instance -provided by SBDG out-of-the-box. +annotations, bootstrapping a Apache Geode process, overriding the default `ClientCache` instance provided by SBDG +out-of-the-box. NOTE: If your `@SpringBootApplication` class is annotated with `@LocatorApplication`, then it can only be a `Locator` and not a `ClientCache`, `CacheServer` or peer `Cache` application. If you need the application to function as a @@ -420,14 +420,14 @@ include::{docs-src-dir}/org/springframework/geode/docs/example/app/locator/Sprin We also need to vary the configuration for each Locator app instance. -Apache Geode and Pivotal GemFire requires each peer member in the cluster to be uniquely named. We can set the name -of the Locator by using the `spring.data.gemfire.locator.name` SDG property set as a JVM System Property in your IDE's -Run Configuration Profile for the application main class like so: `-Dspring.data.gemfire.locator.name=SpringLocatorOne`. -We name the second Locator app instance, "_SpringLocatorTwo_". +Apache Geode requires each peer member in the cluster to be uniquely named. We can set the name of the Locator by using +the `spring.data.gemfire.locator.name` SDG property set as a JVM System Property in your IDE's Run Configuration Profile +for the application main class like so: `-Dspring.data.gemfire.locator.name=SpringLocatorOne`. We name the second +Locator app instance, "_SpringLocatorTwo_". Additionally, we must vary the port numbers that the Locators use to listen for connections. By default, -an Apache Geode or Pivotal GemFire Locator listens on port `10334`. We can set the Locator port using the -`spring.data.gemfire.locator.port` SDG property. +an Apache Geode Locator listens on port `10334`. We can set the Locator port using +the `spring.data.gemfire.locator.port` SDG property. For our first Locator app instance (i.e. "_SpringLocatorOne_"), we also enable the "_manager_" Profile so that we can connect to the Locator using _Gfsh_. @@ -616,17 +616,17 @@ GfshServer | 10.99.199.24(GfshServer:30295):41004 ---- You must be careful to vary the ports and name your peer members appropriately. With Spring, and Spring Boot -for Apache Geode and Pivotal GemFire (SBDG) in particular, it really is that easy! +for Apache Geode (SBDG) in particular, it really is that easy! [[geode-manager-applications]] === Building Manager Applications As discussed in the previous sections above, it is possible to enable a Spring Boot configured and bootstrapped -Apache Geode or Pivotal GemFire peer member node in the cluster to function as a _Manager_. +Apache Geode peer member node in the cluster to function as a _Manager_. -An Apache Geode or Pivotal GemFire _Manager_ is a peer member node in the cluster running the Management Service, -allowing the cluster to be managed and monitored using JMX based tools, like _Gfsh_, _JConsole_ or _JVisualVM_, -for instance. Any tool that uses the JMX API can connect to and manage the GemFire/Geode cluster for whatever purpose. +An Apache Geode _Manager_ is a peer member node in the cluster running the Management Service, allowing the cluster +to be managed and monitored using JMX based tools, like _Gfsh_, _JConsole_ or _JVisualVM_, for instance. Any tool +that uses the JMX API can connect to and manage the GemFire/Geode cluster for whatever purpose. The cluster may have more than 1 _Manager_ for redundancy. Only server-side, peer member nodes in the cluster may function as a _Manager_. Therefore, a `ClientCache` application cannot be a _Manager_. @@ -683,8 +683,8 @@ TIP: See the `@EnableManager` annotation for additional configuration options. As of Apache Geode 1.11.0, you must now include additional Geode dependencies on your Spring Boot application classpath -to make your application a proper Apache Geode/Pivotal GemFire _Manager_ in the cluster, particularly if you are also -enabling the embedded HTTP service in the _Manager_. +to make your application a proper Apache Geode _Manager_ in the cluster, particularly if you are also enabling +the embedded HTTP service in the _Manager_. The required dependencies are: diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/cloudfoundry.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/cloudfoundry.adoc index 5868d222a..14879042b 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/cloudfoundry.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/cloudfoundry.adoc @@ -6,7 +6,7 @@ In most cases, when you "_push_" (i.e. "_deploy_") your Spring Boot applications you will bind your app to 1 or more instances of the Pivotal Cloud Cache (PCC) service. In a nutshell, {pivotal-cloudcache-website}[Pivotal Cloud Cache] is a managed version of -{pivotal-gemfire-website}[Pivotal GemFire] running in {pivotal-cloudfoundry-website}[Pivotal CloudFoundry]. +{pivotal-gemfire-website}[VMware Tanzu GemFire] running in {pivotal-cloudfoundry-website}[Pivotal CloudFoundry]. When running in or across cloud environments (e.g. AWS, Azure, GCP or PWS), PCC with PCF offers several advantages over trying to run and manage your own standalone Apache Geode or Pivotal GemFir clusters. It handles many of the infrastructure-related, operational concerns so you do not have to. @@ -34,12 +34,12 @@ the `@EnableClusterConfiguration` annotation: ---- @SpringBootApplication @EnableClusterConfiguration(useHttp = true) -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- With `@EnableClusterConfiguration`, Region and OQL Index configuration metadata defined on the client can be sent to -servers in the PCC cluster. Apache Geode and Pivotal GemFire requires matching Regions by name on both the client -and servers in order for clients to send and receive data to and from the cluster. +servers in the PCC cluster. Apache Geode requires matching Regions by name on both the client and servers in order for +clients to send and receive data to and from the cluster. For example, when you declare the Region where an application entity will be persisted using the `@Region` mapping annotation and additionally declare the `@EnableEntityDefinedRegions` annotation on the main `@SpringBootApplication` @@ -82,7 +82,6 @@ Configuration metadata for the PCC service instance might appear as follows: "password": "*****", "roles": [ "developer" ], "username": "developer_user" - }, }, { "password": "*****", "roles": [ "read-only-user" ], @@ -97,7 +96,6 @@ Configuration metadata for the PCC service instance might appear as follows: } } }, - ... "name": "jblum-pcc", "plan": "small", "tags": [ "gemfire", "cloudcache", "database", "pivotal" ] @@ -122,9 +120,9 @@ TIP: The `spring.data.gemfire.security.username` property corresponds directly t See the {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableSecurity.html#securityUsername--[Javadoc] for more details. -The `spring.data.gemfire.security.username` property is the same property used by Spring Data for Apache Geode -and Pivotal GemFire (SDG) to configure the runtime user of your Spring Data application when connecting to either -an externally managed Apache Geode or Pivotal GemFire cluster. +The `spring.data.gemfire.security.username` property is the same property used by Spring Data for Apache Geode (SDG) +to configure the runtime user of your Spring Data application when connecting to either an externally managed +Apache Geode cluster. In this case, SBDG simply uses the configured username to lookup the authentication credentials of the user to set the username and password used by the Spring Boot, `ClientCache` app when connecting to PCC while running in PCF. @@ -164,9 +162,9 @@ will not be extracted from the environment. It is possible to provision multiple instances of the Pivotal Cloud Cache service in your Pivotal CloudFoundry environment. You can then bind multiple PCC service instances to your Spring Boot app. -However, Spring Boot for Apache Geode & Pivotal GemFire (SBDG) will only auto-configure 1 PCC service instance for your -Spring Boot application. This does not mean it is not possible to use multiple PCC service instances with your -Spring Boot app, just that SBDG only "_auto-configures_" 1 service instance for you. +However, Spring Boot for Apache Geode (SBDG) will only auto-configure 1 PCC service instance for your Spring Boot +application. This does not mean it is not possible to use multiple PCC service instances with your Spring Boot app, +just that SBDG only "_auto-configures_" 1 service instance for you. You must select which PCC service instance your Spring Boot app will auto-configure for you automatically when you have multiple instances and want to target a specific PCC service instance to use. @@ -211,7 +209,7 @@ The configuration would be similar to the following: @EnablePool(name = "PccN") }) class PccConfiguration { - ... + // ... } ---- @@ -267,11 +265,10 @@ as discussed <>. === Hybrid Pivotal CloudFoundry & Apache Geode Spring Boot Applications Sometimes, it is desirable to deploy (i.e. "_push_") and run your Spring Boot applications in Pivotal CloudFoundry, -but still connect your Spring Boot applications to an externally managed, standalone Apache Geode or Pivotal GemFire -cluster. +but still connect your Spring Boot applications to an externally managed, standalone Apache Geode cluster. -Spring Boot for Apache Geode & Pivotal GemFire (SBDG) makes this a non-event and honors its "_little to no code -or configuration changes necessary_" goal, regardless of your runtime choice, "_it should just work!_" +Spring Boot for Apache Geode (SBDG) makes this a non-event and honors its "_little to no code or configuration changes +necessary_" goal, regardless of your runtime choice, "_it should just work!_" To help guide you through this process, we will cover the following topics: @@ -294,7 +291,7 @@ can be bound and used by your Spring Boot application to accomplish its tasks. However, PCF Dev lacks the Pivotal Cloud Cache (PCC) service that is available in PCF. This is actually ideal for this little exercise since we are trying to build and run Spring Boot applications in a PCF environment -but connect to an externally managed, standalone Apache Geode or Pivotal GemFire cluster. +but connect to an externally managed, standalone Apache Geode cluster. As a prerequisite, you will need to follow the steps outlined in the https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry-dev/introduction[tutorial] @@ -486,8 +483,8 @@ Now that we have PCF Dev and a small Apache Geode cluster up and running, it is to the external, standalone Apache Geode cluster that we started in <>. As mentioned, PCF Dev offers the MySQL, Redis and RabbitMQ services out-of-the-box. However, to use Apache Geode -(or Pivotal GemFire) in the same capacity as you would Pivotal Cloud Cache when running in a production-grade, -PCF environment, you need to create a User-Provided Service for the standalone Apache Geode cluster. +in the same capacity as you would Pivotal Cloud Cache when running in a production-grade, PCF environment, you need +to create a User-Provided Service for the standalone Apache Geode cluster. To do so, execute the following `cf` CLI command: @@ -757,8 +754,8 @@ Rows : 1 There you have it! -The ability to deploy Spring Boot, Apache Geode or Pivotal GemFire `ClientCache` applications to Pivotal CloudFoundry, -yet connect your app to a externally managed, standalone Apache Geode or Pivotal GemFire cluster. +The ability to deploy Spring Boot, Apache Geode `ClientCache` applications to Pivotal CloudFoundry, yet connect your app +to a externally managed, standalone Apache Geode cluster. Indeed, this is will be a useful arrangement and stepping stone for many users as they begin their journey towards a Cloud-Native platform like Pivotal CloudFoundry (PCF) and using services like Pivotal Cloud Cache (PCC). diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-annotations.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-annotations.adoc index 9306affb3..35fc17204 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-annotations.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-annotations.adoc @@ -1,31 +1,30 @@ [[geode-auto-configuration-annotations]] == Auto-configuration vs. Annotation-based configuration -The question most often asked is, "_What Spring Data for Apache Geode/Pivotal GemFire annotations can I use, -or must I use, when developing Apache Geode or Pivotal GemFire applications with Spring Boot?_" +The question most often asked is, "_What Spring Data for Apache Geode annotations can I use, or must I use, +when developing Apache Geode applications with Spring Boot?_" This section will answer this question and more. -Readers should refer to the complimentary sample, link:guides/boot-configuration.html[Spring Boot Auto-configuration for Apache Geode & Pivotal GemFire], -which showcases the _auto-configuration_ provided by Spring Boot for Apache Geode/Pivotal GemFire in action. +Readers should refer to the complimentary sample, link:guides/boot-configuration.html[Spring Boot Auto-configuration for Apache Geode], +which showcases the _auto-configuration_ provided by Spring Boot for Apache Geode in action. [[geode-autoconfiguration-annotations-background]] === Background To help answer this question, we must start by reviewing the complete collection of available -Spring Data for Apache Geode/Pivotal GemFire (SDG) annotations. These annotations are provided in the +Spring Data for Apache Geode (SDG) annotations. These annotations are provided in the {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/package-summary.html[org.springframework.data.gemfire.config.annotation] package. Most of the pertinent annotations begin with `@Enable...`, except for the base annotations: `@ClientCacheApplication`, `@PeerCacheApplication` and `@CacheServerApplication`. -By extension, Spring Boot for Apache Geode/Pivotal GemFire (SBDG) builds on SDG's Annotation-based configuration model -to implement _auto-configuration_ and apply Spring Boot's core concepts, like "_convention over configuration_", -enabling GemFire/Geode applications to be built with Spring Boot reliably, quickly and easily. +By extension, Spring Boot for Apache Geode (SBDG) builds on SDG's Annotation-based configuration model to implement +_auto-configuration_ and apply Spring Boot's core concepts, like "_convention over configuration_", enabling Apache +Geode applications to be built with Spring Boot reliably, quickly and easily. SDG provides this Annotation-based configuration model to, first and foremost, give application developers "_choice_" -when building Spring applications using either Apache Geode or Pivotal GemFire. SDG makes no assumptions about what -application developers are trying to do and fails fast anytime the configuration is ambiguous, giving users immediate -feedback. +when building Spring applications using Apache Geode. SDG makes no assumptions about what application developers are +trying to do and fails fast anytime the configuration is ambiguous, giving users immediate feedback. Second, SDG's Annotations were meant to get application developers up and running quickly and reliably with ease. SDG accomplishes this by applying sensible defaults so application developers do not need to know, or even have to learn, @@ -84,8 +83,8 @@ By default, SBDG provides you with a `ClientCache` instance. Technically, SBDG an auto-configuration class with `@ClientCacheApplication`, internally. It is by convention that we assume most application developers' will be developing Spring Boot applications -using Apache Geode or Pivotal GemFire as "client" applications in GemFire/Geode's client/server topology. This is -especially true as users migrate their applications to a managed environment, such as Pivotal CloudFoundry (PCF) +using Apache Geode as "client" applications in GemFire/Geode's client/server topology. This is especially true +as users migrate their applications to a managed environment, such as Pivotal CloudFoundry (PCF) using Pivotal Cloud Cache (PCC). Still, users are free to "override" the default settings and declare their Spring applications to be actual peer `Cache` @@ -97,7 +96,7 @@ For example: ---- @SpringBootApplication @CacheServerApplication -class MySpringBootPeerCacheServerApplication { ... } +class MySpringBootPeerCacheServerApplication { } ---- By declaring the `@CacheServerApplication` annotation, you effectively override the SBDG default. Therefore, SBDG @@ -220,7 +219,7 @@ You can do that by defining each Region explicitly, or more conveniently, you ca ---- @SpringBootApplication @EnableCachingDefinedRegions -class Application { ... } +class Application { } ---- `@EnableCachingDefinedRegions` is optional, provided for convenience, and complimentary to caching when used @@ -275,7 +274,7 @@ class GemFireFunctions { @GemfireFunction Object exampleFunction(Object arg) { - ... + // ... } } ---- diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-declarative.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-declarative.adoc index 406dd466b..9257941cc 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-declarative.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-declarative.adoc @@ -36,11 +36,11 @@ Now, that we explained the motivation behind this chapter, let's outline what we * Refer you to the SDG _Annotations_ covered by SBDG's _Auto-configuration_ * List all SDG _Annotations_ not covered by SBDG's _Auto-configuration_ * Cover the SBDG, SSDG and SDG _Annotations_ that must be declared explicitly and that provide the most value and productivity -when getting started using either Apache Geode or Pivotal GemFire in Spring [Boot] applications. +when getting started using Apache Geode in Spring [Boot] applications. -NOTE: SDG refers to {spring-data-geode-website}[Spring Data for Apache Geode & Pivotal GemFire]. SSDG refers to -{spring-session-data-gemfire-website}[Spring Session for Apache Geode & Pivotal GemFire] and SBDG refers to -_Spring Boot for Apache Geode & Pivotal GemFire_, this project. +NOTE: SDG refers to {spring-data-geode-website}[Spring Data for Apache Geode]. SSDG refers to +{spring-session-data-gemfire-website}[Spring Session for Apache Geode] and SBDG refers to +_Spring Boot for Apache Geode_, this project. TIP: The list of SDG _Annotations_ covered by SBDG's _Auto-configuration_ is discussed in detail in the <>, in the section, <>. @@ -134,7 +134,7 @@ Still, all of these _Annotations_ are available for the application developer to === Productivity Annotations This section calls out the _Annotations_ we believe to be most beneficial for your application development purposes -when using either Apache Geode or Pivotal GemFire in Spring Boot applications. +when using Apache Geode in Spring Boot applications. [[geode-configuration-declarative-annotations-productivity-enableclusteraware]] ==== `@EnableClusterAware` (SBDG) @@ -148,14 +148,14 @@ When you annotate your main `@SpringBootApplication` class with `@EnableClusterA ---- @SpringBootApplication @EnableClusterAware -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- Your Spring Boot, Apache Geode `ClientCache` application is able to seamlessly switch between client/server and local-only topologies with no code or configuration changes. -When a cluster of Apache Geode or Pivotal GemFire servers is detected, the client application will send and receive data -to and from the cluster. If a cluster is not available, then the client automatically switches to storing data locally +When a cluster of Apache Geode servers is detected, the client application will send and receive data to and from +the cluster. If a cluster is not available, then the client automatically switches to storing data locally on the client using `LOCAL` Regions. Additionally, the `@EnableClusterAware` annotation is meta-annotated with SDG's @@ -228,9 +228,9 @@ For example, given: @Service class CustomerService { - @Cacheable("CustomersByAccountNumber" key="#account.number") + @Cacheable(cacheName = "CustomersByAccountNumber", key="#account.number") Customer findBy(Account account) { - ... + // ... } } ---- @@ -242,7 +242,7 @@ When your main `@SpringBootApplication` class is annotated with `@EnableCachingD ---- @SpringBootApplication @EnableCachingDefineRegions -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- Then, SBDG would create a client `PROXY` Region (or `PARTITION_REGION` if your application were a peer member of the @@ -276,7 +276,6 @@ class Customer { @Indexed private String name; - ... } ---- @@ -290,7 +289,7 @@ the main `@SpringBootApplication` class is annotated with `@EnableEntityDefinedR @SpringBootApplication @EnableEntityDefinedRegions(basePackageClasses = Customer.class, clientRegionShortcut = ClientRegionShortcut.CACHING_PROXY) -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- Like the `@EnableCachingDefinedRegions` annotation, you can set the client and server Region data management policy @@ -339,7 +338,7 @@ Then, you could configure the `@EnableEntityDefinedRegions` as follows: ---- @SpringBootApplication @EnableEntityDefinedRegions(basePackageClasses = { NonEntity.class, Account.class } ) -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- If `Customer`, `Address`, `PhoneNumber` and `Account` were all entity classes properly annotated with `@Region`, then @@ -365,7 +364,7 @@ This is as simple as annotating your main `@SpringBootApplication` class with `@ ---- @SpringBootApplication @EnableClusterDefinedRegions -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- Every Region that exists on the cluster of servers will have a corresponding `PROXY` Region defined and created on the @@ -389,8 +388,9 @@ class SomeApplicationComponent { this.serverRegion.put(1, entity); - ... + // ... } +} ---- Of course, SBDG _auto-configures_ a `GemfireTemplate` for the "_ServerRegion_" Region (as described <>), @@ -413,8 +413,9 @@ class SomeApplicationComponent { this.serverRegionTemplate.put(1, entity); - ... + // ... } +} ---- TIP: Refer to the SDG Reference Guide on {spring-data-geode-docs-html}/#bootstrap-annotation-config-region-cluster-defined[Configuring Cluster-defined Regions] @@ -449,7 +450,6 @@ class Customer { @Indexed private String name; - ... } ---- @@ -461,14 +461,14 @@ As a result, when our main `@SpringBootApplication` class is annotated with `@En @SpringBootApplication @EnableEntityDefinedRegions(basePackageClasses = Customer.class) @EnableIndexing -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- An Apache Geode OQL Index for the `Customer.name` field will be created thereby making OQL Queries on Customers by name use this Index. -NOTE: Keep in mind that OQL Indexes are not persistent between restarts (i.e. Apache Geode & Pivotal GemFire -maintains Indexes in-memory only). An OQL Index is always rebuilt when the node is restarted. +NOTE: Keep in mind that OQL Indexes are not persistent between restarts (i.e. Apache Geode maintains Indexes +in-memory only). An OQL Index is always rebuilt when the node is restarted. When you combine `@EnableIndexing` with either `@EnableClusterConfiguration` or `@EnableClusterAware`, then the Index definitions will be pushed to the server-side Regions where OQL Queries are generally executed. @@ -479,10 +479,10 @@ for more details. [[geode-configuration-declarative-annotations-productivity-enableexpiration]] ==== `@EnableExpiration` (SDG) -It is often useful to define both _Eviction_ and _Expiration_ policies, particularly with a system like Apache Geode -or Pivotal GemFire, especially given it primarily keeps data in-memory, on the JVM Heap. As you can imagine your data -volume size may far exceed the amount of available JVM Heap memory and/or keeping too much data on the JVM Heap -can cause Garbage Collection (GC) issues. +It is often useful to define both _Eviction_ and _Expiration_ policies, particularly with a system like Apache Geode, +especially given it primarily keeps data in-memory, on the JVM Heap. As you can imagine your data volume size may far +exceed the amount of available JVM Heap memory and/or keeping too much data on the JVM Heap can cause Garbage Collection +(GC) issues. TIP: You can enable off-heap (or main memory usage) capabilities by declaring SDG's `@EnableOffHeap` annotation. Refer to the SDG Reference Guide on {spring-data-geode-docs-html}/#bootstrap-annotation-config-region-off-heap[Configuring Off-Heap Memory] @@ -521,7 +521,6 @@ class Customer { @Indexed private String name; - ... } ---- @@ -535,7 +534,7 @@ with `@EnableExpiration`: ---- @SpringBootApplication @EnableExpiration -class SpringBootApacheGeodeApplication { ... } +class SpringBootApacheGeodeApplication { } ---- NOTE: Technically, this entity class specific Annotation-based Expiration policy is implemented using Apache Geode's @@ -551,23 +550,22 @@ TIP: Refer to the SDG Reference Guide for more details on _Software Testing_ in general, and _Unit Testing_ in particular, are a very important development tasks to ensure the quality of your Spring Boot applications. -Apache Geode and Pivotal GemFire can make testing difficult in some cases, especially when tests have to be written as -_Integration Tests_ in order to assert the correct behavior. This can be very costly and lengthens the feedback cycle. -Fortunately, it is possible to write _Unit Tests_ as well! +Apache Geode can make testing difficult in some cases, especially when tests have to be written as _Integration Tests_ +in order to assert the correct behavior. This can be very costly and lengthens the feedback cycle. Fortunately, it is +possible to write _Unit Tests_ as well! -Spring has your back and once again provides a framework for testing Spring Boot applications using either Apache Geode -or Pivotal GemFire. This is where the {spring-test-data-gemfire-website}[Spring Test for Apache Geode & Pivotal GemFire (STDG)] project -can help, particularly with _Unit Testing_. +Spring has your back and once again provides a framework for testing Spring Boot applications using either Apache Geode. +This is where the {spring-test-data-gemfire-website}[Spring Test for Apache Geode(STDG)] project can help, particularly +with _Unit Testing_. -For example, if you do not care what Apache Geode or Pivotal GemFire would actually do in certain cases and only care -about the "contract", which is what mocking a collaborator is all about, then you could effectively mock Apache Geode -or Pivotal GemFire's objects in order to isolate the "_Subject Under Test_" (SUT) and focus on the interaction(s) -or outcomes you expect to happen. +For example, if you do not care what Apache Geode would actually do in certain cases and only care about the "contract", +which is what mocking a collaborator is all about, then you could effectively mock Apache Geode's objects in order to +isolate the "_Subject Under Test_" (SUT) and focus on the interaction(s) or outcomes you expect to happen. With STDG, you don't have to change a bit of configuration to enable mocks in the _Unit Tests_ for your Spring Boot applications. You simply only need to annotate the test class with `@EnableGemFireMockObjects`, like so: -.Using Mock Apache Geode or Pivotal GemFire objects +.Using Mock Apache Geode objects [source,java] ---- @RunWith(SpringRunner.class) @@ -576,7 +574,7 @@ class MyApplicationTestClass { @Test public void someTestCase() { - ... + // ... } @Configuration @@ -588,8 +586,8 @@ class MyApplicationTestClass { Your Spring Boot configuration of Apache Geode will return mock objects for all Apache Geode objects, such as Regions. -Mocking Apache Geode or Pivotal GemFire objects even works for GemFire/Geode objects created from the productivity -annotations discussed in the previous sections above. +Mocking Apache Geode objects even works for GemFire/Geode objects created from the productivity annotations discussed in +the previous sections above. For example, given the following Spring Boot, Apache Geode `ClientCache` application class: @@ -598,14 +596,14 @@ For example, given the following Spring Boot, Apache Geode `ClientCache` applica ---- @SpringBootApplication @EnableEntityDefinedRegions(basePackageClasses = Customer.class) -class SpringBootApacheGeodeClientCacheApplication { ... } +class SpringBootApacheGeodeClientCacheApplication { } ---- The "_Customers_" Region defined by the `Customer` entity class and created by the `@EnableEntityDefinedRegions` annotation would be a "mock" Region and not an actual Region. You can still inject the Region in your test as before and assert interactions on the Region based on your application workflows: -.Using Mock Apache Geode or Pivotal GemFire objects +.Using Mock Apache Geode objects [source,java] ---- @RunWith(SpringRunner.class) @@ -624,10 +622,10 @@ class MyApplicationTestClass { assertThat(this.customers).containsValue(jonDoe); - ... + // ... } - ... + // ... } ---- diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-externalized.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-externalized.adoc index 28e21320b..b8786fb69 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-externalized.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-externalized.adoc @@ -2,7 +2,7 @@ == Externalized Configuration Like Spring Boot itself (see {spring-boot-docs-html}/boot-features-external-config.html[here]), -Spring Boot for Apache Geode and Pivotal GemFire (SBDG) supports externalized configuration. +Spring Boot for Apache Geode (SBDG) supports externalized configuration. By externalized configuration, we mean configuration metadata stored in a Spring Boot {spring-boot-docs-html}/boot-features-external-config.html#boot-features-external-config-application-property-files[`application.properties` file], @@ -15,14 +15,13 @@ in properties, {spring-boot-docs-html}/boot-features-external-config.html#boot-f properties, and so on. What we are particularly interested in, in this section, is {spring-boot-docs-html}/boot-features-external-config.html#boot-features-external-config-typesafe-configuration-properties[type-safety]. -Like Spring Boot, Spring Boot for Apache Geode & Pivotal GemFire provides a hierarchy of classes used to capture -configuration for several Apache Geode or Pivotal GemFire features in an associated `@ConfigurationProperties` -annotated class. Again, the configuration metadata is specified as well-known, documented properties in 1 or more -Spring Boot `application.properties` files. +Like Spring Boot, Spring Boot for Apache Geode provides a hierarchy of classes used to capture configuration for several +Apache Geode features in an associated `@ConfigurationProperties` annotated class. Again, the configuration metadata is +specified as well-known, documented properties in 1 or more Spring Boot `application.properties` files. For instance, I may have configured my Spring Boot, `ClientCache` application as follows: -.Spring Boot `application.properties` containing Spring Data properties for Apache Geode / Pivotal GemFire +.Spring Boot `application.properties` containing Spring Data properties for Apache Geode [source,properties] ---- # Spring Boot application.properties used to configure Apache Geode @@ -84,14 +83,12 @@ class MyApplicationComponent { // do something with `copyOnRead` } - - ... } ---- Given a handle to {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/configuration/GemFireProperties.html[`GemFireProperties`], -you can access any of the configuration properties used to configure either Apache Geode or Pivotal GemFire in -a Spring context. You simply only need to autowire an instance of `GemFireProperties` into your application component. +you can access any of the configuration properties used to configure Apache Geode in a Spring context. You simply only +need to autowire an instance of `GemFireProperties` into your application component. A complete reference to the SBDG provided `@ConfigurationProperties` classes and supporting classes is available {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/configuration/package-frame.html[here]. @@ -99,8 +96,8 @@ A complete reference to the SBDG provided `@ConfigurationProperties` classes and [[geode-configuration-externalized-session]] === Externalized Configuration of Spring Session -The same capability applies to accessing the externalized configuration of Spring Session when using either -Apache Geode or Pivotal GemFire as your (HTTP) Session state caching provider. +The same capability applies to accessing the externalized configuration of Spring Session when using Apache Geode +as your (HTTP) Session state caching provider. In this case, you simply only need to acquire a reference to an instance of the {spring-boot-data-geode-javadoc}/org/springframework/geode/boot/autoconfigure/configuration/SpringSessionProperties.html[`SpringSessionProperties`] @@ -135,7 +132,5 @@ class MyApplicationComponent { // do something with `sessionRegionName` } - - ... } ---- diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-properties.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-properties.adoc index 13686a4c9..98456b711 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/configuration-properties.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/configuration-properties.adoc @@ -2,11 +2,11 @@ == Configuration Metadata Reference The following 2 reference sections cover documented and well-known properties recognized and processed by -_Spring Data for Apache Geode/Pivotal GemFire_ (SDG) as well as _Spring Session for Apache Geode/Pivotal GemFire_ (SSDG). +_Spring Data for Apache Geode/_ (SDG) as well as _Spring Session for Apache Geode_ (SSDG). These properties may be used in Spring Boot `application.properties` files, or as JVM System properties, to configure -different aspects of or enable individual features of Apache Geode or Pivotal GemFire in a Spring application. -When combined with the power of Spring Boot, magical things begin to happen. +different aspects of or enable individual features of Apache Geode in a Spring application. When combined with +the power of Spring Boot, magical things begin to happen. [[geode-configuration-metadata-springdata]] === Spring Data Based Properties @@ -20,7 +20,7 @@ property, use `spring.data.gemfire.cache.copy-on-read` in Spring Boot `applicati |===================================================================================================================== | Name | Description | Default | From -| name | Name of the Apache Geode / Pivotal GemFire member. | SpringBasedCacheClientApplication | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#name--[ClientCacheApplication.name] +| name | Name of the Apache Geode member. | SpringBasedCacheClientApplication | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#name--[ClientCacheApplication.name] | locators | Comma-delimited list of Locator endpoints formatted as: locator1[port1],...,locatorN[portN]. | [] | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/PeerCacheApplication.html#locators--[PeerCacheApplication.locators] | use-bean-factory-locator | Enable the SDG BeanFactoryLocator when mixing Spring config with GemFire/Geode native config (e.g. cache.xml) and you wish to configure GemFire objects declared in cache.xml with Spring. | false | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#useBeanFactoryLocator--[ClientCacheApplication.useBeanFactoryLocator] @@ -38,7 +38,7 @@ property, use `spring.data.gemfire.cache.copy-on-read` in Spring Boot `applicati | cache.enable-auto-region-lookup | Configure whether to lookup Regions configured in GemFire/Geode native config and declare them as Spring beans. | false | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableAutoRegionLookup.html#enabled--[EnableAutoRegionLookup.enable] | cache.eviction-heap-percentage | Percentage of heap at or above which the eviction should begin on Regions configured for HeapLRU eviction. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#evictionHeapPercentage--[ClientCacheApplication.evictionHeapPercentage] | cache.eviction-off-heap-percentage | Percentage of off-heap at or above which the eviction should begin on Regions configured for HeapLRU eviction. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#evictionOffHeapPercentage--[ClientCacheApplication.evictionOffHeapPercentage] -| cache.log-level | Configure the log-level of an Apache Geode / Pivotal GemFire cache. | config | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#logLevel--[ClientCacheApplication.logLevel] +| cache.log-level | Configure the log-level of an Apache Geode cache. | config | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#logLevel--[ClientCacheApplication.logLevel] | cache.name | Alias for 'spring.data.gemfire.name'. | SpringBasedCacheClientApplication | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html#name--[ClientCacheApplication.name] | cache.compression.bean-name | Name of a Spring bean implementing org.apache.geode.compression.Compressor. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableCompression.html#compressorBeanName--[EnableCompression.compressorBeanName] | cache.compression.region-names | Comma-delimited list of Region names for which compression will be configured. | [] | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableCompression.html#regionNames--[EnableCompression.regionNames] @@ -188,7 +188,7 @@ specified location and limited to the defined size. |===================================================================================================================== | Name | Description | Default | From -| logging.level | Configures the log-level of an Apache Geode / Pivotal GemFire cache; Alias for 'spring.data.gemfire.cache.log-level'. | config | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html#logLevel--[EnableLogging.logLevel] +| logging.level | Configures the log-level of an Apache Geode cache; Alias for 'spring.data.gemfire.cache.log-level'. | config | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html#logLevel--[EnableLogging.logLevel] | logging.log-disk-space-limit | Configures the amount of disk space allowed to store log files. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html#logDiskSpaceLimit--[EnableLogging.logDiskSpaceLimit] | logging.log-file | Configures the pathname of the log file used to log messages. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html#logFile--[EnableLogging.logFile] | logging.log-file-size | Configures the maximum size of a log file before the log file is rolled. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html#logFileSizeLimit--[EnableLogging.logFileSize] @@ -328,7 +328,7 @@ specified location and limited to the defined size. | service.http.bind-address | Configures the IP address or hostname of the system NIC used by the embedded HTTP server to bind and listen for HTTP(S) connections. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableHttpService.html#bindAddress--[EnableHttpService.bindAddress] | service.http.port | Configures the port used by the embedded HTTP server to listen for HTTP(S) connections. | 7070 | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableHttpService.html#port--[EnableHttpService.port] | service.http.ssl-require-authentication | Configures whether 2-way HTTP authentication is required. | false | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableHttpService.html#sslRequireAuthentication--[EnableHttpService.sslRequireAuthentication] -| service.http.dev-rest-api-start | Configures whether to start the Developer REST API web service. A full installation of Apache Geode or Pivotal GemFire is required and you must set the $GEODE environment variable. | false | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableHttpService.html#startDeveloperRestApi--[EnableHttpService.startDeveloperRestApi] +| service.http.dev-rest-api-start | Configures whether to start the Developer REST API web service. A full installation of Apache Geode is required and you must set the $GEODE environment variable. | false | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableHttpService.html#startDeveloperRestApi--[EnableHttpService.startDeveloperRestApi] | service.memcached.port | Configures the port of the embedded Memcached server (service). | 11211| {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableMemcachedServer.html#port--[EnableMemcachedServer.port] | service.memcached.protocol | Configures the protocol used by the embedded Memcached server (service). | ASCII | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableMemcachedServer.html#protocol--[EnableMemcachedServer.protocol] | service.redis.bind-address | Configures the IP address or hostname of the system NIC used by the embedded Redis server to bind an listen for connections. | | {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableRedisServer.html#bindAddress--[EnableRedis.bindAddress] @@ -366,6 +366,5 @@ While it is not recommended to use Apache Geode properties directly in your Spri you from doing so. A complete reference to the Apache Geode specific properties can be found {apache-geode-docs}/reference/topics/gemfire_properties.html[here]. -WARNING: Apache Geode (and Pivotal GemFire) are very strict about the properties that maybe specified in -a `gemfire.properties` file. You cannot mix Spring properties with `gemfire.*` properties in an Apache Geode -or Pivotal GemFire, `gemfire.properties` file. +WARNING: Apache Geode is very strict about the properties that maybe specified in a `gemfire.properties` file. You +cannot mix Spring properties with `gemfire.*` properties in an Apache Geode `gemfire.properties` file. diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/continuous-query.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/continuous-query.adoc index 9d2fd3d54..fe592cb8c 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/continuous-query.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/continuous-query.adoc @@ -5,21 +5,20 @@ Arguably, the most invaluable of applications are those that can process a strea and intelligently react in near real-time to the countless changes in the data over time. The most useful of frameworks are those that can make processing a stream of events as they happen, as easy as possible. -Spring Boot for Apache Geode & Pivotal GemFire does just that, without users having to perform any complex setup -or configure any necessary infrastructure components to enable such functionality. Developers can simply define -the criteria for the data they are interested in and implement a handler to process the stream of events -as they occur. +Spring Boot for Apache Geode does just that, without users having to perform any complex setup or configure any +necessary infrastructure components to enable such functionality. Developers can simply define the criteria for +the data they are interested in and implement a handler to process the stream of events as they occur. -Apache Geode & Pivotal GemFire make defining criteria for data of interests easy when using +Apache Geode make defining criteria for data of interests easy when using {apache-geode-docs}/developing/continuous_querying/chapter_overview.html[Continuous Query (CQ)]. With CQ, you can -express the criteria matching the data of interests using a query predicate. Apache Geode & Pivotal GemFire implements +express the criteria matching the data of interests using a query predicate. Apache Geode implements the {apache-geode-docs}/developing/querying_basics/query_basics.html[Object Query Language (OQL)] for defining and executing queries. OQL is not unlike SQL, and supports projections, query predicates, ordering and aggregates. And, when used in CQs, they execute continuously, firing events when the data changes in such ways as to match the criteria expressed in the query predicate. -Spring Boot for Apache Geode/Pivotal GemFire combines the ease of expressing interests in data using an OQL -query statement with implementing the listener handler callback, in 1 easy step. +Spring Boot for Apache Geode combines the ease of expressing interests in data using an OQL query statement with +implementing the listener handler callback, in 1 easy step. For example, suppose we want to perform some follow up action anytime a customer's financial loan application is either approved or denied. @@ -38,7 +37,7 @@ class EligibilityDecision { private final Timespan timespan; - ... + // ... enum Status { @@ -64,7 +63,7 @@ class EligibilityDecisionPostProcessor { FROM /EligibilityDecisions decisions WHERE decisions.getStatus().name().equalsIgnoreCase('APPROVED')") public void processApprovedDecisions(CqEvent event) { - ... + // ... } @ContinuousQuery(name = "DeniedDecisionsHandler", @@ -72,7 +71,7 @@ class EligibilityDecisionPostProcessor { FROM /EligibilityDecisions decisions WHERE decisions.getStatus().name().equalsIgnoreCase('DENIED')") public void processDeniedDecisions(CqEvent event) { - ... + // ... } } ---- @@ -83,6 +82,5 @@ anyway you like. And, because our Continuous Query handler class is a component `ApplicationContext`, you can auto-wire any other beans necessary to carry out the application's intended function. This is not unlike Spring's {spring-framework-docs}/integration.html#jms-annotated[Annotation-driven listener endpoints] -used in (JMS) message listeners/handlers, except in Spring Boot for Apache Geode/Pivotal GemFire, you do not need to do -anything special to enable this functionality. Just declare the `@ContinuousQuery` annotation on any POJO method -and off you go. +used in (JMS) message listeners/handlers, except in Spring Boot for Apache Geode, you do not need to do anything special +to enable this functionality. Just declare the `@ContinuousQuery` annotation on any POJO method and off you go. diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/data-serialization.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/data-serialization.adoc index b779d9441..55ac19cc6 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/data-serialization.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/data-serialization.adoc @@ -2,26 +2,26 @@ == Data Serialization with PDX Anytime data is overflowed or persisted to disk, transferred between clients and servers, peers in a cluster or between -different clusters in a multi-site topology, then all data stored in Apache Geode/Pivotal GemFire must be serializable. +different clusters in a multi-site topology, then all data stored in Apache Geode must be serializable. To serialize objects in Java, object types must implement the `java.io.Serializable` interface. However, if you have a large number of application domain object types that currently do not implement `java.io.Serializable`, then refactoring hundreds or even thousands of class types to implement `Serializable` would be a tedious task just to -store and manage those objects in Apache Geode or Pivotal GemFire. +store and manage those objects in Apache Geode. Additionally, it is not just your application domain object types you necessarily need to worry about either. If you used 3rd party libraries in your application domain model, any types referred to by your application domain object types -stored in Apache Geode or Pivotal GemFire must be serializable too. This type explosion may bleed into class types -for which you may have no control over. +stored in Apache Geode must be serializable too. This type explosion may bleed into class types for which you may have +no control over. Furthermore, Java serialization is not the most efficient format given that meta-data about your types is stored with the data itself. Therefore, even though Java serialized bytes are more descriptive, it adds a great deal of overhead. -Then, along came serialization using Apache Geode or Pivotal GemFire's {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX] +Then, along came serialization using Apache Geode {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX] format. PDX stands for _Portable Data Exchange_, and achieves 4 goals: -1. Separates type meta-data from the data itself making the bytes more efficient during transfer. Apache Geode -and Pivotal GemFire maintain a type registry storing type meta-data about the objects serialized using PDX. +1. Separates type meta-data from the data itself making the bytes more efficient during transfer. Apache Geode maintains +a type registry storing type meta-data about the objects serialized using PDX. 2. Supports versioning as your application domain types evolve. It is not uncommon to have old and new applications deployed to production, running simultaneously, sharing data, and possibly using different versions of the same domain @@ -50,7 +50,7 @@ de-serializing the object bytes since it involves a method invocation, which def preserving format to avoid the cost of de/serialization. However, we think the benefits of using PDX greatly outweigh the limitations and therefore have enabled PDX by default -when using Spring Boot for Apache Geode/Pivotal GemFire. +when using Spring Boot for Apache Geode. There is nothing special you need to do. Simply code your types and rest assured that objects of those types will be properly serialized when overflowed/persisted to disk, transferred between clients and servers, or peers in a cluster @@ -61,17 +61,17 @@ and even when data is transferred over the WAN when using GemFire/Geode's multi- ---- @Region("EligibilityDecisions") class EligibilityDecision { - ... + // ... } ---- -TIP: Apache Geode/Pivotal GemFire does {apache-geode-docs}/developing/data_serialization/java_serialization.html[support] -the standard Java Serialization format. +TIP: Apache Geode does {apache-geode-docs}/developing/data_serialization/java_serialization.html[support] the standard +Java Serialization format. === SDG `MappingPdxSerializer` vs. GemFire/Geode's `ReflectionBasedAutoSerializer` -Under-the-hood, Spring Boot for Apache Geode/Pivotal GemFire {spring-data-geode-docs-html}/#bootstrap-annotation-config-pdx[enables] -and uses Spring Data for Apache Geode/Pivotal GemFire's {spring-data-geode-javadoc}/org/springframework/data/gemfire/mapping/MappingPdxSerializer.html[MappingPdxSerializer] +Under-the-hood, Spring Boot for Apache Geode {spring-data-geode-docs-html}/#bootstrap-annotation-config-pdx[enables] +and uses Spring Data for Apache Geode's {spring-data-geode-javadoc}/org/springframework/data/gemfire/mapping/MappingPdxSerializer.html[MappingPdxSerializer] to serialize your application domain objects using PDX. TIP: Refer to the SDG {spring-data-geode-docs-html}/#mapping.pdx-serializer[Reference Guide] for more details @@ -104,7 +104,7 @@ with Spring Data's {spring-data-commons-javadoc}/org/springframework/data/annota of nested entity field/property types. Number two above deserves special attention since the `MappingPdxSerializer` "excludes" all Java, Spring -and Apache Geode/Pivotal GemFire types, by default. But, what happens when you need to serialize 1 of those types? +and Apache Geode types, by default. But, what happens when you need to serialize 1 of those types? For example, suppose you need to be able to serialize objects of type `java.security.Principal`. Well, then you can override the excludes by registering an "include" type filter, like so: @@ -114,7 +114,6 @@ override the excludes by registering an "include" type filter, like so: package example.app; import java.security.Principal; -import ...; @SpringBootApplication @EnablePdx(serializerBeanName = "myCustomMappingPdxSerializer") diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/functions.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/functions.adoc index b40cff7b9..7d0559808 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/functions.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/functions.adoc @@ -15,21 +15,20 @@ Additionally, when the computations are handled in parallel, across the cluster can be performed much faster. This typically involves intelligently organizing the data using various partitioning (a.k.a. sharding) strategies to uniformly balance the data set across the cluster. -Well, both Apache Geode and Pivotal GemFire address this very important application concern in its +Well, Apache Geode address this very important application concern in its {apache-geode-docs}/developing/function_exec/chapter_overview.html[Function Execution] framework. -Spring Data for Apache Geode/Pivotal GemFire {spring-data-geode-docs-html}/#function-annotations[builds] on -this Function Execution framework by enabling developers to {spring-data-geode-docs-html}/#function-implementation[implement] +Spring Data for Apache Geode {spring-data-geode-docs-html}/#function-annotations[builds] on this Function Execution +framework by enabling developers to {spring-data-geode-docs-html}/#function-implementation[implement] and {spring-data-geode-docs-html}/#function-execution[execute] GemFire/Geode Functions using a very simple POJO-based, annotation configuration model. TIP: See {spring-data-geode-docs-html}/#_implementation_vs_execution[here] for the difference between Function implementation & executions. -Taking this 1 step further, Spring Boot for Apache Geode/Pivotal GemFire _auto-configures_ and enables both Function -implementation and execution out-of-the-box. Therefore, you can immediately begin writing Functions and invoking them -without having to worry about all the necessary plumbing to begin with. You can rest assured that it will just work -as expected. +Taking this 1 step further, Spring Boot for Apache Geode _auto-configures_ and enables both Function implementation +and execution out-of-the-box. Therefore, you can immediately begin writing Functions and invoking them without having +to worry about all the necessary plumbing to begin with. You can rest assured that it will just work as expected. === Applying Functions @@ -58,7 +57,7 @@ class EligibilityDeterminationFunction { @GemfireFunction(HA = true, hasResult = true, optimizeForWrite=true) public EligibilityDecision determineEligibility(FunctionContext functionContext, Person person, Timespan timespan) { - ... + // ... } } ---- @@ -97,7 +96,7 @@ class FinancialLoanApplicationService { this.execution = execution; } - @Cacheable("EligibilityDecisions", ...) + @Cacheable("EligibilityDecisions") EligibilityDecision processEligility(Person person, Timespan timespan) { return this.execution.determineEligibility(person, timespan); } @@ -105,6 +104,6 @@ class FinancialLoanApplicationService { ---- Just like caching, no addition configuration is required to enable and find your application Function implementations -and executions. Simply build and run. Spring Boot for Apache Geode/Pivotal GemFire handles the rest. +and executions. Simply build and run. Spring Boot for Apache Geode handles the rest. TIP: It is common to implement and register your application Functions on the server and execute them from the client. diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/gemfire-properties.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/gemfire-properties.adoc index 095d3c968..b96c8a609 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/gemfire-properties.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/gemfire-properties.adoc @@ -1,6 +1,6 @@ [[geode-configuration-gemfire-properties]] == Using Geode Properties -:gemfire-name: Pivotal GemFire +:gemfire-name: VMWare Tanzu GemFire :geode-name: Apache Geode As of Spring Boot for {geode-name} & {gemfire-name} (SBDG) 1.3, it is now possible to declare {geode-name} diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index e7ca9e399..51b2a080d 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -1,6 +1,6 @@ [[geode-api-extensions]] == Apache Geode API Extensions -:gemfire-name: Pivotal GemFire +:gemfire-name: VMware Tanzu GemFire :geode-name: Apache Geode :images-dir: ./images diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/logging.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/logging.adoc index 7c7bc5f5a..bb402cd0f 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/logging.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/logging.adoc @@ -16,15 +16,15 @@ e.g. `log-level` no longer have any effect, regardless of whether the property ( TIP: Refer to Apache Geode's {apache-geode-docs}/reference/topics/gemfire_properties.html[Documentation] for a complete list of valid `Properties`, including the `Properties` used to configure logging. -Unfortunately, this also means the _Spring Data for Apache Geode & Pivotal GemFire_ (SDG) +Unfortunately, this also means the _Spring Data for Apache Geode_ (SDG) {spring-data-geode-javadoc}/org/springframework/data/gemfire/config/annotation/EnableLogging.html[`@EnableLogging`] -annotation no longer has any effect on Apache Geode or Pivotal GemFire logging either and is the reason it has been +annotation no longer has any effect on Apache Geode logging either and is the reason it has been https://jira.spring.io/browse/DATAGEODE-299[deprecated]. The reason `@EnableLogging` no longer has any effect on logging is because this annotation's attributes and associated SDG properties indirectly sets the corresponding -Apache Geode or Pivotal GemFire properties, which again, are useless from Apache Geode `1.9.2` onward. +Apache Geode properties, which again, are useless from Apache Geode `1.9.2` onward. -By way of example, and to make this concrete, **none** of the following approaches have any effect on Apache Geode -or Pivotal GemFire logging: +By way of example, and to make this concrete, **none** of the following approaches have any effect +on Apache Geode logging: .Command-line configuration [source,txt] @@ -36,7 +36,7 @@ $ java -classpath ...:/path/to/MySpringBootApacheGeodeClientCacheApplication.jar .Externalized configuration using Apache Geode `gemfire.properties` [source,properties] ---- -# Apache Geode/Pivotal GemFire only/specific properties +# Apache Geode only/specific properties log-level=INFO ---- @@ -66,11 +66,11 @@ class MySpringBootApacheGeodeClientApplication { That is to say, none of the approaches above have any effect without the **new** SBDG logging starter. [[geode-logging-configuration]] -=== Configure Apache Geode & Pivotal GemFire Logging +=== Configure Apache Geode Logging -So, how do you configure logging for Apache Geode and Pivotal GemFire? +So, how do you configure logging for Apache Geode? -Effectively, 3 things are required to get Apache Geode or Pivotal GemFire to log output: +Effectively, 3 things are required to get Apache Geode to log output: 1) First, you must declare a logging provider on your Spring Boot application classpath (e.g. _Logback_). @@ -103,7 +103,7 @@ or bridges `java.util.logging` (JUL) and Apache Log4j to SLF4J. However, you st configuration, such as a `logback.xml` file for _Logback_, to configure logging not only for your Spring Boot application, but also for Apache Geode as well. -SBDG has simplified the setup of Apache Geode and Pivotal GemFire logging. Simply declare the +SBDG has simplified the setup of Apache Geode logging. Simply declare the `org.springframework.geode:spring-geode-starter-logging` dependency on your Spring Boot application classpath! Unlike Apache Geode's default Log4j XML configuration file (i.e. `log4j2.xml`), SBDG's provided `logback.xml` @@ -129,8 +129,8 @@ SBDG's _Logback_ configuration defines 3 Loggers to control the log output from ---- -The `com.gemstone.gemfire` Logger is a legacy Logger covering old Pivotal GemFire bits still present in Apache Geode -for backwards compatibility reasons. This Logger's use should be largely unnecessary. +The `com.gemstone.gemfire` Logger is a legacy Logger covering old VMware Tanzu GemFire bits still present +in Apache Geode for backwards compatibility reasons. This Logger's use should be largely unnecessary. The `org.apache.geode` Logger is the primary Logger used to control log output from all Apache Geode components during the runtime operation of Apache Geode. Both this Logger and the legacy `com.gemstone.gemfire` Logger default @@ -238,7 +238,7 @@ For example, you could compose both the _Logback_ `ConsoleAppender` and `FileApp .Composing multiple `Appenders` [source,java] ---- -ConsoleAppender consoleAppender = ...; +ConsoleAppender consoleAppender = ... ; FileAppender fileAppender = ...; diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/repositories.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/repositories.adoc index 2897a662c..2f9ed4bde 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/repositories.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/repositories.adoc @@ -1,17 +1,16 @@ [[geode-repositories]] == Spring Data Repositories -Using Spring Data Repositories with Apache Geode or Pivotal GemFire makes short work of data access operations when -using either Apache Geode or Pivotal GemFire as your System of Record (SOR) to persist your application's state. +Using Spring Data Repositories with Apache Geode makes short work of data access operations when using Apache Geode +as your System of Record (SOR) to persist your application's state. {spring-data-commons-docs-html}/#repositories[Spring Data Repositories] provides a convenient and highly powerful way to define basic CRUD and simple query data access operations easily just by specifying the contract of those data access operations in a Java interface. -Spring Boot for Apache Geode & Pivotal GemFire _auto-configures_ the Spring Data for Apache Geode/Pivotal GemFire -{spring-data-geode-docs-html}/#gemfire-repositories[Repository extension] when either is declared on your application's -classpath. You do not need to do anything special to enable it. Simply start coding your application-specific -Repository interfaces and the way you go. +Spring Boot for Apache Geode _auto-configures_ the Spring Data for Apache Geode {spring-data-geode-docs-html}/#gemfire-repositories[Repository extension] +when declared on your application's classpath. You do not need to do anything special to enable it. Simply start +coding your application-specific Repository interfaces and the way you go. For example: @@ -83,5 +82,5 @@ class SpringBootApacheGeodeClientCacheApplication { ---- Again, see Spring Data Commons' {spring-data-commons-docs-html}/#repositories[Repositories abstraction] in general, -and Spring Data for Apache Geode/Pivotal GemFire {spring-data-geode-docs-html}/#gemfire-repositories[Repositories extension] +and Spring Data for Apache Geode {spring-data-geode-docs-html}/#gemfire-repositories[Repositories extension] in particular, for more details. diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc index 6aab05003..4d6ede8c5 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/samples.adoc @@ -1,12 +1,11 @@ [[geode-samples]] == Samples -This section contains working examples demonstrating how to use Spring Boot for Apache Geode and Pivotal GemFire (SBDG) -effectively. +This section contains working examples demonstrating how to use Spring Boot for Apache Geode (SBDG) effectively. Some examples focus on specific Use Cases (e.g. [(HTTP) Session state] caching) while other examples demonstrate how SBDG works under-the-hood to give users a better understanding of what is actually happening and how to debug problems -with their Apache Geode / Pivotal GemFire, Spring Boot applications. +with their Apache Geode, Spring Boot applications. .Example Spring Boot applications using Apache Geode |=== @@ -17,15 +16,15 @@ with their Apache Geode / Pivotal GemFire, Spring Boot applications. applications with Spring Boot. | {github-samples-url}/intro/getting-started[Getting Started] -| link:guides/boot-configuration.html[Spring Boot Auto-Configuration for Apache Geode/Pivotal GemFire] +| link:guides/boot-configuration.html[Spring Boot Auto-Configuration for Apache Geode] | Explains what auto-configuration is provided by SBDG out-of-the-box and what the auto-configuration is doing. | {github-samples-url}/boot/configuration[Boot Auto-Configuration] -| link:guides/boot-actuator.html[Spring Boot Actuator for Apache Geode/Pivotal GemFire] +| link:guides/boot-actuator.html[Spring Boot Actuator for Apache Geode] | Explains how to use Spring Boot Actuator for Apache Geode and how it works. | {github-samples-url}/boot/actuator[Boot Actuator] -| link:guides/boot-security.html[Spring Boot Security for Apache Geode/Pivotal GemFire] +| link:guides/boot-security.html[Spring Boot Security for Apache Geode] | Explains how to configure Auth and TLS with SSL when using Apache Geode and Pivotal Cloud Cache in Spring Boot applications. | {github-samples-url}/boot/security[Boot Security] diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/templates.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/templates.adoc index fad38dc8c..1733056c6 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/templates.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/templates.adoc @@ -20,11 +20,11 @@ the core Spring Framework. Other Spring Data modules, such as Spring Data Redis, offer the https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/core/RedisTemplate.html[RedisTemplate], -and Spring Data for Apache Geode/Pivotal GemFire (SDG) offers the +and Spring Data for Apache Geode (SDG) offers the {spring-data-gemfire-javadoc}/org/springframework/data/gemfire/GemfireTemplate.html[GemfireTemplate]. The `GemfireTemplate` provides a highly consistent and familiar API to perform data access operations on Apache Geode -or Pivotal GemFire cache `Regions`. +cache `Regions`. `GemfireTemplate` offers: @@ -33,8 +33,8 @@ or Pivotal GemFire cache `Regions`. 3. Automatic enlistment in the presence of local, cache transactions. 4. Protection from {apache-geode-javadoc}/org/apache/geode/cache/Region.html[Region API] breaking changes. -Given these conveniences, Spring Boot for Apache Geode & Pivotal GemFire (SBDG) will auto-configure `GemfireTemplate` -beans for each Region present in the GemFire/Geode cache. +Given these conveniences, Spring Boot for Apache Geode (SBDG) will auto-configure `GemfireTemplate` beans for each +Region present in the cache. Additionally, SBDG is careful not to create a `GemfireTemplate` if the user has already declared a `GemfireTemplate` bean in the Spring `ApplicationContext` for a given Region. @@ -51,7 +51,7 @@ class GemFireConfiguration { @Bean("Example") ClientRegionFactoryBean exampleRegion (GemFireCache gemfireCache) { - ... + // ... } } ---- @@ -88,7 +88,7 @@ Given the following entity class: ---- @Region("Customers") class Customer { - ... + // ... } ---- @@ -97,9 +97,9 @@ And configuration: [source,java] ---- @Configuration -@EnableEntityDefinedRegions(basePackageClasses = Customer.class} +@EnableEntityDefinedRegions(basePackageClasses = Customer.class) class GemFireConfiguration { - ... + // ... } ---- @@ -127,9 +127,8 @@ explicitly or implicitly, such as when using the `@EnableEntityDefineRegions` an SBDG auto-configures `GemfireTemplate` beans for Caching-defined Regions. When you are using Spring Framework's {spring-framework-docs}/integration.html#cache[Cache Abstraction] backed by -either Apache Geode or Pivotal GemFire, 1 of the requirements is to configure Regions for each of the caches specified -in the {spring-framework-docs}integration.html#cache-annotations[Caching Annotations] of your application service -components. +Apache Geode, 1 of the requirements is to configure Regions for each of the caches specified in the +{spring-framework-docs}integration.html#cache-annotations[Caching Annotations] of your application service components. Fortunately, SBDG makes enabling and configuring caching easy and <> out-of-the-box. @@ -183,8 +182,8 @@ when autowiring does not. [[geode-data-access-region-templates-native-defined]] === Native-defined Regions -SBDG will even auto-configure `GemfireTemplate` beans for Regions defined using Apache Geode and Pivotal GemFire native -configuration meta-data, such as `cache.xml`. +SBDG will even auto-configure `GemfireTemplate` beans for Regions defined using Apache Geode native configuration +metadata, such as `cache.xml`. Given the following GemFire/Geode native `cache.xml`: @@ -208,7 +207,7 @@ And Spring configuration: @Configuration @EnableGemFireProperties(cacheXmlFile = "cache.xml") class GemFireConfiguration { - ... + // ... } ---- @@ -243,7 +242,7 @@ class GemFireConfiguration { @Bean public GemfireTemplate customersTemplate(GemFireCache cache) { - return new GemfireTemplate(cache.getRegion("/Customers"); + return new GemfireTemplate(cache.getRegion("/Customers")); } } ---- @@ -254,7 +253,7 @@ Using our same Customers class, as above: ---- @Region("Customers") class Customer { - ... + // ... } ---- @@ -278,7 +277,7 @@ class GemFireConfiguration { @Bean public GemfireTemplate vipCustomersTemplate(GemFireCache cache) { - return new GemfireTemplate(cache.getRegion("/Customers"); + return new GemfireTemplate(cache.getRegion("/Customers")); } } ---- diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc index 3776326a0..6c4e995d8 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc @@ -160,10 +160,9 @@ expired or been evicted. We neither configure eviction nor expiration for this Both the `factorial(..)` and `sqrt(..)` methods have been annotated with Spring's `@Cacheable` annotation to demarcate these methods with caching behavior. Of course, as explained in SBDG's <<../_includes/configuration-annotations.adoc#geode-caching-provider,documentation>>, -caching with Spring's Cache Abstraction using Apache Geode (or Pivotal GemFire, even Pivotal Cloud Cache (PCC) -when running in Pivotal CloudFoundry (PCF)) as the caching provider is enabled by default. Therefore, there is nothing -more you need do to start leverage caching in your Spring Boot applications than to annotate the service methods -with the appropriate Spring or JSR-107, JCache API annotations. Simple! +caching with Spring's Cache Abstraction using Apache Geode as the caching provider is enabled by default. Therefore, +there is nothing more you need do to start leverage caching in your Spring Boot applications than to annotate +the service methods with the appropriate Spring or JSR-107, JCache API annotations. Simple! It is worth noting that we are starting with the same applied pattern of caching as you would when using the _Look-Aside Caching_ pattern. This is key to minimizing the invasive nature of _Inline Caching_. There is a subtle @@ -187,7 +186,7 @@ The pertinent part of the configuration that enables _Inline Caching_ for our Ca the `inlineCachingForCalculatorApplicationRegionsConfigurer` bean definition. SBDG provides the `InlineCachingRegionConfigurer` class used in the bean definition to configure and enable the caches -(a.k.a. as Regions in Apache Geode & Pivotal GemFire terminology) with _Inline Caching_ behavior. +(a.k.a. as Regions in Apache Geode terminology) with _Inline Caching_ behavior. The Configurer's job is to configure the appropriate Spring Data (SD) _Repository_ used as a Region's `CacheLoader` for "_read-through_" behavior as well as configure the same SD _Repository_ for a Region's `CacheWriter` for @@ -260,9 +259,9 @@ these Regions for you. TIP: If you have not done so already, you should definitely read about SBDG's support for _Inline Caching_ in the link:../index.html#geode-caching-provider-inline-caching[Inline Caching] section. -TIP: To learn more about how Apache Geode's (or Pivotal GemFire's) data loading functionality works, or specifically, -how to {apache-geode-docs}/developing/outside_data_sources/sync_outside_data.html["Keep the Cache in Sync with Outside -Data Sources"] follow the link. You may also learn more by reading the _Javadoc_ for +TIP: To learn more about how Apache Geode's data loading functionality works, or specifically, how to +{apache-geode-docs}/developing/outside_data_sources/sync_outside_data.html["Keep the Cache in Sync with Outside Data Sources"] +follow the link. You may also learn more by reading the _Javadoc_ for {apache-geode-javadoc}//org/apache/geode/cache/CacheLoader.html[`CacheLoader`] and {apache-geode-javadoc}/org/apache/geode/cache/CacheWriter.html[`CacheWriter`]. diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc index a6ba1d2ea..abe301b15 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-look-aside.adoc @@ -173,9 +173,8 @@ With the `org.springframework.geode:spring-geode-starter` dependency on your app And the `BootGeodeLookAsideCachingApplication` class annotated with `@SpringBootApplication`, you have everything you need to begin using Spring's _Cache Abstraction_ in your application with Apache Geode as the caching provider. -TIP: You can switch from open source Apache Geode to Pivotal GemFire (PCC) very easily simply by changing -the artifactId from `spring-geode-starter` to `spring-gemfire-starter`. No configuration or code changes -are necessary. +TIP: You can switch from open source Apache Geode to VMware Tanzu GemFire very easily simply by changing the artifactId +from `spring-geode-starter` to `spring-gemfire-starter`. No configuration or code changes are necessary. As an application developer, all you need do is focus on where in your application caching would be most beneficial. @@ -246,9 +245,8 @@ After running the `BootGeodeLookAsideCachingApplication` class, if you open a We [[geode-samples-caching-lookaside-example-counterservice-configuration]] === Counter Service Configuration -While Spring Boot for Apache Geode/Pivotal GemFire (PCC), SBDG, takes care of enabling Spring's caching infrastructure -for you, configuring Apache Geode/Pivotal GemFire (PCC) as a caching provider, you still must define and declare -your individual caches. +While Spring Boot for Apache Geode (SBDG) takes care of enabling Spring's caching infrastructure for you, configuring +Apache Geode as a caching provider, you still must define and declare your individual caches. No Spring caching provider is fully configured by Spring or Spring Boot for that matter. Part of the reason for this is that there are many different ways to configure the caches. @@ -268,9 +266,9 @@ include::{samples-dir}/caching/look-aside/src/main/java/example/app/caching/look ---- The only thing of real significance here is the `@EnableCachingDefinedRegions` annotation. This Spring Data -for Apache Geode/Pivotal GemFire (SDG) annotation is responsible for introspecting our Spring Boot application -on Spring container startup, identifying all the caching annotations (both Spring Cache annotations as wells JSR-107, -JCache annotations) used in our application components, and creating the appropriate caches. +for Apache Geode (SDG) annotation is responsible for introspecting our Spring Boot application on Spring container +startup, identifying all the caching annotations (both Spring Cache annotations as wells JSR-107, JCache annotations) +used in our application components, and creating the appropriate caches. If you were not using SDG's `@EnablingCachingDefinedRegions` annotation, then you would need to define the Region using the equivalent _JavaConfig_: @@ -547,9 +545,9 @@ B | 2 As you have learned, Spring makes enabling and using caching in your application really easy. -With SBDG, using either Apache Geode or Pivotal GemFire as your caching provider in Spring's _Cache Abstraction_ -is as easy as making sure `org.springframework.geode:spring-geode-starter` is on your application's classpath. You just -need to focus on areas of your application that would benefit from caching. +With SBDG, using Apache Geode as your caching provider in Spring's _Cache Abstraction_ is as easy as making sure +`org.springframework.geode:spring-geode-starter` is on your application's classpath. You just need to focus on areas +of your application that would benefit from caching. You have now successfully used the _**Look-Aside Caching**_ pattern in your Spring Boot application. diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc index 5a9ed4963..a2a2047b4 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-near.adoc @@ -168,7 +168,7 @@ include::{samples-dir}/caching/near/src/main/java/example/app/caching/near/serve ---- TIP: For more information on configurating and bootstrapping a small cluster of {apache-geode-name} servers using Spring Boot, -see link:../index.html#geode-cluster-configuration-bootstrapping[Running an {apache-geode-name} or Pivotal GemFire Cluster using Spring Boot]. +see link:../index.html#geode-cluster-configuration-bootstrapping[Running an {apache-geode-name} Cluster using Spring Boot]. [[geode-samples-caching-near-example-client-side]] === Client-side Configuration diff --git a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc index 8b30b4780..f5257925b 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/getting-started.adoc @@ -29,33 +29,33 @@ John Blum :docinfodir: guides -This guide walks you through building and running a simple Spring Boot, Apache Geode `ClientCache` application -using the Spring Boot for Apache Geode (SBDG) framework. Later in this guide, we switch the application from -{apache-geode-website}[Apache Geode] to {pivotal-cloudcache-website}[Pivotal Cloud Cache] and deploy (i.e `_push_`) +This guide walks you through building and running a simple Spring Boot, {geode-name} `ClientCache` application +using the Spring Boot for {geode-name} (SBDG) framework. Later in this guide, we switch the application from +{apache-geode-website}[{geode-name}] to {pivotal-cloudcache-website}[{cloudcache-name}] and deploy (i.e `_push_`) the application up to {pivotal-cloudfoundry-website}[_Pivotal Platform_]. Specifically, you will: -1. Create a new "_Spring for Apache Geode_" project using _Spring Initializer_ at https://start.spring.io[start.spring.io]. +1. Create a new "_Spring for {geode-name}_" project using _Spring Initializer_ at https://start.spring.io[start.spring.io]. Goto the <> topic. -2. Then, we build a simple Spring Boot, Apache Geode `ClientCache` application that can persist data locally -in Apache Geode. Goto the <> topic. +2. Then, we build a simple Spring Boot, {geode-name} `ClientCache` application that can persist data locally +in {geode-name}. Goto the <> topic. 3. Next, we switch the application from running locally to using a client/server topology. Goto the <> topic. 4. And finally, we deploy the application to _Pivotal Platform_ and bind our application to a provisioned -_Pivotal Cloud Cache_ (PCC) service instance. +_{cloudcache-name}_ (PCC) service instance. Goto the <> topic. Our goal is to accomplish each step with _little to no code or configuration_ changes. It should just work! NOTE: It is also possible to migrate from a Commercial, Managed environment (running in _Pivotal Platform_ -using _Pivotal Cloud Cache_ (PCC)) back to an Open Source, Non-Managed environment (i.e. running with an externally -managed Apache Geode cluster). +using _{cloudcache-name}_ (PCC)) back to an Open Source, Non-Managed environment (i.e. running with an externally +managed {geode-name} cluster). By the end of this guide, you should feel comfortable and ready to begin building Spring Boot applications using either -Apache Geode standalone or by deploying and running in _Pivotal Platform_ using _Pivotal Cloud Cache_ (PCC). +{geode-name} standalone or by deploying and running in _Pivotal Platform_ using _{cloudcache-name}_ (PCC). -NOTE: {pivotal-cloudcache-website}[_Pivotal Cloud Cache_] (PCC) has replaced {pivotal-gemfire-website}[_Pivotal GemFire_] +NOTE: {pivotal-cloudcache-website}[_{cloudcache-name}_] (PCC) has replaced {pivotal-gemfire-website}[_{gemfire-name}_] as the new brand name. Let's begin! @@ -80,7 +80,7 @@ When creating the example app for this guide, we selected: ** _Artifact_: **crm** ** _Options_: *** _Package Name_: **example.app.crm** -* _Dependencies_: Add "**Spring for Apache Geode**" by typing "_Geode_" into the "_Search dependencies to add_" +* _Dependencies_: Add "**Spring for {geode-name}**" by typing "_Geode_" into the "_Search dependencies to add_" text field. * (Optional) _Dependencies_: Add "_Spring Web_" to pull in `org.springframework.boot:spring-boot-starter-web` if you want this Spring Boot application to be a Web application. @@ -98,7 +98,7 @@ Your selections should look similar to: image::{images-dir}/spring-initializer-screenshot.png[] -Be sure to click the "*+*" button next to the "_Spring for Apache Geode_" dependency to select and add it to +Be sure to click the "*+*" button next to the "_Spring for {geode-name}_" dependency to select and add it to the generated project Maven POM file. You can explore the contents of the generated project by pressing the `CTRL+SPACE` keys: @@ -112,7 +112,7 @@ Download the ZIP file and unpack it to your desired working directory. You can then use your favorite IDE (e.g. https://www.jetbrains.com/idea/[IntelliJ IDEA] or https://spring.io/tools[Spring Tool Suite] (STS)) to open the generated project. -You are ready to begin developing your Spring Boot, Apache Geode `ClientCache` application. +You are ready to begin developing your Spring Boot, {geode-name} `ClientCache` application. [[about-versions]] .Versions @@ -151,10 +151,10 @@ public class CrmApplication { } ---- -Additionally, in the project Maven POM file, we see the "_Spring Boot for Apache Geode_" (SBDG) dependency +Additionally, in the project Maven POM file, we see the "_Spring Boot for {geode-name}_" (SBDG) dependency (`org.springframework.geode:spring-geode-starter)`: -.Spring Boot for Apache Geode dependency +.Spring Boot for {geode-name} dependency [source,xml] [subs="verbatim,attributes"] ---- @@ -164,9 +164,9 @@ Additionally, in the project Maven POM file, we see the "_Spring Boot for Apache ---- -With the _Spring Boot for Apache Geode_ dependency (i.e. `org.springframework.geode:spring-geode-starter`) +With the _Spring Boot for {geode-name}_ dependency (i.e. `org.springframework.geode:spring-geode-starter`) on the application classpath along with the main Java class being a proper Spring Boot application, this application -will startup and run as an Apache Geode `ClientCache` application: +will startup and run as an {geode-name} `ClientCache` application: .Application log output [source,txt] @@ -634,17 +634,17 @@ Process finished with exit code 0 ---- First, you see the JVM bootstrap Spring Boot, which in turn runs our `CrmApplication` and also auto-configures -and bootstraps an Apache Geode `ClientCache` instance. Most of the output comes from Apache Geode. +and bootstraps an {geode-name} `ClientCache` instance. Most of the output comes from {geode-name}. The application falls straight through because it is not doing anything interesting, and technically, because there are no non-daemon Threads (e.g. Socket Thread listening on HTTP port 8080 in the case of Web applications running an embedded Servlet Container like Apache Tomcat) that prevents the "main" Java Thread from exiting immediately. [[spring-geode-samples-getting-started-build-app]] -== Build a Spring Boot, Apache Geode `ClientCache` application +== Build a Spring Boot, {geode-name} `ClientCache` application Our Spring Boot application is a simple _Customer Relationship Management_ (CRM) application that allows users -to persist `Customer` data in Apache Geode and lookup `Customers` by name. +to persist `Customer` data in {geode-name} and lookup `Customers` by name. [[spring-geode-samples-getting-started-build-app-model]] === `Customer` class @@ -660,15 +660,15 @@ include::{samples-dir}/intro/getting-started/src/main/java/example/app/crm/model The CRM application defines a `Customer` in terms of an identifier (i.e. `Long id`) and a name (i.e. `String name`). Both fields are required. -Additionally, we map `Customer` objects to the "_/Customers_" Region using Spring Data for Apache Geode's (SDG) +Additionally, we map `Customer` objects to the "_/Customers_" Region using Spring Data for {geode-name}'s (SDG) {spring-data-geode-javadoc}/org/springframework/data/gemfire/mapping/annotation/Region.html[`@Region`] annotation. -The `@Region` annotation tells Spring Data where to persist and access `Customer` objects in Apache Geode. It is +The `@Region` annotation tells Spring Data where to persist and access `Customer` objects in {geode-name}. It is basically equivalent to JPA's `@javax.persistence.Table` annotation. Additionally, we annotate the `Long id` field with Spring Data's `@org.springframework.data.annotation.Id` annotation. -This designates the `id` field as the identifier, or in Apache Geode's case, the "key" since a Region is a key/value -store. In fact, Apache Geode's {apache-geode-javadoc}/org/apache/geode/cache/Region.html[`Region`] interface +This designates the `id` field as the identifier, or in {geode-name}'s case, the "key" since a Region is a key/value +store. In fact, {geode-name}'s {apache-geode-javadoc}/org/apache/geode/cache/Region.html[`Region`] interface implements the `java.uti.Map` interface making it a `Map` data structure. We use https://projectlombok.org/[Project Lombok] to simply the implementation of the `Customer` class. @@ -683,7 +683,7 @@ subjective topic on whether to use Lombok in production code. We have no opinio === `CustomerRepository` interface Now that we have defined a basic model for managing customer data, we can create a Spring Data `CrudRepository` used by -our application to persist `Customer` objects to Apache Geode. This same _Repository_ can be used to lookup, or query +our application to persist `Customer` objects to {geode-name}. This same _Repository_ can be used to lookup, or query `Customers` by name. .`CustomerRepository` interface @@ -697,7 +697,7 @@ that enables an application to perform basic CRUD (i.e. CREATE, READ, UPDATE, DE data access operations on a persistent entity (e.g. `Customer`). TIP: Review the Spring Data Commons Reference Guide for more details on {spring-data-commons-docs}/#repositories[Working with Spring Data Repositories] -and Spring Data for Apache Geode's (SDG) {spring-data-geode-docs}/#gemfire-repositories[extension and implementation] +and Spring Data for {geode-name}'s (SDG) {spring-data-geode-docs}/#gemfire-repositories[extension and implementation] of Spring Data Commons Repository Abstraction. [[spring-geode-samples-getting-started-build-app-controller]] @@ -731,7 +731,7 @@ for accessing the CRM application via a Web client (e.g. Web browser). |=== NOTE: If you did not enable the Web components by adding the Spring Web dependency to your application classpath, then -no worries, we will still be inspecting the application's effects on Apache Geode using _Gfsh_ (Apache Geode & Pivotal +no worries, we will still be inspecting the application's effects on {geode-name} using _Gfsh_ ({geode-name} & Pivotal GemFire's shell tool). Of course, you can just add the `org.springframework.boot:spring-boot-starter-web` dependency to your Maven POM file as well. @@ -755,7 +755,7 @@ responsibility as the application developer. One example is Region configuratio There are many ways to configure a Region and it varies significantly from application Use Case to application Use Case. First, there are different data management policies (e.g. `PARTITION` or `REPLICATE`) that might be applicable depending -on the type of data you store in Apache Geode (e.g. Transactional vs. Reference data). You might need different +on the type of data you store in {geode-name} (e.g. Transactional vs. Reference data). You might need different Eviction and Expiration policies depending on your user base or workloads. Some data is suited for Off-Heap memory. Depending on the data management policy of the Region (e.g. `PARTITION`) you can configure additional per node and total Region memory usage restrictions, collocate the Region with another Region for use in JOIN Queries, etc. @@ -765,7 +765,7 @@ especially during development. So, while SBDG may not provide implicit _auto-co this does not mean you are left to figure it all out by yourself (e.g. Region configuration). During development, if you don't care specifically "_how_" your data is stored and you just want to simply and rapidly -iterate, putting and getting data into and out of Apache Geode, then SBDG can help. +iterate, putting and getting data into and out of {geode-name}, then SBDG can help. The first thing we will do is annotate our application configuration with SDG's `@EnableEntityDefinedRegions` annotation and set the `basePackageClasses` attribute to our `Customer` class: @@ -822,12 +822,12 @@ You can also use Spring XML: ==== Configure the Application to be Cluster-Aware The final bit of configuration helps determine whether the client application is by itself or whether a cluster of -Apache Geode servers are available to manage the application's data. +{geode-name} servers are available to manage the application's data. During development, you might be iteratively and rapidly developing inside your IDE, debugging and testing new functions locally and then switch to a client/server environment for further integration testing. -Apache Geode requires 1) all client Regions that send data to/from the cluster be `*PROXY` Regions and 2) that a +{geode-name} requires 1) all client Regions that send data to/from the cluster be `*PROXY` Regions and 2) that a server-side Region by the same name exists in the cluster. Switching the data management policy for all client Regions' from `*PROXY` to `LOCAL` when pulling your application code @@ -887,7 +887,7 @@ to our main `@SpringBootApplication` class: include::{samples-dir}/intro/getting-started/src/main/java/example/app/crm/CrmApplication.java[tags=runner] ---- -The runner creates a new `Customer` "_JonDoe_", persists "_JonDoe_" to Apache Geode in the "_/Customers_" client `LOCAL` +The runner creates a new `Customer` "_JonDoe_", persists "_JonDoe_" to {geode-name} in the "_/Customers_" client `LOCAL` Region, runs an OQL query to lookup "_JonDoe_" by name using a wildcard query with the LIKE operator and argument "_%Doe_", then asserts that the result is correct. @@ -942,7 +942,7 @@ Customer was [Customer(name=JonDoe)] SBDG, with the help of `@EnableEntityDefinedRegions` and `@EnableClusterAware`, along with Spring Data, has already done quite a bit of work for us: -1. SBDG _auto-configured_ a `ClientCache` instance required to use Apache Geode in the application. +1. SBDG _auto-configured_ a `ClientCache` instance required to use {geode-name} in the application. 2. The `@EnableEntityDefinedRegion` annotation created the required "_/Customers_" client Region from our `Customer` entity class. 3. SBDG _auto-configured_ the Spring Data Repository infrastructure and supplied an implementation for @@ -1019,21 +1019,21 @@ image::{images-dir}/customer-service-application-jondoe.png[] [[spring-geode-samples-getting-started-run-app-clientserver]] == Run the Application in a Client/Server Topology -Now that we have a simple Spring Boot, Apache Geode `ClientCache` application running locally inside our IDE, we want to +Now that we have a simple Spring Boot, {geode-name} `ClientCache` application running locally inside our IDE, we want to expand on this bit and switch to a client/server topology. Although we are not quite ready to move to a managed cloud platform environment, like _Pivotal Platform_ (formerly -known as _Pivotal CloudFoundry_) using _Pivotal Cloud Cache_ (PCC), we no longer want to maintain the data locally. +known as _Pivotal CloudFoundry_) using _{cloudcache-name}_ (PCC), we no longer want to maintain the data locally. Without persistence, we would lose all our data if the client application were shutdown since the data is maintained in-memory. Additionally, by maintaining the data locally, other client applications, or even other instances of our existing application (e.g. in a Microservices landscape) would not be able to use this data, which is useless! -To switch to a client/server topology, we need to first configure and bootstrap an Apache Geode cluster. +To switch to a client/server topology, we need to first configure and bootstrap an {geode-name} cluster. The Example Code for this Guide already provides the necessary Geode shell script (_Gfsh_) to start a cluster: -.Gfsh shell script to start an Apache Geode cluster +.Gfsh shell script to start an {geode-name} cluster [source,txt] ---- include::{samples-dir}/intro/getting-started/src/main/resources/geode/bin/start-cluster.gfsh[] @@ -1049,7 +1049,7 @@ gfsh> run --file=@SBDG_HOME@/spring-geode-samples/intro/getting-started/src/main NOTE: Be sure to change the `@SBDG_HOME@` placeholder variable with the location of your cloned copy of SBDG. -The _Gfsh_ shell script starts an Apache Geode cluster with 1 _Locator_ and 2 _Servers_. +The _Gfsh_ shell script starts an {geode-name} cluster with 1 _Locator_ and 2 _Servers_. The output from the shell script will look similar to: @@ -1256,7 +1256,7 @@ the best data management policy and organization for transactional data. The "_ on our 2 _Servers_, "ServerOne" and "ServerTwo". WARNING: You must have redundancy (and optionally, persistence) configured in your cluster to prevent (complete) -data loss, which forms the basis for high-availability (HA) in Apache Geode and Pivotal Cloud Cache (PCC). +data loss, which forms the basis for high-availability (HA) in {geode-name} and {cloudcache-name} (PCC). We can query "_JonDoe_" from _Gfsh_: @@ -1348,10 +1348,10 @@ Once again, SBDG is providing you with tremendous power and convenience that you While there are very apparent things happening, there are also a few non-apparent things happening as well. In addition to the aforementioned things in the last section, we are now benefiting from: -1. SBDG appropriately configured and relied on Apache Geode internal features to connect the client to the cluster. +1. SBDG appropriately configured and relied on {geode-name} internal features to connect the client to the cluster. 2. Configuration metadata for our application's required client Regions (e.g. "_/Customers_") was sent to the cluster and created on the servers to leverage the client/server topology. -3. SBDG _auto-configured_ PDX, Apache Geode's highly powerful Serialization framework and alternative to +3. SBDG _auto-configured_ PDX, {geode-name}'s highly powerful Serialization framework and alternative to _Java Serialization_. Once we migrate to a managed cloud platform environment, we'll see the full effects of SBDG's _auto-configuration_ @@ -1361,14 +1361,14 @@ at play. ***** Anytime you need to send data over the network, persist or overflow data to disk, your objects need to be serializable. -SBDG employs Apache Geode's {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization] +SBDG employs {geode-name}'s {apache-geode-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization] framework so your application entity classes do not need to implement `java.io.Serializable`. In other cases, implementing `java.io.Serializable` may not even be possible if your application domain types are composed of types from 3rd party libraries for which you have no control over. Perhaps you don't want to use _Java Serialization_ given the inherit overhead of the _Java Serialization_ format. -In any case, using Apache Geode PDX Serialization is ideal if you have large number of objects forming a complex graph +In any case, using {geode-name} PDX Serialization is ideal if you have large number of objects forming a complex graph where missing a type that needs to be serialized is easy to do. PDX allows you to query data in serialized form and even allows non-Java clients (e.g. native clients written in C#/C++) to access the same data. @@ -1491,7 +1491,7 @@ gfsh> create region --name=Example --type=PARTITION ... While this can be scripted and the script can be checked into source control (a definitive plus) the same as the application code, you sill need to create matching Regions on the client, for which there is no assistance -provided by Apache Geode or Pivotal Cloud Cache. +provided by {geode-name} or {cloudcache-name}. This is why `@EnableClusterAware` will help you be much more productive during development. After you are ready to promote the application to the next environment, it is a simple matter to {apache-geode-docs}/tools_modules/gfsh/command-pages/export.html#topic_mdv_jgz_ck[export] @@ -1508,16 +1508,16 @@ Again, this is highly recommended in practice. == Run the Application in a Cloud Platform Environment Now that we have built and ran our application locally as well as in a client/server topology, we are ready to push -the application to a managed cloud platform environment, like _Pivotal Platform_ using _Pivotal Cloud Cache_ (PCC). +the application to a managed cloud platform environment, like _Pivotal Platform_ using _{cloudcache-name}_ (PCC). This is the final step in our journey to the cloud and SBDG makes this a non-event! -While SBDG handles most application development concerns, _Pivotal Cloud Cache_ (PCC), in conjunction with +While SBDG handles most application development concerns, _{cloudcache-name}_ (PCC), in conjunction with _Pivotal Platform_, handles most operational concerns. .Using Pivotal Platform ***** -To deploy this application to _Pivotal Platform_ and use _Pivotal Cloud Cache_ (PCC), you will need access to +To deploy this application to _Pivotal Platform_ and use _{cloudcache-name}_ (PCC), you will need access to a _Pivotal Platform_ environment (e.g. PWS) with the PCC tile installed. Please see https://run.pivotal.io/[Pivotal Web Services] (PWS) website for more details on how to get started. @@ -1530,10 +1530,10 @@ See link:../index.html#cloudfoundry-geode[Hybrid Cloud Environments] for more de Once you have acquired a _Pivotal Platform_ environment and installed the required tools (e.g. CF CLI), then you can package the application and deploy (i.e. "_push_") it to _Pivotal Platform_. -Before we package the application, we must switch the "_Spring (Boot) for Apache Geode_" dependency in our application +Before we package the application, we must switch the "_Spring (Boot) for {geode-name}_" dependency in our application Maven POM file from: -.Spring Boot for Apache Geode dependency +.Spring Boot for {geode-name} dependency [source,xml] [subs="verbatim,attributes"] ---- @@ -1546,7 +1546,7 @@ Maven POM file from: To: -.Spring Boot for Pivotal GemFire (a.k.a. Pivotal Cloud Cache (PCC)) dependency +.Spring Boot for {gemfire-name} (a.k.a. {cloudcache-name} (PCC)) dependency [source,xml] [subs="verbatim,attributes"] ---- @@ -1594,23 +1594,23 @@ is the server-side. .Acquiring {cloudcache-name} Bits ***** -In order to acquire the Pivotal Cloud Cache (PCC) / Pivotal GemFire bits used by your Spring Boot application, you must +In order to acquire the {cloudcache-name} (PCC) / {gemfire-name} bits used by your Spring Boot application, you must sign up and register on https://network.pivotal.io/[Pivotal Network] (a.k.a. "_PivNet_"). This should include instructions on how to configure your application Maven POM file with the necessary `` -declaration for acquiring the _Pivotal Cloud Cache_ / Pivotal GemFire bits pulled in by the +declaration for acquiring the _{cloudcache-name}_ / {gemfire-name} bits pulled in by the `org.springframework.geode:spring-gemfire-starter` SBDG application dependency as well as the necessary settings in `~/.m2/settings.xml` to authenticate and access the Pivotal Commercial Repository server. -This is absolutely necessary since Pivotal Cloud Cache (PCC) / Pivotal GemFire bits are not available in _Maven Central_. +This is absolutely necessary since {cloudcache-name} (PCC) / {gemfire-name} bits are not available in _Maven Central_. -You can also find more details on acquiring the bits in the Pivotal GemFire +You can also find more details on acquiring the bits in the {gemfire-name} https://gemfire.docs.pivotal.io/{pivotal-gemfire-version}/gemfire/getting_started/installation/obtain_gemfire_maven.html[documentation]. ***** .Required Spring Boot Actuator Bits ***** -As of Apache Geode 1.9 and Pivotal GemFire 9.8, upon which Pivotal Cloud Cache (PCC) 1.8 is {pivotal-cloudcache-docs}/product-snapshot.html[based], +As of {geode-name} 1.9 and {gemfire-name} 9.8, upon which {cloudcache-name} (PCC) 1.8 is {pivotal-cloudcache-docs}/product-snapshot.html[based], both GemFire and Geode require and declare Micrometer on the classpath as a compile-time dependency. Technically, the Micrometer bits are pulled in by `org.apache.geode:geode-core:1.9.0` and the Micrometer version @@ -1626,7 +1626,7 @@ is determined by the version of Spring Boot you are using: As of this writing, due to an https://github.com/cloudfoundry/java-buildpack-metric-writer/issues/6[Issue] in the _Java buildpack_ for CloudFoundry, you are also required to put Spring Boot Actuator on the classpath -for your Spring Boot application using Apache Geode or PCC: +for your Spring Boot application using {geode-name} or PCC: .Declaring Spring Boot Actuator on the application classpath [source.xml] @@ -1655,7 +1655,7 @@ OUT at o.s.c.a.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:403) ... ---- -On the other hand, if you try to exclude Micrometer from the Apache Geode or PCC dependency, for example: +On the other hand, if you try to exclude Micrometer from the {geode-name} or PCC dependency, for example: .Excluding the Micrometer dependency from `spring-gemfire-starter` [source,txt] @@ -1675,9 +1675,9 @@ On the other hand, if you try to exclude Micrometer from the Apache Geode or PCC ---- Then, you will get past the _Java buildpack_ Exception, but you will encounter another Exception when Spring Boot -tries to bootstrap Apache Geode on startup: +tries to bootstrap {geode-name} on startup: -.Exception in Apache Geode +.Exception in {geode-name} [source,txt] ---- [OUT] Caused by: java.lang.NoClassDefFoundError: io/micrometer/core/instrument/MeterRegistry @@ -1685,7 +1685,7 @@ tries to bootstrap Apache Geode on startup: ---- Therefore, you must include Spring Boot Actuator on your Spring Boot application classpath when deploying -to Pivotal Platform and using Pivotal Cloud Cache (PCC). Again, the easiest way to do that is include the +to Pivotal Platform and using {cloudcache-name} (PCC). Again, the easiest way to do that is include the `org.springframework.geode:spring-gemfire-starter-actuator` dependency on your application classpath. ***** @@ -1874,12 +1874,12 @@ Again, we see the "_crm-app_". You can click on the app name and drill in to ge image::{images-dir}/pvtl-appsmanager-org-space-apps-crm-app-overview.png[] If you click on "_Service (1)_" in the left navigation bar, you will see that the "_crm-app_" is bound to -the "_pccServiceOne_" Pivotal Cloud Cache service instance: +the "_pccServiceOne_" {cloudcache-name} service instance: image::{images-dir}/pvtl-appsmanager-org-space-apps-crm-app-service.png[] If you click on "_Settings_" in the left navigation bar and "REVEAL ENV VARS" you will find the "_Gfsh login string_" -that you can use to connect to the Pivotal Cloud Cache cluster using _Gfsh_ from your local development environment: +that you can use to connect to the {cloudcache-name} cluster using _Gfsh_ from your local development environment: image::{images-dir}/pvtl-appsmanager-org-space-apps-crm-app-settings.png[] @@ -1993,13 +1993,13 @@ id | name 1 | JonDoe ---- -You successfully deployed the CRM, Spring Boot Apache Geode/Pivotal Cloud Cache `ClientCache` application to the cloud! +You successfully deployed the CRM, Spring Boot {geode-name}/{cloudcache-name} `ClientCache` application to the cloud! In this final incarnation of our CRM, Spring Boot application, SBDG yet again handled many different concerns for us so we did not need to. This is in addition to all the things mentioned above when running the application locally as well as running the application using a client/server topology. Now, we also benefit from: -1. SBDG figures out the connection criteria needed to connect your client to the servers in the Pivotal Cloud Cache +1. SBDG figures out the connection criteria needed to connect your client to the servers in the {cloudcache-name} (PCC) cluster, which is technically extracted from the VCAP environment. SBDG will connect the Spring Boot app to the PCC Locators. 2. SBDG automatically authenticates your Spring Boot app with the PCC cluster providing your app was correctly bound to @@ -2020,10 +2020,10 @@ specifically cover the details of doing so in this guide. Running in a Hybrid Cloud Environment specifically means deploying your CRM, Spring Boot `ClientCache` application to a managed cloud platform environment, such as Pivotal Platform, but connect the app to an externally managed -Apache Geode or Pivotal GemFire cluster, i.e. the GemFire/Geode cluster is running and managed off platform. +{geode-name} or {gemfire-name} cluster, i.e. the GemFire/Geode cluster is running and managed off platform. NOTE: As of this writing, the inverse is also being explored, running your Spring Boot applications off platform, -but connecting those apps to managed data services (e.g. Pivotal Cloud Cache (PCC)) on platform. +but connecting those apps to managed data services (e.g. {cloudcache-name} (PCC)) on platform. There may be cases where you are unable to move your data management architecture for your applications entirely to the cloud. In those cases, SBDG supports a Hybrid Cloud Architecture, that is both an on-prem and off-prem arrangement. @@ -2036,10 +2036,10 @@ link:../index.html#cloudfoundry-geode[here]. [[spring-geode-samples-getting-started-summary]] == Summary -In this guide, we saw first-hand the power of Spring Boot for Apache Geode (SBDG) when building Apache Geode powered +In this guide, we saw first-hand the power of Spring Boot for {geode-name} (SBDG) when building {geode-name} powered Spring Boot applications. -Apache Geode can truly make your Spring Boot applications highly resilient to failures, highly available, performant +{geode-name} can truly make your Spring Boot applications highly resilient to failures, highly available, performant (i.e. high throughput and low latency), without sacrificing consistency, which is paramount to any data intensive application. @@ -2047,7 +2047,7 @@ SBDG handles a lot of low-level application concerns so you do not have to. You can remain on building the application to meet your customers' needs, collect feedback, iterate rapidly, and realize the value proposition sooner. -Indeed, our intended goal is to make developing Apache Geode applications with Spring, and Spring Boot in particular, +Indeed, our intended goal is to make developing {geode-name} applications with Spring, and Spring Boot in particular, a highly productive and enjoyable experience. We hope you enjoy! diff --git a/spring-geode-docs/src/docs/asciidoc/index-docinfo.xml b/spring-geode-docs/src/docs/asciidoc/index-docinfo.xml index 0f6097fec..2fe32e73d 100644 --- a/spring-geode-docs/src/docs/asciidoc/index-docinfo.xml +++ b/spring-geode-docs/src/docs/asciidoc/index-docinfo.xml @@ -1,4 +1,4 @@ -Spring Boot for Apache Geode & Pivotal GemFire +Spring Boot for Apache Geode & VMware Tanzu GemFire {spring-boot-data-geode-version} 2020 diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 51b3d0d29..3de64017f 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -1,5 +1,5 @@ [[spring-boot-data-geode]] -= Spring Boot for Apache Geode & Pivotal GemFire Reference Guide += Spring Boot for Apache Geode & VMware Tanzu GemFire Reference Guide John Blum :revdate: {localdate} :revnumber: {version} @@ -19,6 +19,7 @@ John Blum :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc :apache-geode-website: https://geode.apache.org/ :apache-geode-wiki: https://cwiki.apache.org/confluence/display/GEODE +:pivotal-cloudcache-name: VMware Tanzu GemFire for VMs :pivotal-cloudcache-version: {pivotal-cloudcache-doc-version} :pivotal-cloudcache-docs: https://docs.pivotal.io/p-cloud-cache/{pivotal-cloudcache-version} :pivotal-cloudcache-website: https://pivotal.io/pivotal-cloud-cache @@ -259,7 +260,3 @@ include::{include-dir}/cloudfoundry.adoc[] include::{include-dir}/docker.adoc[] include::{include-dir}/samples.adoc[] include::{include-dir}/appendix.adoc[] - - - - diff --git a/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/locator/SpringBootApacheGeodeLocatorApplication.java b/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/locator/SpringBootApacheGeodeLocatorApplication.java index a6855f309..a15817542 100644 --- a/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/locator/SpringBootApacheGeodeLocatorApplication.java +++ b/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/locator/SpringBootApacheGeodeLocatorApplication.java @@ -30,7 +30,7 @@ /** * The {@link SpringBootApacheGeodeLocatorApplication} class is a Spring Boot application that configures and bootstraps - * an Apache Geode or Pivotal GemFire {@link Locator} application JVM process. + * an Apache Geode {@link Locator} application JVM process. * * @author John Blum * @see org.apache.geode.distributed.Locator diff --git a/spring-geode-samples/boot/configuration/src/main/resources/application-security.properties b/spring-geode-samples/boot/configuration/src/main/resources/application-security.properties index 255c219a7..cad17fb4e 100644 --- a/spring-geode-samples/boot/configuration/src/main/resources/application-security.properties +++ b/spring-geode-samples/boot/configuration/src/main/resources/application-security.properties @@ -1,4 +1,4 @@ -# Security Configuration for Apache Geode/Pivotal GemFire using Spring Boot and Spring Data GemFire properties +# Security Configuration for Apache Geode using Spring Boot and Spring Data for Apache Geode properties spring.boot.data.gemfire.security.ssl.keystore.name=example-trusted-keystore.jks spring.data.gemfire.security.username=test diff --git a/spring-geode-samples/boot/configuration/src/main/resources/application.properties b/spring-geode-samples/boot/configuration/src/main/resources/application.properties index 626ba9078..c6f7d76b7 100644 --- a/spring-geode-samples/boot/configuration/src/main/resources/application.properties +++ b/spring-geode-samples/boot/configuration/src/main/resources/application.properties @@ -1,4 +1,4 @@ -# Configuration for Apache Geode/Pivotal GemFire using Spring Boot and Spring Data GemFire properties +# Configuration for Apache Geode using Spring Boot and Spring Data for Apache Geode properties spring.application.name=CustomerServiceApplication spring.data.gemfire.cache.log-level=error diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/support/CacheWriterSupport.java b/spring-geode/src/main/java/org/springframework/geode/cache/support/CacheWriterSupport.java index 11f6cc73c..55e91854f 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/support/CacheWriterSupport.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/support/CacheWriterSupport.java @@ -21,7 +21,7 @@ import org.apache.geode.cache.RegionEvent; /** - * Class supporting the implementation of Apache Geode / Pivotal GemFire (PCC) {@link CacheWriter CacheWriters}. + * Class supporting the implementation of Apache Geode {@link CacheWriter CacheWriters}. * * @author John Blum * @see org.apache.geode.cache.CacheWriter diff --git a/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java b/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java index 73577487f..12d7b2d81 100644 --- a/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java +++ b/spring-geode/src/main/java/org/springframework/geode/cache/support/RepositoryCacheLoaderWriterSupport.java @@ -34,7 +34,7 @@ import org.springframework.util.Assert; /** - * Abstract base class supporting the implementation of Apache Geode / Pivotal GemFire {@link CacheLoader CacheLoaders} + * Abstract base class supporting the implementation of Apache Geode {@link CacheLoader CacheLoaders} * and {@link CacheWriter CacheWriters} backed by Spring Data {@link Repository Repositories}. * * @author John Blum diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterAvailableConfiguration.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterAvailableConfiguration.java index fb38ee0df..8a6bc5481 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterAvailableConfiguration.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterAvailableConfiguration.java @@ -24,7 +24,7 @@ /** * The {@link ClusterAvailableConfiguration} class is a Spring {@link Configuration @Configuration} class that enables - * configuration when an Apache Geode or Pivotal GemFire cluster of servers are available. + * configuration when an Apache Geode cluster of servers are available. * * @author John Blum * @see org.springframework.boot.autoconfigure.condition.AnyNestedCondition diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfiguration.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfiguration.java index 785819bc6..cb49a3e6d 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfiguration.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfiguration.java @@ -39,7 +39,7 @@ /** * The {@link ClusterNotAvailableConfiguration} class is a Spring {@link Configuration @Configuration} class that - * enables configuration when an Apache Geode or Pivotal GemFire cluster of servers is not available. + * enables configuration when an Apache Geode cluster of servers is not available. * * @author John Blum * @see org.springframework.beans.factory.config.BeanPostProcessor diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableClusterAware.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableClusterAware.java index b583ee7ca..83a44a3e4 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableClusterAware.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableClusterAware.java @@ -25,9 +25,8 @@ import org.springframework.context.annotation.Import; /** - * The {@link EnableClusterAware} helps an Spring Boot application using Apache Geode (or Pivotal GemFire - * / Pivotal Cloud Cache (PCC)) decide whether it needs to operate in {@literal local-only mode} - * or {@literal client/server}. + * The {@link EnableClusterAware} helps an Spring Boot application using Apache Geode decide whether it needs to operate + * in {@literal local-only mode} or {@literal client/server}. * * @author John Blum * @see java.lang.annotation.Annotation diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManager.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManager.java index 8def12aca..577a1c49b 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManager.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManager.java @@ -26,7 +26,7 @@ import org.springframework.context.annotation.Import; /** - * Spring {@link Annotation} to enable Apache Geode or Pivotal GemFire (PCC) Security (Auth). + * Spring {@link Annotation} to enable Apache Geode Security (Auth). * * @author John Blum * @see java.lang.annotation.Annotation diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManagerProxy.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManagerProxy.java index 3559f18b0..df8a890b4 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManagerProxy.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/EnableSecurityManagerProxy.java @@ -26,7 +26,7 @@ import org.springframework.context.annotation.Import; /** - * Spring {@link Annotation} to enable Apache Geode or Pivotal GemFire (PCC) Security (Auth) through proxying. + * Spring {@link Annotation} to enable Apache Geode Security (Auth) through proxying. * * @author John Blum * @see java.lang.annotation.Annotation diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/GroupsConfiguration.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/GroupsConfiguration.java index 3d422818e..d5629e6ad 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/GroupsConfiguration.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/GroupsConfiguration.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.config.annotation; import java.lang.annotation.Annotation; @@ -21,6 +20,7 @@ import org.apache.geode.cache.Cache; import org.apache.geode.cache.client.ClientCache; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportAware; @@ -34,9 +34,8 @@ /** * The {@link GroupsConfiguration} class is a Spring {@link Configuration} class used to configure the {@literal groups} - * in which is member belongs in an Apache Geode/Pivotal GemFire distributed system, whether the member - * is a {@link ClientCache} in a client/server topology or a {@link Cache peer Cache} in a cluster - * using the P2P topology. + * in which is member belongs in an Apache Geode distributed system, whether the member is a {@link ClientCache} + * in a client/server topology or a {@link Cache peer Cache} in a cluster using the P2P topology. * * @author John Blum * @see org.apache.geode.cache.Cache diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/LocatorsConfiguration.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/LocatorsConfiguration.java index 5390058b8..ebc0e2bf4 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/LocatorsConfiguration.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/LocatorsConfiguration.java @@ -21,9 +21,6 @@ import org.apache.geode.cache.Cache; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportAware; @@ -35,10 +32,13 @@ import org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport; import org.springframework.util.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * The {@link LocatorsConfiguration} class is a Spring {@link Configuration} class used to configure Apache Geode - * or Pivotal GemFire's {@literal locators} and/or {@literal remote-locators} properties used by a - * {@link Cache peer Cache member} to join a cluster of servers when using the P2P topology. + * {@literal locators} and/or {@literal remote-locators} properties used by a {@link Cache peer Cache member} + * to join a cluster of servers when using the P2P topology. * * The {@literal remote-locators} property is used to configure the Locators that a cluster will use in order to * connect to a remote site in a multi-site (WAN) topology configuration. To use Locators in a WAN configuration, diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/MemberNameConfiguration.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/MemberNameConfiguration.java index 6aace8efd..3cf7002d5 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/MemberNameConfiguration.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/MemberNameConfiguration.java @@ -38,10 +38,9 @@ import org.springframework.util.StringUtils; /** - * The {@link MemberNameConfiguration} class is a Spring {@link Configuration} class used to configure - * an Apache Geode or Pivotal GemFire's member name in the distributed system, whether the member - * is a {@link ClientCache client} in the client/server topology or a {@link Cache peer} in a cluster - * using the P2P topology. + * The {@link MemberNameConfiguration} class is a Spring {@link Configuration} class used to configure an Apache Geode's + * member name in the distributed system, whether the member is a {@link ClientCache client} in the client/server + * topology or a {@link Cache peer} in a cluster using the P2P topology. * * @author John Blum * @see org.apache.geode.cache.Cache diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseDistributedSystemId.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseDistributedSystemId.java index 499f09611..a53440ace 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseDistributedSystemId.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseDistributedSystemId.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.config.annotation; import java.lang.annotation.Documented; @@ -25,12 +24,13 @@ import org.apache.geode.cache.Cache; import org.apache.geode.cache.client.ClientCache; + import org.springframework.context.annotation.Import; import org.springframework.core.annotation.AliasFor; /** * The {@link UseDistributedSystemId} annotation configures the {@literal distributed-system-id} property - * of a {@link Cache peer Cache member} in an Apache Geode/Pivotal GemFire P2P topology. + * of a {@link Cache peer Cache member} in an Apache Geode P2P topology. * * This configuration annotation is only applicable on {@link Cache peer Cache members} * and has no effect on {@link ClientCache} instances. diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseGroups.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseGroups.java index 6ecb18d2a..dd7ec684e 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseGroups.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseGroups.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.config.annotation; import java.lang.annotation.Documented; @@ -25,12 +24,13 @@ import org.apache.geode.cache.Cache; import org.apache.geode.cache.client.ClientCache; + import org.springframework.context.annotation.Import; import org.springframework.core.annotation.AliasFor; /** * The {@link UseGroups} annotation configures the groups in which the member belongs in an Apache Geode - * or Pivotal GemFire distributed system, whether the member is a {@link ClientCache} in a client/server topology + * distributed system, whether the member is a {@link ClientCache} in a client/server topology * or a {@link Cache peer Cache} in a cluster using the P2P topology. * * @author John Blum diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseLocators.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseLocators.java index b4ee5e07e..3723cc3f6 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseLocators.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseLocators.java @@ -32,7 +32,7 @@ /** * The {@link UseLocators} annotation configures the {@literal locators} and/or {@literal remote-locators} - * Apache Geode/Pivotal GemFire properties used by a {@link Cache peer Cache member} to join a cluster of servers + * Apache Geode properties used by a {@link Cache peer Cache member} to join a cluster of servers * when using the P2P topology as well as when configuring the multi-site, WAN topology. * * @author John Blum diff --git a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseMemberName.java b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseMemberName.java index 720901392..c8aed0878 100644 --- a/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseMemberName.java +++ b/spring-geode/src/main/java/org/springframework/geode/config/annotation/UseMemberName.java @@ -30,8 +30,8 @@ /** * The {@link UseMemberName} annotation configures the {@literal name} of the member in the Apache Geode - * or Pivotal GemFire distributed system, whether the member is a {@link ClientCache client} in - * the client/server topology or a {@link Cache peer Cache member} in the cluster using the P2P topology. + * distributed system, whether the member is a {@link ClientCache client} in the client/server topology + * or a {@link Cache peer Cache member} in the cluster using the P2P topology. * * @author John Blum * @see java.lang.annotation.Documented @@ -53,7 +53,7 @@ public @interface UseMemberName { /** - * Alias for the {@link String name} of the Apache Geode/Pivotal GemFire distributed system member. + * Alias for the {@link String name} of the Apache Geode distributed system member. * * @see #value() */ @@ -61,7 +61,7 @@ String name() default ""; /** - * {@link String Name} used for the Apache Geode/Pivotal GemFire distributed system member. + * {@link String Name} used for the Apache Geode distributed system member. * * @see #name() */ diff --git a/spring-geode/src/main/java/org/springframework/geode/context/annotation/RefreshableAnnotationConfigApplicationContext.java b/spring-geode/src/main/java/org/springframework/geode/context/annotation/RefreshableAnnotationConfigApplicationContext.java index d44d2cf28..5a1820bb4 100644 --- a/spring-geode/src/main/java/org/springframework/geode/context/annotation/RefreshableAnnotationConfigApplicationContext.java +++ b/spring-geode/src/main/java/org/springframework/geode/context/annotation/RefreshableAnnotationConfigApplicationContext.java @@ -53,10 +53,10 @@ * providing the ability to reload/refresh the context at some point later during runtime. * * DISCLAIMER: Currently, this {@link ApplicationContext} implementation (and extension) is being used exclusively for - * testing and experimental (R&D) purposes. It was designed around Apache Geode & Pivotal GemFire's forced-disconnect - * / auto-reconnect functionality, providing support for this behavior inside a Spring context. Specifically, this - * concern is only applicable when using Spring Boot to configure and bootstrap Apache Geode or Pivotal GemFire peer - * member {@link org.apache.geode.cache.Cache} applications, such as when annotating your Spring Boot application with + * testing and experimental (R&D) purposes. It was designed around Apache Geode forced-disconnect / auto-reconnect + * functionality, providing support for this behavior inside a Spring context. Specifically, this concern is only + * applicable when using Spring Boot to configure and bootstrap Apache Geode peer member + * {@link org.apache.geode.cache.Cache} applications, such as when annotating your Spring Boot application with * SDG's {@link PeerCacheApplication} annotation. This {@link ApplicationContext} implementation is not recommended for * use in Production Systems/Applications (yet). * diff --git a/spring-geode/src/main/java/org/springframework/geode/core/env/support/CloudCacheService.java b/spring-geode/src/main/java/org/springframework/geode/core/env/support/CloudCacheService.java index fa75ce6e7..3bed7e926 100644 --- a/spring-geode/src/main/java/org/springframework/geode/core/env/support/CloudCacheService.java +++ b/spring-geode/src/main/java/org/springframework/geode/core/env/support/CloudCacheService.java @@ -69,10 +69,10 @@ private CloudCacheService(String name) { } /** - * Returns an {@link Optional} Gfsh {@link URL}, if configured, used to connect to Pivotal GemFire's + * Returns an {@link Optional} Gfsh {@link URL}, if configured, used to connect to Apache Geode's * Management REST API (service). * - * @return an {@link Optional} Gfsh {@link URL} used to connect to Pivotal GemFire's Management REST API (service). + * @return an {@link Optional} Gfsh {@link URL} used to connect to Apache Geode's Management REST API (service). * @see #withGfshUrl(URL) * @see java.util.Optional * @see java.net.URL @@ -82,11 +82,11 @@ public Optional getGfshUrl() { } /** - * Returns an {@link Optional} {@link String} containing the list of Pivotal GemFire Locator network endpoints. + * Returns an {@link Optional} {@link String} containing the list of Apache Geode Locator network endpoints. * * The format of the {@link String}, if present, is {@literal host1[port1],host2[port2], ...,hostN[portN]}. * - * @return an {@link Optional} {@link String} containing the list of Pivotal GemFire Locator network endpoints. + * @return an {@link Optional} {@link String} containing the list of Apache Geode Locator network endpoints. * @see #withLocators(String) */ public Optional getLocators() { @@ -96,11 +96,11 @@ public Optional getLocators() { } /** - * Returns a {@link List} of Pivotal GemFire Locator network endpoints. + * Returns a {@link List} of Apache Geode Locator network endpoints. * * Returns an {@link Collections#emptyList() empty List} if no Locators were configured. * - * @return a {@link List} of Pivotal GemFire Locator network endpoints. + * @return a {@link List} of Apache Geode Locator network endpoints. * @see #getLocators() */ public List getLocatorList() { @@ -121,10 +121,10 @@ public boolean isTlsEnabled() { } /** - * Builder method used to configure the Gfsh {@link URL} to connect to the Pivotal GemFire + * Builder method used to configure the Gfsh {@link URL} to connect to the Apache Geode * Management REST API (service). * - * @param gfshUrl {@link URL} used to connect to the Pivotal GemFire Management REST API (service). + * @param gfshUrl {@link URL} used to connect to the Apache Geode Management REST API (service). * @return this {@link CloudCacheService}. * @see #getGfshUrl() */ diff --git a/spring-geode/src/main/java/org/springframework/geode/function/config/GemFireFunctionExecutionAutoConfigurationRegistrar.java b/spring-geode/src/main/java/org/springframework/geode/function/config/GemFireFunctionExecutionAutoConfigurationRegistrar.java index 11bcc6c54..4ec7b8190 100644 --- a/spring-geode/src/main/java/org/springframework/geode/function/config/GemFireFunctionExecutionAutoConfigurationRegistrar.java +++ b/spring-geode/src/main/java/org/springframework/geode/function/config/GemFireFunctionExecutionAutoConfigurationRegistrar.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.function.config; import org.apache.geode.cache.execute.Execution; @@ -23,8 +22,7 @@ /** * The {@link GemFireFunctionExecutionAutoConfigurationRegistrar} class is a Spring {@link ImportBeanDefinitionRegistrar} - * used to register SDG POJO interfaces defining Apache Geode/Pivotal GemFire - * {@link Function} {@link Execution Executions} + * used to register SDG POJO interfaces defining Apache Geode {@link Function} {@link Execution Executions}. * * @author John Blum * @see org.apache.geode.cache.execute.Execution diff --git a/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java b/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java index 72ed2e9ae..949e9e4d6 100644 --- a/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java +++ b/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java @@ -21,6 +21,7 @@ import org.apache.geode.security.AuthenticationFailedException; import org.apache.geode.security.ResourcePermission; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; @@ -35,7 +36,7 @@ * which is registered as a managed bean in a Spring context. * * The idea behind this {@link org.apache.geode.security.SecurityManager} is to enable users to be able to configure - * and manage the {@code SecurityManager} as a Spring bean. However, Apache Geode/Pivotal GemFire require + * and manage the {@code SecurityManager} as a Spring bean. However, Apache Geode requires * the {@link org.apache.geode.security.SecurityManager} to be configured using a System property when launching * Apache Geode Servers with Gfsh, which makes it difficult to "manage" the {@code SecurityManager} instance. * @@ -82,8 +83,7 @@ public class SecurityManagerProxy extends LazyWiringDeclarableSupport private org.apache.geode.security.SecurityManager securityManager; /** - * Returns a reference to the single {@link SecurityManagerProxy} instance configured by - * Apache Geode/Pivotal GemFire in startup. + * Returns a reference to the single {@link SecurityManagerProxy} instance configured by Apache Geode in startup. * * @return a reference to the single {@link SecurityManagerProxy} instance. */ @@ -176,6 +176,6 @@ public void destroy() throws Exception { protected BeanFactory locateBeanFactory() { return Optional.ofNullable(this.beanFactory) - .orElseGet(() -> super.locateBeanFactory()); + .orElseGet(super::locateBeanFactory); } } diff --git a/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerSupport.java b/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerSupport.java index 033ffddf2..48051e485 100644 --- a/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerSupport.java +++ b/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerSupport.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.security.support; import java.util.Properties; @@ -22,9 +21,9 @@ import org.apache.geode.security.ResourcePermission; /** - * {@link SecurityManagerSupport} is an abstract base class implementing Apache Geode/Pivotal GemFire's - * {@link org.apache.geode.security.SecurityManager} interface, providing default implementations of the - * {@literal SecurityManager's} auth methods. + * {@link SecurityManagerSupport} is an abstract base class implementing Apache Geode + * {@link org.apache.geode.security.SecurityManager} interface, providing default implementations + * of the {@literal SecurityManager's} auth methods. * * @author John Blum * @see org.apache.geode.security.SecurityManager diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 599f1d0eb..4b34bc28a 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -12,11 +12,11 @@ and consistently. * Includes a new spring-geode-bom module creating a Maven BOM to manage the SBDG module dependency versions in a collective and consistent way. Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/93. -* Revises (Edits) the chapter on "Caching with Apache Geode & Pivotal GemFire". +* Revises (Edits) the chapter on "Caching with Apache Geode & VMware Tanzu GemFire". * Upgrades to Spring Boot 2.3.3.RELEASE. * Upgrades to Spring Data Neumann-SR3. -* Upgrades to Spring Data for Apache Geode & VMware/Pivotal GemFire 2.3.3.RELEASE. -* Upgrades to Spring Test for Apache Geode & VMware/Pivotal GemFire 0.0.18.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.3.3.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.18.RELEASE. * Upgrades to Spring Build Conventions Gradle Plugin 0.0.34.RELEASE. * Upgrades to Byte Buddy 1.10.14. * Upgrades to Gradle 6.6. @@ -140,27 +140,27 @@ Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/86. * Upgrades to Gradle 6.5. * Upgrades to Spring Build Conventions Gradle Plugin 0.0.32.RELEASE. * Upgrades to Spring Boot 2.3.0.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.3.0.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.3.0.RELEASE. * Upgrades to Spring Data Release Train Neumann-RELEASE. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.3.0.RELEASE +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.3.0.RELEASE * Upgrades to Spring Session BOM Dragonfruit-RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.16.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.16.RELEASE. * Upgrades to Testcontainers 1.14.3. Changes in version 1.2.7.RELEASE (2020-05-19) --------------------------------------------- Aligns SBDG with the latest versions of Spring Framework, Spring Boot, Spring Data -and Spring Session for Apache Geode & Pivotal GemFire. +and Spring Session for Apache Geode & VMware Tanzu GemFire. * Asserts the auto-configuration of PDX when no PDX configuration is defined by the user, when PDX configuration is customized with SDG properties and when the user manually configures PDX, thereby overriding auto-configuration. * Upgrades to Spring Framework 5.2.6.RELEASE. * Upgrades to Spring Boot 2.2.7.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.7.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.7.RELEASE. * Upgrades to Spring Data Release Train Moore-SR7. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.4.RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.14.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.4.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.14.RELEASE. * Upgrades to Byte Buddy 1.10.10. * Upgrades to Gradle 6.4.1. * Upgrades to Testcontainers 1.14.1. @@ -169,13 +169,13 @@ customized with SDG properties and when the user manually configures PDX, thereb Changes in version 1.1.7.RELEASE (2020-05-18) --------------------------------------------- Aligns SBDG with the latest versions of Spring Framework, Spring Boot, Spring Data -and Spring Session for Apache Geode & Pivotal GemFire. +and Spring Session for Apache Geode & VMware Tanzu GemFire. * Upgrades to Spring Framework 5.1.15.RELEASE. * Upgrades to Spring Boot 2.1.14.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.17.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.17.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR17. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.10.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.10.RELEASE. * Upgrades to Spring Session BOM Bean-SR10. * Upgrades to Byte Buddy 1.10.10. * Upgrades to Mockito 3.3.3. @@ -194,49 +194,49 @@ public API even easier and more reliable to use, and application friendly. * Upgrades to Byte Buddy 1.10.10. * Upgrades to Spring Framework 5.2.6.RELEASE. * Upgrades to Spring Boot 2.3.0.RC1. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire (SDG) 2.3.0.RC2. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire (SDG) 2.3.0.RC2. * Upgrades to Spring Data Release Train Neumann-RC2. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire (STDG) 0.0.15.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire (STDG) 0.0.15.RELEASE. * Upgrades Testcontainers to 1.14.1. Changes in version 1.3.0.M4 (2020-04-19) ---------------------------------------- Upgrades SBDG to Spring Boot 2.3.0.M4. Aligns with Spring Framework 5.2.5.RELEASE, Spring Data Neumann-RC1, -Spring Session for Apache Geode & Pivotal GemFire (SSDG) 2.3.0.RC2, Spring Test for Apache Geode -& Pivotal GemFire (STDG) 0.0.14.RELEASE. +Spring Session for Apache Geode & VMware Tanzu GemFire (SSDG) 2.3.0.RC2, Spring Test for Apache Geode +& VMware Tanzu GemFire (STDG) 0.0.14.RELEASE. -* Adds new Sample for Multi-Site Caching with Spring's Cache Abstraction and Apache Geode (Pivotal GemFire) Multi-site +* Adds new Sample for Multi-Site Caching with Spring's Cache Abstraction and Apache Geode (VMware Tanzu GemFire) Multi-site WAN Gateway configuration. Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/80. * Adds support for Geode Properties (gemfire.properties) declared in Spring Boot application.properties. Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/79. * Upgrades to Apache Geode 1.12.0. * Upgrades to Byte Buddy 1.10.9. -* Upgrades to Pivotal GemFire 9.10.0. +* Upgrades to VMware Tanzu GemFire 9.10.0. * Upgrades to Spring Framework 5.2.5.RELEASE. * Upgrades to Spring Boot 2.3.0.M4. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire (SDG) 2.3.0.RC1. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire (SDG) 2.3.0.RC1. * Upgrades to Spring Data Release Train Neumann-RC1. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire (SSDG) 2.3.0.RC2. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire (SSDG) 2.3.0.RC2. * Upgrades to Spring Session BOM Dragonfruit-RC2. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire (STDG) 0.0.14.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire (STDG) 0.0.14.RELEASE. * Upgrades Testcontainers to 1.14.0. Changes in version 1.2.6.RELEASE (2020-03-27) --------------------------------------------- Aligns SBDG with Spring Boot 2.2.6.RELEASE, Spring Framework 5.2.5.RELEASE, Spring Data Release Train Moore-SR6, -Spring Session Corn-SR2, Spring Test for Apache Geode & Pivotal GemFire 0.0.13.RELEASE, Apache Geode 1.9.2, -and Pivotal GemFire 9.8.7. +Spring Session Corn-SR2, Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.13.RELEASE, Apache Geode 1.9.2, +and VMware Tanzu GemFire 9.8.7. * Fix SSL auto-configuration when TLS is enabled to properly configure the SSL default context; See https://github.com/spring-projects/spring-boot-data-geode/issues/77. * Upgrades to Gradle 6.2. * Upgrades to Mockito 3.3.3. -* Upgrades to Pivotal GemFire 9.8.7. +* Upgrades to VMware Tanzu GemFire 9.8.7. * Upgrades to Spring Framework 5.2.5.RELEASE. * Upgrades to Spring Boot 2.2.6.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.6.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.6.RELEASE. * Upgrades to Spring Data Release Train Moore-SR6. * Upgrades to Spring Session BOM Corn-SR2. @@ -244,8 +244,8 @@ See https://github.com/spring-projects/spring-boot-data-geode/issues/77. Changes in version 1.3.0.M3 (2020-03-20) ---------------------------------------- Upgrades SBDG to Spring Boot 2.3.0.M3. Aligns with Spring Framework 5.2.4.RELEASE, Spring Data Neumann-M4, -Spring Session for Apache Geode & Pivotal GemFire (SSDG) 2.3.0.RC1, Spring Test for Apache Geode -& Pivotal GemFire (STDG) 0.0.13.RELEASE. +Spring Session for Apache Geode & VMware Tanzu GemFire (SSDG) 2.3.0.RC1, Spring Test for Apache Geode +& VMware Tanzu GemFire (STDG) 0.0.13.RELEASE. * Adds Maven POM file(s) for SBDG Samples in order to build and run the Sample Code independently from the main project Gradle build. Resolves (partly) https://github.com/spring-projects/spring-boot-data-geode/issues/75. @@ -256,23 +256,23 @@ Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/77. * Upgrades to Mockito 3.3.3. * Upgrades to Spring Framework 5.2.4.RELEASE. * Upgrades to Spring Boot 2.3.0.M3. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.3.0.M4. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.3.0.M4. * Upgrades to Spring Data Release Train Neumann-M4. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.3.0.RC1. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.13.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.3.0.RC1. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.13.RELEASE. * Upgrades to Testcontainers 1.13.0. Changes in version 1.2.5.RELEASE (2020-03-04) --------------------------------------------- Aligns SBDG with Spring Framework 5.2.4.RELEASE, Spring Boot 2.2.5.RELEASE, Spring Data Moore-SR5 -and Spring Session for Apache Geode & Pivotal GemFire 2.2.3.RELEASE. +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.3.RELEASE. * Upgrades to Spring Framework 5.2.4.RELEASE. * Upgrades to Spring Boot 2.2.5.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.5.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.5.RELEASE. * Upgrades to Spring Data Release Train Moore-SR5. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.3.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.3.RELEASE. * Upgrades to Spring Session BOM Corn-SR1 * Upgrades to Mockito 3.3.0. @@ -280,13 +280,13 @@ and Spring Session for Apache Geode & Pivotal GemFire 2.2.3.RELEASE. Changes in version 1.1.6.RELEASE (2020-03-04) --------------------------------------------- Aligns SBDG with Spring Framework 5.1.14.RELEASE, Spring Boot 2.1.13.RELEASE, Spring Data Lovelace-SR16 -and Spring Session for Apache Geode & Pivotal GemFire 2.1.9.RELEASE. +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.9.RELEASE. * Upgrades to Spring Framework 5.1.14.RELEASE. * Upgrades to Spring Boot 2.1.13.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.16.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.16.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR16. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.9.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.9.RELEASE. * Upgrades to Spring Session BOM Bean-SR9. * Upgrades to Byte Buddy 1.10.8. * Upgrades to Mockito 3.3.0. @@ -296,40 +296,40 @@ and Spring Session for Apache Geode & Pivotal GemFire 2.1.9.RELEASE. Changes in version 1.3.0.M2 (2020-02-20) ---------------------------------------- Aligns SBDG with Spring Boot 2.3.0.M2. Upgrades to Spring Data Neumann-M3, Spring Session for Apache Geode -& Pivotal GemFire 2.3.0.M2 and Spring Test for Apache Geode & Pivotal GemFire 0.0.13.RELEASE. Adds new +& VMware Tanzu GemFire 2.3.0.M2 and Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.13.RELEASE. Adds new spring-geode-starter-logging module to configure Apache Geode logging. * Upgrades to Spring Boot 2.3.0.M2. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.3.0.M3. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.3.0.M3. * Upgrades to Spring Data Release Train Neumann-M3. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.3.0.M2. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.3.0.M2. * Upgrades to Spring Session BOM Dragonfruit-M2. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.13.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.13.RELEASE. * Upgrades to Byte Buddy 1.10.7. * Upgrades to FreeFair Lombok Gradle Plugin 5.0.0-rc2. * Upgrades to Testcontainers 1.12.5. * Began removing uses of internal Apache Geode APIs from SBDG; Resolves (partly) https://github.com/spring-projects/spring-boot-data-geode/issues/70. -* Adds a new spring-geode-starter-logging module to configure and control Apache Geode & Pivotal GemFire logging; +* Adds a new spring-geode-starter-logging module to configure and control Apache Geode & VMware Tanzu GemFire logging; Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/73. -* Adds documentation on how to enable Apache Geode & Pivotal GemFire logging with Spring Boot; +* Adds documentation on how to enable Apache Geode & VMware Tanzu GemFire logging with Spring Boot; Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/71. -* Adds documentation on how to configure and bootstrap Apache Geode/Pivotal GemFire Managers with Spring Boot; +* Adds documentation on how to configure and bootstrap Apache Geode/VMware Tanzu GemFire Managers with Spring Boot; Resolves https://github.com/spring-projects/spring-boot-data-geode/issues/72. Changes in version 1.3.0.M1 (2020-01-24) ---------------------------------------- Aligns SBDG with Spring Framework 5.2.3.RELEASE, Spring Boot 2.3.0.M1, Spring Data Neumann-M2 -and Spring Session for Apache Geode & Pivotal GemFire 2.3.0.M1 +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.3.0.M1 * Upgrades to Spring Framework 5.2.3.RELEASE. * Upgrades to Spring Boot 2.3.0.M1 -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.3.0.M2 +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.3.0.M2 * Upgrades to Spring Data Release Train Nuemann-M2. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.3.0.M1 +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.3.0.M1 * Upgrades to Spring Session BOM Corn-RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.13.NEUMANN-BUILD-SNAPSHOT. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.13.NEUMANN-BUILD-SNAPSHOT. * Upgrades to ByteBuddy 1.10.5 * Upgrades to Mockito 3.2.4. * Removes some uses of internal Apache Geode APIs to resolve gh-70. @@ -345,15 +345,15 @@ Aligns SBDG with Spring Boot 2.2.4.RELEASE. Changes in version 1.2.3.RELEASE (2020-01-24) --------------------------------------------- Aligns SBDG with Spring Framework 5.2.3.RELEASE, Spring Boot 2.2.3.RELEASE, Spring Data Moore-SR4 -and Spring Session for Apache Geode & Pivotal GemFire 2.2.2.RELEASE. +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.2.RELEASE. * Upgrades to Spring Framework 5.2.3.RELEASE. * Upgrades to Spring Boot 2.2.3.RELEASE -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.4.RELEASE +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.4.RELEASE * Upgrades to Spring Data Release Train Moore-SR4. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.2.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.2.RELEASE. * Upgrades to Spring Session BOM Corn-RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.12.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.12.RELEASE. * Upgrades to Mockito 3.2.4. * Removes some uses of internal Apache Geode APIs to resolve gh-70. @@ -361,13 +361,13 @@ and Spring Session for Apache Geode & Pivotal GemFire 2.2.2.RELEASE. Changes in version 1.1.5.RELEASE (2020-01-24) --------------------------------------------- Aligns SBDG with Spring Framework 5.1.13.RELEASE, Spring Boot 2.1.12.RELEASE, Spring Data Lovelace-SR15 -and Spring Session for Apache Geode & Pivotal GemFire 2.1.8.RELEASE. +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.8.RELEASE. * Upgrades to Spring Framework 5.1.13.RELEASE. * Upgrades to Spring Boot 2.1.12.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.15.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.15.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR15. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.8.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.8.RELEASE. * Upgrades to Spring Session BOM Bean-SR8. * Upgrades to Mockito 3.2.4. @@ -375,17 +375,17 @@ and Spring Session for Apache Geode & Pivotal GemFire 2.1.8.RELEASE. Changes in version 1.2.2.RELEASE (2019-12-11) --------------------------------------------- Aligns SBDG with Spring Framework 5.2.2.RELEASE, Spring Boot 2.2.2.RELEASE, Spring Data Moore-SR3 -and Spring Session for Apache Geode & Pivotal GemFire 2.2.1.RELEASE. +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.1.RELEASE. * Improves EnableClusterAware configuration logic to identify CacheTypeAwareRegionFactoryBeans. * Configures the Pool used by Spring Session to the DEFAULT Pool. * Upgrades to Spring Framework 5.2.2.RELEASE. * Upgrades to Spring Boot 2.2.2.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.3.RELEASE +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.3.RELEASE * Upgrades to Spring Data Release Train Moore-SR3. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.1.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.1.RELEASE. * Upgrades to Spring Session BOM Corn-RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.11.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.11.RELEASE. * Upgrades to Mockito 3.2.0. * Upgrades to TestContainers 1.12.3. @@ -393,13 +393,13 @@ and Spring Session for Apache Geode & Pivotal GemFire 2.2.1.RELEASE. Changes in version 1.1.4.RELEASE (2019-12-11) --------------------------------------------- Aligns SBDG with Spring Framework 5.1.12.RELEASE, Spring Boot 2.1.11.RELEASE, Spring Data Lovelace-SR14 -and Spring Session for Apache Geode & Pivotal GemFire 2.1.7.RELEASE. +and Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.7.RELEASE. * Upgrades to Spring Framework 5.1.12.RELEASE. * Upgrades to Spring Boot 2.1.11.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.14.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.14.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR14. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.7.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.7.RELEASE. * Upgrades to Spring Session BOM Bean-SR8. * Upgrades to Gradle Wrapper (gradlew) 5.6.4. * Upgrades to Mockito 3.2.0. @@ -415,7 +415,7 @@ coverage around cluster configuration metadata push from client to server. Geode's cluster configuration push from client to server using REST over HTTP. * Upgrades to Spring Framework 5.2.1.RELEASE. * Upgrades to Spring Boot 2.2.1.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.1.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.1.RELEASE. * Upgrades to Spring Data Release Train Moore-SR1. @@ -428,28 +428,28 @@ test coverage around cluster configuration metadata push from client to server. Spring Data Geode's cluster configuration push from client to server over HTTP/REST. * Upgrades to Spring Framework 5.1.11.RELEASE. * Upgrades to Spring Boot 2.1.10.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.12.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.12.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR12. Changes in version 1.2.0.RELEASE (2019-10-18) --------------------------------------------- Tidies up the SBDG project for the 1.2 GA release. Removes the spring-cloudcache-starter* modules and then clarifies -in documentation about switching from Apache Geode to Pivotal GemFire bits, even in the context of Pivotal Platform +in documentation about switching from Apache Geode to VMware Tanzu GemFire bits, even in the context of Pivotal Platform (PCF) using Pivotal Cloud Cache (PCC). Adds auto-configuration support for TLS in PCF when using PCC. * Adds auto-configuration support to detect when TLS is enabled in PCF when using PCC and then configures SSL between the client and servers in a PCC cluster using the default SSL context provided via the JRE. See https://github.com/spring-projects/spring-boot-data-geode/issues/61. -* Edits the documentation in the Appendix on switching between Apache Geode and Pivotal GemFire or Pivotal Cloud Cache +* Edits the documentation in the Appendix on switching between Apache Geode and VMware Tanzu GemFire or Pivotal Cloud Cache (PCC) with additional details on the required Pivotal Commercial Repository declaration as well ass the server declaration containing user credentials required to authenticate with the repo in ~/.m2/settings.xml. See https://github.com/spring-projects/spring-boot-data-geode/issues/62. * Removes all spring-cloudcache-starter* modules. User must use the spring-gemfire-starter* modules for both -Pivotal GemFire as well as Pivotal Cloud Cache (PCC). +VMware Tanzu GemFire as well as Pivotal Cloud Cache (PCC). See https://github.com/spring-projects/spring-boot-data-geode/issues/63. * Upgrades to Spring Boot 2.2.0.RELEASE. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.0.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.0.RELEASE. * Upgrades to Spring Session BOM Corn-RELEASE. @@ -467,14 +467,14 @@ See https://github.com/spring-projects/spring-boot-data-geode/issues/59. See https://github.com/spring-projects/spring-boot-data-geode/issues/51. * Upgrades to Apache Geode 1.9.1. * Upgrades to Mockito 3.1.0. -* Upgrades to Pivotal GemFire 9.8.4. +* Upgrades to VMware Tanzu GemFire 9.8.4. * Upgrades to Spring Framework 5.2.0.RELEASE * Upgrades to Spring Boot 2.2.0.RC1. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.0.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.0.RELEASE. * Upgrades to Spring Data Release Train Moore-RELEASE. * Upgrades to Spring Session BOM Corn-RC1. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.0.RC1. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.9.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.0.RC1. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.9.RELEASE. Changes in version 1.1.2.RELEASE (2019-10-02) @@ -483,16 +483,16 @@ Fixes auto-wiring issues with auto-configured per Region GemfireTemplate beans i * Fixes auto-wiring issue with the auto-configure Region GemfireTemplate beans provided by SBDG. See https://github.com/spring-projects/spring-boot-data-geode/issues/55. -* Edits documentation providing details on how to acquire the Pivotal Cloud Cache (PCC) or Pivotal GemFire bits -when switching between Apache Geode and Pivotal GemFire or PCC. +* Edits documentation providing details on how to acquire the Pivotal Cloud Cache (PCC) or VMware Tanzu GemFire bits +when switching between Apache Geode and VMware Tanzu GemFire or PCC. See https://github.com/spring-projects/spring-boot-data-geode/issues/59. * Upgrades to Mockito 3.1.0 * Upgrades to Spring Framework 5.1.10.RELEASE. * Upgrades to Spring Boot 2.1.9.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.11.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.11.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR11. * Upgrades to Spring Session BOM Bean-SR8. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.6.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.6.RELEASE. Changes in version 1.2.0.M3 (2019-09-24) @@ -527,7 +527,7 @@ https://github.com/spring-projects/spring-boot-data-geode/issues/44 and bootstrapping Apache Geode Locator applications using Spring Boot and the SDG @LocatorApplication annotation. * Adds documentation to the Reference Guide on configuring and bootstrapping Apache Geode Locator-based application using Spring Boot and the SDG @LocatorApplication annotation. An example class is also provided. -* Changes Apache Geode documentation references to version 1.9 and Pivotal GemFire documentation references +* Changes Apache Geode documentation references to version 1.9 and VMware Tanzu GemFire documentation references to version 9.8. * Edits the documentation on 'Building ClientCache Applications' in the Reference Guide. * Edits the documentation on 'Building Embedded (Peer & Server) Cache Applications' in the Reference Guide. @@ -550,11 +550,11 @@ a required SDG dependency. https://github.com/spring-projects/spring-boot-data-geode/issues/45 * Upgrades to Spring Framework 5.2.0.RC2 * Upgrades to Spring Boot 2.2.0.M6 -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.0.RC3. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.0.RC3. * Upgrades to Spring Data Release Train Moore-RC3. * Upgrades to Spring Session BOM Corn-M4. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.0.M4. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.8.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.0.M4. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.8.RELEASE. Changes in version 1.1.1.RELEASE (2019-09-11) @@ -574,7 +574,7 @@ and disabling the ClientSecurityAutoConfiguration. * Fixes the EnableSslCondition and nested Conditions to properly consider the SBDG property for enabling and disabling the SslAutoConfiguration. * Upgrades to Spring Boot 2.1.8.RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.8.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.8.RELEASE. Changes in version 1.2.0.M1 (2019-08-21) @@ -583,13 +583,13 @@ Rebases SBDG on Spring Framework 5.2, Spring Boot 2.2, Spring Data Moore/2.2 and * Upgrades to Apache Geode 1.9.0. * Upgrades to the Apache Geode Management REST API 1.9.0 for testing cluster configuration and Auth. -* Upgrade to Pivotal GemFire 9.8.3 +* Upgrade to VMware Tanzu GemFire 9.8.3 * Upgrades to Spring Framework 2.2.0.BUILD-SNAPSHOT. * Upgrades to Spring Boot 2.2.0.BUILD-SNAPSHOT. * Upgrades to Spring Data Release Train Moore-BUILD-SNAPSHOT. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.2.0.BUILD-SNAPSHOT. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.2.0.BUILD-SNAPSHOT. * Upgrades to Spring Session BOM Corn-BUILD-SNAPSHOT. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.2.0.BUILD-SNAPSHOT. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.2.0.BUILD-SNAPSHOT. Changes in version 1.1.0.RELEASE (2019-08-21) @@ -613,10 +613,10 @@ Adds a new Sample with Guide and Code on Near Caching. * Edits the Sample Guides on Look-Aside Caching and Inline Caching. * Upgrades to Spring Framework 5.1.9.RELEASE. * Upgrades to Spring Boot 2.1.7.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.10.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.10.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR10. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.5.RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.7.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.5.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.7.RELEASE. * Upgrades to Test Containers 1.11.3. @@ -627,7 +627,7 @@ Adds a new Sample with Guide and Code on Inline Caching. * Adds a new Sample with Guide and Example Spring Boot application showcasing Inline Caching. * Refactors and cleans up the SBDG Maven POM generation. * Upgrades to Mockito 3.0.0. -* Upgrades to Pivotal GemFire 9.5.4. +* Upgrades to VMware Tanzu GemFire 9.5.4. * Upgrades to Spring Build Conventions Gradle Plugin 0.0.26.RELEASE. * Cleans up all uses of HTTP URLs, switching to HTTPS. @@ -635,42 +635,42 @@ Adds a new Sample with Guide and Code on Inline Caching. Changes in version 1.1.0.M3 (2019-07-03) ---------------------------------------- Adds support for deploying Spring Boot, ClientCache applications to Pivotal CloudFoundry (PCF) connected to an external, -standalone Apache Geode or Pivotal GemFire cluster. +standalone Apache Geode or VMware Tanzu GemFire cluster. * Adds support for hybrid cloud deployments, pushing Spring Boot, ClientCache applications to PCF connected to -an external, standalone Apache Geode or Pivotal GemFire cluster. +an external, standalone Apache Geode or VMware Tanzu GemFire cluster. * Adds support to target a specific Pivotal Cloud Cache (PCC) service instance when multiple PCC service instances are bound to a Spring Boot, ClientCache application in Pivotal CloudFoundry (PCF). -* Adds auto-configuration for Apache Geode & Pivotal GemFire logging. +* Adds auto-configuration for Apache Geode & VMware Tanzu GemFire logging. * Adds a new section in the Appendix describing how to switch between open source Apache Geode & Pivotal Cloud Cache, -or alternatively, Pivotal GemFire. +or alternatively, VMware Tanzu GemFire. * Upgrades to Spring Boot 2.1.6.RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.5.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.5.RELEASE. * Upgrades to Spring Session BOM Bean-SR6. Changes in version 1.1.0.M2 (2019-06-14) ---------------------------------------- Adds support for the Inline Caching Use Case (UC) along with Spring Boot Starters for Spring Session -and Spring Test for Apache Geode & Pivotal GemFire (STDG). +and Spring Test for Apache Geode & VMware Tanzu GemFire (STDG). * Adds the InlineCachingRegionConfigurer, RepositoryCacheLoader and RepositoryCacheWriter to support Inline Caching. * Adds the a @EnableSecurityManagerProxy annotation for conveniently locating and configuring an Apache Geode SecurityManager implementation declared and registered as a bean in the Spring application context. * Adds the spring-geode-starter-session and spring-gemfire-starter-session modules to help users get started with -(HTTP) Session Caching using either Apache Geode or Pivotal GemFire as the provider. +(HTTP) Session Caching using either Apache Geode or VMware Tanzu GemFire as the provider. * Adds the spring-geode-starter-test and spring-gemfire-starter-test modules, which automatically pulls in -spring-boot-starter-test and Spring Test for Apache Geode & Pivotal GemFire (STDG) to help users test their Apache Geode -or Pivotal GemFire applications in a Spring context. +spring-boot-starter-test and Spring Test for Apache Geode & VMware Tanzu GemFire (STDG) to help users test their Apache Geode +or VMware Tanzu GemFire applications in a Spring context. * Includes early support for @LocatorApplication annotated Spring Boot applications enabling users to configure and bootstrap a GemFire/Geode Locator using Spring Boot. * Includes additional integration tests for customizing the auto-configuration of GemFire/Geode Pools using SDG Configurers. * Upgrades to Spring Framework 5.1.8.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.9.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.9.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR9. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.4.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.4.RELEASE. * Upgrades to Spring Session BOM Bean-SR5. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.4.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.4.RELEASE. Changes in version 1.0.1.RELEASE (2019-06-13) @@ -681,24 +681,24 @@ Provides support for configuring and bootstrapping Spring Boot, Apache Geode Loc * Adds the a @EnableSecurityManagerProxy annotation for conveniently locating and configuring an Apache Geode SecurityManager implementation declared and registered as a bean in the Spring application context. * Upgrades to Spring Framework 5.0.14.RELEASE. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.2.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.2.RELEASE. Changes in version 1.1.0.M1 (2019-05-07) ---------------------------------------- Rebases SBDG on Spring Framework 5.1, Spring Boot 2.1, Spring Data Lovelace (2.1) and Spring Session 2.1. -* Adds the @EnableSecurityManager annotation and associated configuration class to configure Apache Geode & Pivotal GemFire Security (Auth) using the CacheFactory API. -* Adds the @EnableSecurityManagerProxy annotation and associated configuration class to configure Apache Geode & Pivotal GemFire Security (Auth) using the security-manager property with proxying. +* Adds the @EnableSecurityManager annotation and associated configuration class to configure Apache Geode & VMware Tanzu GemFire Security (Auth) using the CacheFactory API. +* Adds the @EnableSecurityManagerProxy annotation and associated configuration class to configure Apache Geode & VMware Tanzu GemFire Security (Auth) using the security-manager property with proxying. * Upgrades to Apache Geode 1.6.0. * Upgrades to the Apache Geode Management REST API 1.6.0 for testing cluster configuration and Auth. -* Upgrades to Pivotal GemFire 9.5.3. +* Upgrades to VMware Tanzu GemFire 9.5.3. * Upgrades to Spring Framework 5.1.6.RELEASE. * Upgrades to Spring Boot 2.1.4.RELEASE. -* Upgrades to Spring Data for Apache Geode & Pivotal GemFire 2.1.6.RELEASE. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.1.6.RELEASE. * Upgrades to Spring Data Release Train Lovelace-SR6. * Upgrades to Spring Session BOM Bean-SR4. -* Upgrades to Spring Session for Apache Geode & Pivotal GemFire 2.1.3.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.1.3.RELEASE. Changes in version 1.0.0.RELEASE (2019-05-06) @@ -708,15 +708,15 @@ Edits documentation and adds Sample with Guide and Example Application code for * Fix release (milestone, release candidate, and GA) version of the reference documentation. * Fix image links in reference docs. * Add Sample with Guide and Example Application code covering the Look-Aside Caching pattern. -* Upgrade to Spring Data for Apache Geode & Pivotal GemFire Test 0.0.1.RELEASE. +* Upgrade to Spring Data for Apache Geode & VMware Tanzu GemFire Test 0.0.1.RELEASE. Changes in version 1.0.0.RC2 (2019-04-30) ----------------------------------------- -Adds additional tests and includes a sample of using Spring Boot Actuator with Apache Geode and Pivotal GemFire. +Adds additional tests and includes a sample of using Spring Boot Actuator with Apache Geode and VMware Tanzu GemFire. * Adds a sample containing a guide along with example code to show how to use Spring Boot Actuator -with Apache Geode or Pivotal GemFire. +with Apache Geode or VMware Tanzu GemFire. * Adds the 'org.springframework.boot:spring-boot-autoconfigure-processor' dependency to 'spring-geode-autoconfigure'. * Includes documentation edits. * Includes the JCache API as runtime dependency in both the 'spring-geode-starter' as well as the 'spring-gemfire-starter'. @@ -728,14 +728,14 @@ with Apache Geode or Pivotal GemFire. Changes in version 1.0.0.RC1 (2019-04-24) ----------------------------------------- -Adds support for GemfireTemplate auto-configuration for each declared Apache Geode & Pivotal GemFire Region. +Adds support for GemfireTemplate auto-configuration for each declared Apache Geode & VMware Tanzu GemFire Region. -* Adds auto-configuration to automatically create a GemfireTemplate for each declared Apache Geode or Pivotal GemFire +* Adds auto-configuration to automatically create a GemfireTemplate for each declared Apache Geode or VMware Tanzu GemFire Region (https://github.com/spring-projects/spring-boot-data-geode/issues/31). * Includes the 'Auto-configuration vs. Annotation-based configuration' chapter in reference documentation to explain the differences of each approach (https://github.com/spring-projects/spring-boot-data-geode/issues/20). * Adds a sample containing a guide along with example code to explain and show how the Spring Boot auto-configuration -support for Apache Geode & Pivotal GemFire works, complimenting the 'Auto-configuration vs. Annotation-based configuration' +support for Apache Geode & VMware Tanzu GemFire works, complimenting the 'Auto-configuration vs. Annotation-based configuration' chapter in the reference docs. * Fixes the HTTP client authentication bug when a client attempts to push cluster configuration to the server configured with a SecurityManager, requiring Authentication (https://github.com/spring-projects/spring-boot-data-geode/issues/16). @@ -762,41 +762,41 @@ and encapsulate configuration meta-data specified in properties files. * Upgrades to Spring Boot 2.0.8.RELEASE. * Upgrades to Spring Data Release Train Kay-SR13. * Upgrades to Spring Session Apple-SR8. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.1.RC1. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.1.RC1. Changes in version 1.0.0.M3 (2018-09-20) ---------------------------------------- Adds support for Spring Boot Actuator HealthIndicator endpoints providing details and insight into the runtime operation -of either Apache Geode or Pivotal GemFire. +of either Apache Geode or VMware Tanzu GemFire. Partly resolves (https://github.com/spring-projects/spring-boot-data-geode/issues/4). -* Adds Spring Boot Actuator HealthIndicators for the Apache Geode & Pivotal GemFire peer Cache and ClientCache instances, +* Adds Spring Boot Actuator HealthIndicators for the Apache Geode & VMware Tanzu GemFire peer Cache and ClientCache instances, the DistributedSystem, the DistributedMember and the ResourceManager. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire Regions. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire Indexes. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire DiskStores. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire ContinuousQueries. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire Pools. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire CacheServers. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire GatewaySenders. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire GatewayReceivers. -* Adds Spring Boot Actuator HealthIndicators for Apache Geode & Pivotal GemFire AsyncEventQueues. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire Regions. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire Indexes. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire DiskStores. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire ContinuousQueries. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire Pools. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire CacheServers. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire GatewaySenders. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire GatewayReceivers. +* Adds Spring Boot Actuator HealthIndicators for Apache Geode & VMware Tanzu GemFire AsyncEventQueues. * Upgrades to Mockito 2.22.0. * Upgrades to Spring Framework 5.0.9.RELEASE. * Upgrades to Spring Boot 2.0.5.RELEASE. * Upgrades to Spring Data Release Train Kay-SR10. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.1.M4. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.1.M4. Changes in version 1.0.0.M2 (2018-08-29) ---------------------------------------- -Adds support to auto-configure Spring Session using Apache Geode or Pivotal GemFire as the Session state +Adds support to auto-configure Spring Session using Apache Geode or VMware Tanzu GemFire as the Session state management provider. -* Adds support to auto-configure Spring Session for Apache Geode or Pivotal GemFire as the Spring Session provider -when Spring Session for Apache Geode or Pivotal GemFire is on the classpath +* Adds support to auto-configure Spring Session for Apache Geode or VMware Tanzu GemFire as the Spring Session provider +when Spring Session for Apache Geode or VMware Tanzu GemFire is on the classpath (https://github.com/spring-projects/spring-boot-data-geode/issues/3). * Improve caching provider auto-configuration to respect 'spring.cache.type' (https://github.com/spring-projects/spring-boot-data-geode/issues/11). @@ -804,23 +804,23 @@ when Spring Session for Apache Geode or Pivotal GemFire is on the classpath * Upgrades to Spring Framework 5.0.8.RELEASE. * Upgrades to Spring Boot 2.0.4.RELEASE. * Upgrades to Spring Data Release Train Kay-SR9. -* Upgrades to Spring Test for Apache Geode & Pivotal GemFire 0.0.1.M3. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.1.M3. Changes in version 1.0.0.M1 (2018-06-25) ---------------------------------------- -Inception of the Spring Boot for Apache Geode & Pivotal GemFire project. +Inception of the Spring Boot for Apache Geode & VMware Tanzu GemFire project. * Adds the spring-geode module containing the core bits and functionality for this project. * Adds the spring-geode-autoconfigure module building on Spring Boot's auto-configuration functionality. ** Includes auto-configuration for a ClientCache instance. -** Includes auto-configuration for using Apache Geode & Pivotal GemFire as a caching provider in Spring's Cache Abstraction. +** Includes auto-configuration for using Apache Geode & VMware Tanzu GemFire as a caching provider in Spring's Cache Abstraction. ** Includes auto-configuration for Spring Data Repositories. -** Includes auto-configuration for Apache Geode & Pivotal GemFire Function Execution framework. -** Includes auto-configuration for Apache Geode & Pivotal GemFire CQ. -** Includes auto-configuration for Apache Geode & Pivotal GemFire PDX serialization. -** Includes auto-configuration for Apache Geode & Pivotal GemFire Security (Authentication/Authorization). -** Includes auto-configuration for Apache Geode & Pivotal GemFire Security (TLS using SSL). +** Includes auto-configuration for Apache Geode & VMware Tanzu GemFire Function Execution framework. +** Includes auto-configuration for Apache Geode & VMware Tanzu GemFire CQ. +** Includes auto-configuration for Apache Geode & VMware Tanzu GemFire PDX serialization. +** Includes auto-configuration for Apache Geode & VMware Tanzu GemFire Security (Authentication/Authorization). +** Includes auto-configuration for Apache Geode & VMware Tanzu GemFire Security (TLS using SSL). * Adds the spring-geode-docs modules containing the project documentation and reference guide. * Adds the spring-geode-starter module to get started building Spring Boot applications with Apache Geode. -* Adds the spring-gemfire-starter module to get started building Spring Boot applications with Pivotal GemFire. +* Adds the spring-gemfire-starter module to get started building Spring Boot applications with VMware Tanzu GemFire. diff --git a/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterAvailableConfigurationIntegrationTests.java b/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterAvailableConfigurationIntegrationTests.java index 57b9521eb..1958912d9 100644 --- a/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterAvailableConfigurationIntegrationTests.java +++ b/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterAvailableConfigurationIntegrationTests.java @@ -21,6 +21,12 @@ import javax.annotation.Resource; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + import org.apache.geode.cache.DataPolicy; import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.Region; @@ -28,12 +34,6 @@ import org.apache.geode.cache.client.ClientRegionShortcut; import org.apache.geode.cache.server.CacheServer; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -54,7 +54,7 @@ /** * Integration Tests asserting the functionality and behavior of {@link EnableClusterAware} - * and {@link ClusterAvailableConfiguration} when the Apache Geode (or Pivotal GemFire) cluster of servers is available. + * and {@link ClusterAvailableConfiguration} when the Apache Geode cluster of servers is available. * * @author John Blum * @see org.junit.Test diff --git a/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfigurationIntegrationTests.java b/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfigurationIntegrationTests.java index 3186d0514..efcfb1725 100644 --- a/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfigurationIntegrationTests.java +++ b/spring-geode/src/test/java/org/springframework/geode/config/annotation/ClusterNotAvailableConfigurationIntegrationTests.java @@ -43,7 +43,7 @@ /** * Integration Tests asserting the functionality and behavior of {@link EnableClusterAware} - * and {@link ClusterNotAvailableConfiguration} when the Apache Geode (or Pivotal GemFire) cluster of servers + * and {@link ClusterNotAvailableConfiguration} when the Apache Geode cluster of servers * is not available. * * @author John Blum diff --git a/spring-geode/src/test/java/org/springframework/geode/config/annotation/LocatorsConfigurationIntegrationTests.java b/spring-geode/src/test/java/org/springframework/geode/config/annotation/LocatorsConfigurationIntegrationTests.java index 48fbe3653..d37b22d2a 100644 --- a/spring-geode/src/test/java/org/springframework/geode/config/annotation/LocatorsConfigurationIntegrationTests.java +++ b/spring-geode/src/test/java/org/springframework/geode/config/annotation/LocatorsConfigurationIntegrationTests.java @@ -162,7 +162,7 @@ LocatorConfigurer locatorUseClusterConfigurationConfigurer() { } // TODO: replace with STDG when STDG is rebased on SD[G] Moore/2.2 and STDG includes dedicated mocking support - // for Apache Geode/Pivotal GemFire Locator creation using SDG's o.s.d.g.LocatorFactoryBean + // for Apache Geode Locator creation using SDG's o.s.d.g.LocatorFactoryBean @EnableGemFireMockObjects @PeerCacheApplication(logLevel = "error") @UseLocators(locators = "mailbox[11235],skullbox[12480]", remoteLocators = "remotehost[10334]") From 8154e85d5ae1587828633fce177fba3b25cc2a5e Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 17:51:17 -0700 Subject: [PATCH 061/216] Remove unnecessary use of java.util.Optional. --- .../geode/security/support/SecurityManagerProxy.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java b/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java index 949e9e4d6..e361cca4d 100644 --- a/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java +++ b/spring-geode/src/main/java/org/springframework/geode/security/support/SecurityManagerProxy.java @@ -15,7 +15,6 @@ */ package org.springframework.geode.security.support; -import java.util.Optional; import java.util.Properties; import java.util.concurrent.atomic.AtomicReference; @@ -174,8 +173,6 @@ public void destroy() throws Exception { @Override protected BeanFactory locateBeanFactory() { - - return Optional.ofNullable(this.beanFactory) - .orElseGet(super::locateBeanFactory); + return this.beanFactory != null ? this.beanFactory : super.locateBeanFactory(); } } From 2334fb614897c3ad15b0b1c9e1a30723ba437316 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 17:53:09 -0700 Subject: [PATCH 062/216] Upgrade to Gradle 6.6.1. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6c9a22477..12d38de6a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From c6705db87a7727ae0fc1cf5044a8b0a8353d7ba8 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 17:56:20 -0700 Subject: [PATCH 063/216] Upgrade to Mockito 3.5.11. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d601250f6..a7015fba6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.14 findbugsVersion=3.0.2 -mockitoVersion=3.5.0 +mockitoVersion=3.5.11 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 From d17d2a20efca1740cda2baf1e7deff1b3213d4d5 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 17:58:03 -0700 Subject: [PATCH 064/216] Upgrade to Spring Framework 5.2.9.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a7015fba6..85ed58d37 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mockitoVersion=3.5.11 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 -springVersion=5.2.8.RELEASE +springVersion=5.2.9.RELEASE springBootVersion=2.3.4.BUILD-SNAPSHOT springDataGemFireVersion=2.3.3.RELEASE springDataGeodeVersion=2.3.3.RELEASE From 3a35939a9142896d87f60b62c57a5039cc9f0bbd Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 17:58:44 -0700 Subject: [PATCH 065/216] Upgrade to Spring Boot 2.3.4.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 85ed58d37..481e8b679 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.9.RELEASE -springBootVersion=2.3.4.BUILD-SNAPSHOT +springBootVersion=2.3.4.RELEASE springDataGemFireVersion=2.3.3.RELEASE springDataGeodeVersion=2.3.3.RELEASE springDataGeodeTestVersion=0.0.18.RELEASE From 3e31fdc6da61922a21bd3fd457a753cf29545d8e Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:00:14 -0700 Subject: [PATCH 066/216] Upgrade to Spring Data Neumann-SR4. Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.4.RELEASE. Upgrade to Spring Data Release Train (BOM) Neumann-SR4. --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 481e8b679..ca0c0b1ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.9.RELEASE springBootVersion=2.3.4.RELEASE -springDataGemFireVersion=2.3.3.RELEASE -springDataGeodeVersion=2.3.3.RELEASE +springDataGemFireVersion=2.3.4.RELEASE +springDataGeodeVersion=2.3.4.RELEASE springDataGeodeTestVersion=0.0.18.RELEASE -springDataReleaseTrainVersion=Neumann-SR3 +springDataReleaseTrainVersion=Neumann-SR4 springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE springShellVersion=1.2.0.RELEASE From d2b372a2f001a9822dd0bc254dd2028aa25bbd7b Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:00:43 -0700 Subject: [PATCH 067/216] Upgrade to Spring Test for Apache Geode & VMware Tanzu (Pivotal) GemFire 0.0.19.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ca0c0b1ab..c3aa5475b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ springVersion=5.2.9.RELEASE springBootVersion=2.3.4.RELEASE springDataGemFireVersion=2.3.4.RELEASE springDataGeodeVersion=2.3.4.RELEASE -springDataGeodeTestVersion=0.0.18.RELEASE +springDataGeodeTestVersion=0.0.19.RELEASE springDataReleaseTrainVersion=Neumann-SR4 springSessionBomVersion=Dragonfruit-RELEASE springSessionDataGeodeVersion=2.3.0.RELEASE From c3c7969431ecccf26059f30becc283b4566b7260 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:01:54 -0700 Subject: [PATCH 068/216] Upgrade to Spring Session BOM Dragonfruit-SR1. Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.1.RELEASE. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index c3aa5475b..3ca3db3e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ springDataGemFireVersion=2.3.4.RELEASE springDataGeodeVersion=2.3.4.RELEASE springDataGeodeTestVersion=0.0.19.RELEASE springDataReleaseTrainVersion=Neumann-SR4 -springSessionBomVersion=Dragonfruit-RELEASE -springSessionDataGeodeVersion=2.3.0.RELEASE +springSessionBomVersion=Dragonfruit-SR1 +springSessionDataGeodeVersion=2.3.1.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 version=1.3.4.BUILD-SNAPSHOT From 2388d38fbe6fd7d4798f0106f9b1215025307d79 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:19:46 -0700 Subject: [PATCH 069/216] Upgrade Sample (Parent & Getting Started) Maven POM build files to Spring Boot 2.3.4.RELEASE. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index 4bd743428..a011bf47c 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.3.BUILD-SNAPSHOT + 1.3.4.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index 52eeab929..0c14364ba 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.3.RELEASE + 2.3.4.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.3.BUILD-SNAPSHOT + 1.3.4.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.3.BUILD-SNAPSHOT + 1.3.4.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.3.BUILD-SNAPSHOT + 1.3.4.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.3.BUILD-SNAPSHOT + 1.3.4.BUILD-SNAPSHOT From d5086afc87f916c105ddf905174a25b290dc47b6 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:24:27 -0700 Subject: [PATCH 070/216] Edit changelog and include 1.1.10.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 4b34bc28a..5c79e8b6e 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,21 @@ https://github.com/spring-projects/spring-boot-data-geode ========================================================= +Changes in version 1.1.10.RELEASE (2020-09-17) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.1.17.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Upgrades to Spring Framework 5.1.18.RELEASE. +* Upgrades to Spring Boot 2.1.17.RELEASE. +* Upgrades to Spring Data Lovelace-SR20. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.1.20.RELEASE. +* Upgrades to Spring Session BOM Bean-SR12. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.1.11.RELEASE. +* Upgrades to Byte Buddy 1.10.14. +* Upgrades to Mockito 3.5.10. + + Changes in version 1.3.3.RELEASE (2020-08-20) --------------------------------------------- Upgrades SBDG to Spring Boot 2.3.3.RELEASE. Adds a Maven BOM to manage the SBDG module dependency versions collectively From 00abd0ef4ffa1e6df624138abec4938d2fe5cd49 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:25:26 -0700 Subject: [PATCH 071/216] Edit changelog and include 1.2.10.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 5c79e8b6e..be6b8bcd8 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,24 @@ https://github.com/spring-projects/spring-boot-data-geode ========================================================= +Changes in version 1.2.10.RELEASE (2020-09-17) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.2.10.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Edits chapter on caching in reference documentation. +* Fixes compiler syntax errors in code snippets contained in reference documentation. +* Upgrades to Spring Framework 5.2.9.RELEASE. +* Upgrades to Spring Boot 2.2.10.RELEASE. +* Upgrades to Spring Data Moore-SR10 +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.10.RELEASE. +* Upgrades to Spring Session BOM Corn-SR4. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.5.RELEASE +* Upgrades to Byte Buddy 1.10.14. +* Upgrades to Mockito 3.5.10. +* Upgrades to VMware Tanzu (Pivotal) GemFire 9.8.9. + + Changes in version 1.1.10.RELEASE (2020-09-17) ---------------------------------------------- Aligns SBDG with Spring Boot 2.1.17.RELEASE along with the latest versions of Spring Framework, Spring Data From 557fff760a1d3cd366fa4e859a7c25c28f7812ea Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:26:51 -0700 Subject: [PATCH 072/216] Edit README to refer to 1.1.10.RELEASE and 1.1.11.BUILD-SNAPSHOT docs in 1.1.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index b5fbb2ab7..0a3c51d15 100644 --- a/README.adoc +++ b/README.adoc @@ -53,8 +53,8 @@ This, along with many other benefits, are provided by this project. | `current` | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/current/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/#geode-samples[Samples] | `1.0.1.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/#geode-samples[Samples] | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.1.9.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] -| `1.1.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.1.10.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] +| `1.1.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.3.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] From a4a964b7296e3df5b33ce10b501eb63130a69a3b Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:27:48 -0700 Subject: [PATCH 073/216] Edit README to refer to 1.2.10.RELEASE and 1.2.11.BUILD-SNAPSHOT docs in 1.2.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 0a3c51d15..7c43e7e9e 100644 --- a/README.adoc +++ b/README.adoc @@ -55,8 +55,8 @@ This, along with many other benefits, are provided by this project. | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.1.10.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] | `1.1.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.2.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] -| `1.2.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.2.10.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] +| `1.2.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.3.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] | `1.3.4.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] From 3f833d9bbe7d67639fd57c2b249274dfa797f192 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:35:28 -0700 Subject: [PATCH 074/216] Edit changelog and add 1.3.4.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index be6b8bcd8..7add4a140 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -1,7 +1,24 @@ -SPRING BOOT FOR APACHE GEODE & PIVOTAL GEMFIRE CHANGELOG --------------------------------------------------------- +SPRING BOOT FOR APACHE GEODE & VMWARE TANZU GEMFIRE CHANGELOG +-------------------------------------------------------------- https://github.com/spring-projects/spring-boot-data-geode -========================================================= +============================================================== + + +Changes in version 1.3.4.RELEASE (2020-09-17) +--------------------------------------------- +Upgrades SBDG to Spring Boot 2.3.4.RELEASE. + +* Adds cross-references between reference documentation and Sample Guides & Code based on topic. +* Edits reference documentation and corrects compiler syntax errors in documentation code snippets. +* Upgrades to Spring Framework 5.2.9.RELEASE. +* Upgrades to Spring Boot 2.3.4.RELEASE. +* Upgrades to Spring Data Neumann-SR4. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu GemFire 2.3.4.RELEASE. +* Upgrades to Spring Session BOM Dragonfruit-SR1. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu GemFire 2.3.1.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu GemFire 0.0.19.RELEASE. +* Upgrades to Gradle 6.6.1. +* Upgrades to Mockito 3.5.11. Changes in version 1.2.10.RELEASE (2020-09-17) From 3d2db2d8373d9ccd7c4412ffd21476a3dbb1528c Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:43:59 -0700 Subject: [PATCH 075/216] Release 1.3.4.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 3ca3db3e1..a05b47a07 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.1.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 -version=1.3.4.BUILD-SNAPSHOT +version=1.3.4.RELEASE From 50fad617e82b40d0e219ded94c711853a92a3f5b Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 18:58:46 -0700 Subject: [PATCH 076/216] Prepare next development iteration. Set Spring Boot version to 2.3.5.BUILD-SNAPSHOT. Set version to 1.3.5.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index a05b47a07..ccc0dac95 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 springVersion=5.2.9.RELEASE -springBootVersion=2.3.4.RELEASE +springBootVersion=2.3.5.BUILD-SNAPSHOT springDataGemFireVersion=2.3.4.RELEASE springDataGeodeVersion=2.3.4.RELEASE springDataGeodeTestVersion=0.0.19.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.1.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 -version=1.3.4.RELEASE +version=1.3.5.BUILD-SNAPSHOT From 76312c12a224ae902390825b6abb8a7946215a1e Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 17 Sep 2020 19:13:41 -0700 Subject: [PATCH 077/216] Edit README to refer to 1.3.4.RELEASE and 1.3.5.BUILD-SNAPSHOT docs in 1.3.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 7c43e7e9e..116d8f5c3 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.10.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.3.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.4.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.4.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.5.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From bf7e21e866e8f89af58a9b8a172bcc3c91d8bb62 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 13 Oct 2020 12:22:46 -0700 Subject: [PATCH 078/216] Fix test failure after Spring Boot upgraded from Jackson 2.11.2 to 2.11.3, which introduced an API (contractual) breaking change. Seems Jackson introduced an API breaking change that now requires a PolymorphicTypeValidator when configuring and activating the default typing as a propery on the ObjectMapper. --- .../json/JsonCacheDataImporterExporterIntegrationTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-geode/src/test/java/org/springframework/geode/data/json/JsonCacheDataImporterExporterIntegrationTests.java b/spring-geode/src/test/java/org/springframework/geode/data/json/JsonCacheDataImporterExporterIntegrationTests.java index 94e966993..cbd092487 100644 --- a/spring-geode/src/test/java/org/springframework/geode/data/json/JsonCacheDataImporterExporterIntegrationTests.java +++ b/spring-geode/src/test/java/org/springframework/geode/data/json/JsonCacheDataImporterExporterIntegrationTests.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.InvalidDefinitionException; import com.fasterxml.jackson.databind.exc.MismatchedInputException; +import com.fasterxml.jackson.databind.jsontype.DefaultBaseTypeLimitingValidator; import com.fasterxml.jackson.databind.node.ObjectNode; import org.junit.Before; @@ -623,7 +624,8 @@ public void geodePdxInstanceObjectMapperCannotDeserializeTypedJsonObjects() .identifiedAs(1L); ObjectMapper objectMapper = newObjectMapper() - .activateDefaultTypingAsProperty(null, ObjectMapper.DefaultTyping.EVERYTHING, "@type"); + .activateDefaultTypingAsProperty(new DefaultBaseTypeLimitingValidator(), + ObjectMapper.DefaultTyping.EVERYTHING, "@type"); String json = objectMapper.writeValueAsString(purchaseOrder); From 2780777e19cb701f1f55588adb1f081ddaaa30fc Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Oct 2020 15:39:21 -0700 Subject: [PATCH 079/216] Update Spring Boot build snapshot version. Update Samples Maven POM spring-geode-starter version to use 1.3.5.BUILD-SNASPSHOT. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index a011bf47c..06c9562e1 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.4.BUILD-SNAPSHOT + 1.3.5.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index 0c14364ba..79cb39154 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.4.RELEASE + 2.3.5.BUILD-SNAPSHOT org.springframework.geode spring-geode-samples-parent - 1.3.4.BUILD-SNAPSHOT + 1.3.5.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.4.BUILD-SNAPSHOT + 1.3.5.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.4.BUILD-SNAPSHOT + 1.3.5.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.4.BUILD-SNAPSHOT + 1.3.5.BUILD-SNAPSHOT From 98fef527bf6fa25f36ed543081e5a9b15d44c87e Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:17:45 -0800 Subject: [PATCH 080/216] Upgrade to Byte Buddy 1.10.18. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ccc0dac95..126392420 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 -byteBuddyVersion=1.10.14 +byteBuddyVersion=1.10.18 findbugsVersion=3.0.2 mockitoVersion=3.5.11 multithreadedtcVersion=1.01 From ae084498db12419be18882086abe49c033e9c03d Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:18:08 -0800 Subject: [PATCH 081/216] Upgrade to Mockito 3.6.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 126392420..ccdbd4f3b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.18 findbugsVersion=3.0.2 -mockitoVersion=3.5.11 +mockitoVersion=3.6.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.2 From 5acc289bdcf778a4ecb5db18069ea2d487b645fc Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:21:01 -0800 Subject: [PATCH 082/216] Upgrade to VMware Tanzu (Pivotal) GemFire 9.10.5. Add dependency management for Apache Geode. Add dependency management for VMware Tanzu (Pivotal) GemFire. --- gradle.properties | 2 +- gradle/dependency-management.gradle | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ccdbd4f3b..6fe2b6090 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ findbugsVersion=3.0.2 mockitoVersion=3.6.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 -pivotalGemFireVersion=9.10.2 +pivotalGemFireVersion=9.10.5 springVersion=5.2.9.RELEASE springBootVersion=2.3.5.BUILD-SNAPSHOT springDataGemFireVersion=2.3.4.RELEASE diff --git a/gradle/dependency-management.gradle b/gradle/dependency-management.gradle index 1962e9063..effb39604 100644 --- a/gradle/dependency-management.gradle +++ b/gradle/dependency-management.gradle @@ -5,8 +5,16 @@ dependencyManagement { dependencies { dependency "antlr:antlr:$antlrVersion" dependency "edu.umd.cs.mtc:multithreadedtc:$multithreadedtcVersion" + dependency "io.pivotal.gemfire:geode-core:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-cq:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-lucene:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-wan:$pivotalGemFireVersion" dependency "net.bytebuddy:byte-buddy:$byteBuddyVersion" dependency "net.bytebuddy:byte-buddy-agent:$byteBuddyVersion" +// dependency "org.apache.geode:geode-core:$apacheGeodeVersion" +// dependency "org.apache.geode:geode-cq:$apacheGeodeVersion" +// dependency "org.apache.geode:geode-lucene:$apacheGeodeVersion" +// dependency "org.apache.geode:geode-wan:$apacheGeodeVersion" dependency "org.mockito:mockito-core:$mockitoVersion" dependency "org.springframework.data:spring-data-gemfire:$springDataGemFireVersion" dependency "org.springframework.data:spring-data-geode:$springDataGeodeVersion" From 51213948117ecbf5e519f6965751db4d87ae354d Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:22:22 -0800 Subject: [PATCH 083/216] Upgrade to Spring Framework 5.2.10.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6fe2b6090..09a1f07d0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mockitoVersion=3.6.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 -springVersion=5.2.9.RELEASE +springVersion=5.2.10.RELEASE springBootVersion=2.3.5.BUILD-SNAPSHOT springDataGemFireVersion=2.3.4.RELEASE springDataGeodeVersion=2.3.4.RELEASE From 60066ff15bf1d00a6d9577c5beeaadd22680e79f Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:22:46 -0800 Subject: [PATCH 084/216] Upgrade to Spring Boot 2.3.5.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 09a1f07d0..74f82fabc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.10.RELEASE -springBootVersion=2.3.5.BUILD-SNAPSHOT +springBootVersion=2.3.5.RELEASE springDataGemFireVersion=2.3.4.RELEASE springDataGeodeVersion=2.3.4.RELEASE springDataGeodeTestVersion=0.0.19.RELEASE From 6292d54907d0ed353b60c05d4793c20296da359a Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:24:07 -0800 Subject: [PATCH 085/216] Upgrade to Spring Data Neumann-SR5. Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.5.RELEASE. Upgrade to Spring Data Release Train (BOM) Neumann-SR5. --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 74f82fabc..df12ac284 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.10.RELEASE springBootVersion=2.3.5.RELEASE -springDataGemFireVersion=2.3.4.RELEASE -springDataGeodeVersion=2.3.4.RELEASE +springDataGemFireVersion=2.3.5.RELEASE +springDataGeodeVersion=2.3.5.RELEASE springDataGeodeTestVersion=0.0.19.RELEASE -springDataReleaseTrainVersion=Neumann-SR4 +springDataReleaseTrainVersion=Neumann-SR5 springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.1.RELEASE springShellVersion=1.2.0.RELEASE From b6984a3eb62289dcf188195f601623514185c8cd Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:24:59 -0800 Subject: [PATCH 086/216] Upgrade to Spring Test for Apache Geode & VMware Tanzu (Pivotal) GemFire 0.0.20.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index df12ac284..0a2a62acd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ springVersion=5.2.10.RELEASE springBootVersion=2.3.5.RELEASE springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE -springDataGeodeTestVersion=0.0.19.RELEASE +springDataGeodeTestVersion=0.0.20.RELEASE springDataReleaseTrainVersion=Neumann-SR5 springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.1.RELEASE From 8999ccc185ee3f1d261258792b8f57c0a4a833c7 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:26:15 -0800 Subject: [PATCH 087/216] Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.2.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0a2a62acd..af6f136b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ springDataGeodeVersion=2.3.5.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE springDataReleaseTrainVersion=Neumann-SR5 springSessionBomVersion=Dragonfruit-SR1 -springSessionDataGeodeVersion=2.3.1.RELEASE +springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.14.3 version=1.3.5.BUILD-SNAPSHOT From 16fde5acfbd028a8ba78124c441e03da26374f80 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:26:46 -0800 Subject: [PATCH 088/216] Upgrade to Testcontainers 1.15.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index af6f136b1..9c0ba27e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,5 @@ springDataReleaseTrainVersion=Neumann-SR5 springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE -testcontainersVersion=1.14.3 +testcontainersVersion=1.15.0 version=1.3.5.BUILD-SNAPSHOT From 667f0c8b526a04bf4b3c0bf6063cb510138d234d Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:27:56 -0800 Subject: [PATCH 089/216] Upgrade to Gradle 6.7. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 12d38de6a..be52383ef 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 9d7d3c3d2ccd84b04c229bb86e75e8258b089f05 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 4 Nov 2020 16:50:48 -0800 Subject: [PATCH 090/216] Add Integration Test testing the configuration and expected behavior of (HTTP) Session state caching using Spring Session with Apache Geode and Mock Objects auto-configured with Spring Boot. --- ...ngRepositoryWithMocksIntegrationTests.java | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingUsingRepositoryWithMocksIntegrationTests.java diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingUsingRepositoryWithMocksIntegrationTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingUsingRepositoryWithMocksIntegrationTests.java new file mode 100644 index 000000000..471f18f61 --- /dev/null +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/session/AutoConfiguredSessionCachingUsingRepositoryWithMocksIntegrationTests.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.geode.boot.autoconfigure.session; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Instant; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport; +import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; +import org.springframework.session.Session; +import org.springframework.session.SessionRepository; +import org.springframework.test.context.junit4.SpringRunner; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +/** + * Integration Tests for Spring Boot for Apache Geode auto-configuration of Spring Session using Apache Geode + * as the provider with Mock Objects. + * + * @author John Blum + * @see org.junit.Test + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.test.context.SpringBootTest + * @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport + * @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects + * @see org.springframework.geode.boot.autoconfigure.SpringSessionAutoConfiguration + * @since 1.4.0 + */ +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK) +@SuppressWarnings("unused") +public class AutoConfiguredSessionCachingUsingRepositoryWithMocksIntegrationTests extends IntegrationTestsSupport { + + @Autowired + private SessionRepository sessionRepository; + + @Before + public void setup() { + assertThat(this.sessionRepository).isNotNull(); + } + + @Test + public void persistentSessionAccessIsSuccessful() { + + Instant beforeCreationTime = Instant.now(); + + Session session = this.sessionRepository.createSession(); + + User jonDoe = User.newUser("jonDoe").identifiedBy(2L); + + assertThat(session).isNotNull(); + assertThat(session.getId()).isNotBlank(); + assertThat(session.getCreationTime()).isAfterOrEqualTo(beforeCreationTime); + assertThat(session.isExpired()).isFalse(); + + session.setAttribute(jonDoe.getName(), jonDoe); + + assertThat(session.getAttribute(jonDoe.getName())).isEqualTo(jonDoe); + + this.sessionRepository.save(session); + + Instant beforeLastAccessTime = Instant.now(); + + Session loadedSession = this.sessionRepository.findById(session.getId()); + + assertThat(loadedSession).isNotNull(); + assertThat(loadedSession.getId()).isEqualTo(session.getId()); + assertThat(loadedSession.getCreationTime()).isEqualTo(session.getCreationTime()); + assertThat(loadedSession.getLastAccessedTime()).isAfterOrEqualTo(beforeLastAccessTime); + assertThat(loadedSession.isExpired()).isFalse(); + assertThat(loadedSession.getAttribute(jonDoe.getName())).isEqualTo(jonDoe); + } + + @SpringBootApplication + @EnableGemFireMockObjects + static class TestConfiguration { } + + @Getter + @ToString(of = "name") + @EqualsAndHashCode(of = "name") + @RequiredArgsConstructor(staticName = "newUser") + static class User { + + private Long id; + + @NonNull + private final String name; + + public User identifiedBy(Long id) { + this.id = id; + return this; + } + } +} From 9aa857cc3ed43b59df130057c160c66ce87a7809 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 5 Nov 2020 16:10:26 -0800 Subject: [PATCH 091/216] Add Smoke Test testing the persistent access of a (HTTP) Session stored and managed by Apache Geode using Mock Objects with Spring Session auto-configured with Spring Boot. --- .../mock-session-caching/lombok.config | 2 + ...de-smoke-tests-mock-session-caching.gradle | 22 +++ .../hamcrest/RegexMatcher.java | 62 ++++++++ .../security/AuthenticationException.java | 41 +++++ .../web/servlet/http/HttpSessionAdapter.java | 128 ++++++++++++++++ .../web/servlet/http/SessionUtils.java | 49 ++++++ ...onSubstitutingSpyRequestPostProcessor.java | 73 +++++++++ .../web/servlet/http/AbstractHttpSession.java | 74 +++++++++ .../web/servlet/http/HttpSessionProxy.java | 121 +++++++++++++++ ...MockPersistentSessionAccessSmokeTests.java | 145 ++++++++++++++++++ 10 files changed, 717 insertions(+) create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/lombok.config create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/hamcrest/RegexMatcher.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/security/AuthenticationException.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/HttpSessionAdapter.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SessionUtils.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SpringSessionSubstitutingSpyRequestPostProcessor.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/AbstractHttpSession.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/HttpSessionProxy.java create mode 100644 spring-geode-tests/smoke-tests/mock-session-caching/src/test/java/example/app/geode/caching/session/MockPersistentSessionAccessSmokeTests.java diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/lombok.config b/spring-geode-tests/smoke-tests/mock-session-caching/lombok.config new file mode 100644 index 000000000..6aa51d71e --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/lombok.config @@ -0,0 +1,2 @@ +# This file is generated by the 'io.freefair.lombok' Gradle plugin +config.stopBubbling = true diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle b/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle new file mode 100644 index 000000000..3d68a05e0 --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle @@ -0,0 +1,22 @@ +plugins { + id "io.freefair.lombok" version "5.2.1" +} + +apply plugin: 'io.spring.convention.spring-test' + +description = "Smoke Tests to assert (Spring) Session state caching using Apache Geode with Mock Objects auto-configured by Spring Boot." + +dependencies { + + implementation "org.assertj:assertj-core" + implementation "org.springframework.boot:spring-boot-starter-web" + + implementation project(':spring-geode-starter-session') + + implementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + + testImplementation project(":spring-geode-starter-test") + +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/hamcrest/RegexMatcher.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/hamcrest/RegexMatcher.java new file mode 100644 index 000000000..4f42ae4c2 --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/hamcrest/RegexMatcher.java @@ -0,0 +1,62 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.hamcrest; + +import java.util.regex.Pattern; + +import org.springframework.lang.NonNull; +import org.springframework.util.Assert; + +import org.hamcrest.BaseMatcher; +import org.hamcrest.Description; +import org.hamcrest.Matcher; + +/** + * A Hamcrest {@link Matcher} using a Java {@link Pattern} with a {@link String Regular Expression} + * to match a {@link String} argument. + * + * @author John Blum + * @see java.util.regex.Pattern + * @see org.hamcrest.BaseMatcher + * @see org.hamcrest.Matcher + * @since 1.4.0 + */ +public class RegexMatcher extends BaseMatcher { + + private final Pattern pattern; + + public static RegexMatcher from(@NonNull String regex) { + return new RegexMatcher(regex); + } + + public RegexMatcher(@NonNull String regex) { + + Assert.hasText(regex, () -> String.format("Regular Expression [%s] is required", regex)); + + this.pattern = Pattern.compile(regex); + } + + @Override + public void describeTo(Description description) { + description.appendText(String.format("Matches text to the Regular Expression (Pattern) [%s]", + this.pattern.toString())); + } + + @Override + public boolean matches(Object actual) { + return this.pattern.matcher(String.valueOf(actual)).matches(); + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/security/AuthenticationException.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/security/AuthenticationException.java new file mode 100644 index 000000000..5531bfe20 --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/security/AuthenticationException.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.security; + +/** + * {@link RuntimeException} implementation indicating a Security Authentication error. + * + * @author John Blum + * @see java.lang.Runtime + * @since 1.4.0 + */ +@SuppressWarnings("unused") +public class AuthenticationException extends RuntimeException { + + public AuthenticationException() { } + + public AuthenticationException(String message) { + super(message); + } + + public AuthenticationException(Throwable cause) { + super(cause); + } + + public AuthenticationException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/HttpSessionAdapter.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/HttpSessionAdapter.java new file mode 100644 index 000000000..3cd16475f --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/HttpSessionAdapter.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.session.web.servlet.http; + +import java.time.Duration; +import java.util.Collections; +import java.util.Enumeration; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionContext; + +import org.springframework.lang.NonNull; +import org.springframework.session.Session; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; +import org.springframework.web.servlet.http.AbstractHttpSession; + +/** + * {@link HttpSession} implementation adapting the Spring Session {@link Session} interface. + * + * @author John Blum + * @see java.time.Duration + * @see javax.servlet.ServletContext + * @see javax.servlet.http.HttpSession + * @see org.springframework.session.Session + * @see org.springframework.web.servlet.http.AbstractHttpSession + * @since 1.4.0 + */ +@SuppressWarnings("unused") +public class HttpSessionAdapter extends AbstractHttpSession { + + private final ServletContext servletContext; + + private final Session session; + + public HttpSessionAdapter(@NonNull ServletContext servletContext, @NonNull Session session) { + + Assert.notNull(servletContext, "ServletContext must not be null"); + Assert.notNull(session, "Session must not be null"); + + this.session = session; + this.servletContext = servletContext; + } + + protected @NonNull Session getSession() { + return this.session; + } + + @Override + public String getId() { + return getSession().getId(); + } + + @Override + public long getCreationTime() { + return getSession().getCreationTime().toEpochMilli(); + } + + @Override + public long getLastAccessedTime() { + return getSession().getLastAccessedTime().toEpochMilli(); + } + + @Override + public void setMaxInactiveInterval(int interval) { + getSession().setMaxInactiveInterval(Duration.ofSeconds(interval)); + } + + @Override + public int getMaxInactiveInterval() { + return Long.valueOf(getSession().getMaxInactiveInterval().getSeconds()).intValue(); + } + + @Override + public @NonNull ServletContext getServletContext() { + return this.servletContext; + } + + @Override + @SuppressWarnings("deprecation") + public HttpSessionContext getSessionContext() { + throw new UnsupportedOperationException("Not Implemented"); + } + + @Override + public void setAttribute(String name, Object value) { + getSession().setAttribute(name, value); + } + + @Override + public void removeAttribute(String name) { + getSession().removeAttribute(name); + } + + @Override + public Object getAttribute(String name) { + return getSession().getAttribute(name); + } + + @Override + public Enumeration getAttributeNames() { + return Collections.enumeration(getSession().getAttributeNames()); + } + + @Override + public void invalidate() { + throw new UnsupportedOperationException("Not Implemented"); + } + + @Override + public boolean isNew() { + return !StringUtils.hasText(getId()); + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SessionUtils.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SessionUtils.java new file mode 100644 index 000000000..b9e42fc45 --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SessionUtils.java @@ -0,0 +1,49 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.session.web.servlet.http; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.springframework.geode.core.util.ObjectUtils; +import org.springframework.lang.Nullable; +import org.springframework.session.SessionRepository; + +/** + * Abstract utility class used to work with {@link HttpSession} objects. + * + * @author John Blum + * @see javax.servlet.http.HttpServletRequest + * @see javax.servlet.http.HttpSession + * @since 1.4.0 + */ +public abstract class SessionUtils { + + protected static final String CURRENT_SESSION_REQUEST_ATTRIBUTE = + SessionRepository.class.getName().concat(".CURRENT_SESSION"); + + protected static final String GET_CURRENT_SESSION_METHOD_NAME = "getCurrentSession"; + + public static @Nullable HttpSession resolveSession(HttpServletRequest servletRequest) { + + try { + return ObjectUtils.invoke(servletRequest, GET_CURRENT_SESSION_METHOD_NAME); + } + catch (IllegalArgumentException ignore) { + return (HttpSession) servletRequest.getAttribute(CURRENT_SESSION_REQUEST_ATTRIBUTE); + } + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SpringSessionSubstitutingSpyRequestPostProcessor.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SpringSessionSubstitutingSpyRequestPostProcessor.java new file mode 100644 index 000000000..7a2cd69ff --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/session/web/servlet/http/SpringSessionSubstitutingSpyRequestPostProcessor.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.session.web.servlet.http; + +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.spy; + +import java.util.concurrent.atomic.AtomicReference; + +import javax.servlet.http.HttpSession; + +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpSession; +import org.springframework.session.Session; +import org.springframework.test.web.servlet.request.RequestPostProcessor; +import org.springframework.web.servlet.http.HttpSessionProxy; + +/** + * Spring Test Mock Web MVC framework {@link RequestPostProcessor} that substitutes the Spring Session {@link Session} + * for the {@link MockHttpSession}. + * + * @author John Blum + * @see javax.servlet.http.HttpSession + * @see org.springframework.mock.web.MockHttpServletRequest + * @see org.springframework.mock.web.MockHttpSession + * @see org.springframework.session.Session + * @see org.springframework.test.web.servlet.request.RequestPostProcessor + * @see org.springframework.web.servlet.http.HttpSessionProxy + * @since 1.4.0 + */ +public class SpringSessionSubstitutingSpyRequestPostProcessor implements RequestPostProcessor { + + private static final AtomicReference instance = new AtomicReference<>(null); + + public static SpringSessionSubstitutingSpyRequestPostProcessor create() { + return instance.updateAndGet(instance -> instance != null ? instance + : new SpringSessionSubstitutingSpyRequestPostProcessor()); + } + + /** + * @inheritDoc + */ + @Override + public MockHttpServletRequest postProcessRequest(MockHttpServletRequest request) { + + MockHttpServletRequest requestSpy = spy(request); + + doAnswer(invocation -> { + + HttpSession session = SessionUtils.resolveSession(request); + + return session != null + ? HttpSessionProxy.from(session) + : request.getSession(); + + }).when(requestSpy).getSession(); + + return requestSpy; + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/AbstractHttpSession.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/AbstractHttpSession.java new file mode 100644 index 000000000..974c5c3d1 --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/AbstractHttpSession.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.web.servlet.http; + +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; +import java.util.Objects; + +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionContext; + +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; + +/** + * Abstract base class supporting implementations of the {@link HttpSession} interface. + * + * @author John Blum + * @see javax.servlet.http.HttpSession + * @since 1.4.0 + */ +@SuppressWarnings("deprecation") +public abstract class AbstractHttpSession implements HttpSession { + + @Override + public HttpSessionContext getSessionContext() { + throw new UnsupportedOperationException("Not Implemented"); + } + + @Override + public @Nullable Object getValue(String name) { + return getAttribute(name); + } + + @Override + public @NonNull String[] getValueNames() { + + List valueNames = new ArrayList<>(); + + Enumeration attributeNames = getAttributeNames(); + + if (Objects.nonNull(attributeNames)) { + while (attributeNames.hasMoreElements()) { + valueNames.add(attributeNames.nextElement()); + } + } + + return valueNames.toArray(new String[0]); + } + + @Override + public void putValue(String name, Object value) { + setAttribute(name, value); + } + + @Override + public void removeValue(String name) { + removeAttribute(name); + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/HttpSessionProxy.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/HttpSessionProxy.java new file mode 100644 index 000000000..e75c9ffac --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/main/java/org/springframework/web/servlet/http/HttpSessionProxy.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package org.springframework.web.servlet.http; + +import java.util.Enumeration; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionContext; + +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.Assert; + +/** + * {@link HttpSession} implementation wrapping and proxying for an existing {@link HttpSession} instance. + * + * @author John Blum + * @see javax.servlet.ServletContext + * @see javax.servlet.http.HttpSession + * @see org.springframework.web.servlet.http.AbstractHttpSession + * @since 1.4.0 + */ +public class HttpSessionProxy extends AbstractHttpSession { + + public static HttpSessionProxy from(HttpSession session) { + return new HttpSessionProxy(session); + } + + private final HttpSession session; + + private HttpSessionProxy(@NonNull HttpSession session) { + + Assert.notNull(session, "HttpSession must not be null"); + + this.session = session; + } + + protected @NonNull HttpSession getSession() { + return this.session; + } + + @Override + public String getId() { + return getSession().getId(); + } + + @Override + public long getCreationTime() { + return getSession().getCreationTime(); + } + + @Override + public long getLastAccessedTime() { + return getSession().getLastAccessedTime(); + } + + @Override + public void setMaxInactiveInterval(int interval) { + getSession().setMaxInactiveInterval(interval); + } + + @Override + public int getMaxInactiveInterval() { + return getSession().getMaxInactiveInterval(); + } + + @Override + public @NonNull ServletContext getServletContext() { + return getSession().getServletContext(); + } + + @Override + @SuppressWarnings("deprecation") + public HttpSessionContext getSessionContext() { + return getSession().getSessionContext(); + } + + @Override + public void setAttribute(String name, Object value) { + getSession().setAttribute(name, value); + } + + @Override + public @Nullable Object getAttribute(String name) { + return getSession().getAttribute(name); + } + + @Override + public Enumeration getAttributeNames() { + return getSession().getAttributeNames(); + } + + @Override + public void removeAttribute(String name) { + getSession().removeAttribute(name); + } + + @Override + public void invalidate() { + getSession().invalidate(); + } + + @Override + public boolean isNew() { + return getSession().isNew(); + } +} diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/src/test/java/example/app/geode/caching/session/MockPersistentSessionAccessSmokeTests.java b/spring-geode-tests/smoke-tests/mock-session-caching/src/test/java/example/app/geode/caching/session/MockPersistentSessionAccessSmokeTests.java new file mode 100644 index 000000000..0eebc6b78 --- /dev/null +++ b/spring-geode-tests/smoke-tests/mock-session-caching/src/test/java/example/app/geode/caching/session/MockPersistentSessionAccessSmokeTests.java @@ -0,0 +1,145 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.app.geode.caching.session; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.request; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +import java.util.Map; +import java.util.Optional; +import java.util.UUID; + +import javax.servlet.http.HttpSession; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; +import org.springframework.data.gemfire.tests.support.MapBuilder; +import org.springframework.hamcrest.RegexMatcher; +import org.springframework.http.MediaType; +import org.springframework.security.AuthenticationException; +import org.springframework.session.web.servlet.http.SpringSessionSubstitutingSpyRequestPostProcessor; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +/** + * Smoke Tests testing the persistent access of a (HTTP) Session stored and managed by Apache Geode using Mock Objects + * with Spring Session auto-configured with Spring Boot. + * + * @author John Blum + * @see javax.servlet.http.HttpSession + * @see org.junit.Test + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc + * @see org.springframework.boot.test.context.SpringBootTest + * @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects + * @see org.springframework.test.context.junit4.SpringRunner + * @see org.springframework.test.web.servlet.MockMvc + * @see org.springframework.web.bind.annotation.RestController + * @since 1.4.0 + */ +@RunWith(SpringRunner.class) +@SpringBootTest( + classes = { + MockPersistentSessionAccessSmokeTests.TestSessionGeodeConfiguration.class, + MockPersistentSessionAccessSmokeTests.TestUserAccessController.class + }, + webEnvironment = SpringBootTest.WebEnvironment.MOCK +) +@AutoConfigureMockMvc +@SuppressWarnings("unused") +public class MockPersistentSessionAccessSmokeTests { + + @Autowired + private MockMvc mvc; + + @Test + public void persistentSessionAccessIsSuccessful() throws Exception { + + String username = "jonDoe"; + + this.mvc.perform(get("/users/{username}", username) + .param("password", "p@5$w0rd") + .with(SpringSessionSubstitutingSpyRequestPostProcessor.create())) + .andExpect(status().isOk()) + .andExpect(request().sessionAttribute(username, User.newUser(username))) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andExpect(content().string(RegexMatcher.from("\\{\"id\":\".*\",\"name\":\"jonDoe\"\\}"))); + } + + @SpringBootApplication + @EnableGemFireMockObjects + static class TestSessionGeodeConfiguration { } + + @RestController + static class TestUserAccessController { + + static final Map userAccessControlMap = MapBuilder.newMapBuilder() + .put("jonDoe", "p@5$w0rd") + .put("janeDoe", "s3cr3t!") + .build(); + + @GetMapping("/users/{username}") + public User login(HttpSession session, @PathVariable String username, + @RequestParam(required = false) String password) { + + return Optional.ofNullable(password) + .filter(StringUtils::hasText) + .filter(it -> String.valueOf(userAccessControlMap.get(username)).equals(password)) + .map(it -> User.newUser(username).identifiedBy(UUID.randomUUID().toString())) + .map(user -> { + session.setAttribute(user.getName(), user); + return user; + }) + .orElseThrow(() -> new AuthenticationException(String.format("User [%s] is not authorized", username))); + } + } + + @Getter + @ToString(of = "name") + @EqualsAndHashCode(of = "name") + @RequiredArgsConstructor(staticName = "newUser") + static class User { + + private String id; + + @NonNull + private final String name; + + public User identifiedBy(String id) { + this.id = id; + return this; + } + } +} From 6cde223a0604ae95e77c2c14c9de7c767303bae8 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:36:47 -0800 Subject: [PATCH 092/216] Change JetBrains @NotNull annotation to Spring Framework's @NonNull annotation. --- .../src/test/java/example/app/pos/model/PurchaseOrder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-geode/src/test/java/example/app/pos/model/PurchaseOrder.java b/spring-geode/src/test/java/example/app/pos/model/PurchaseOrder.java index 9f6dbb369..989fd93e7 100644 --- a/spring-geode/src/test/java/example/app/pos/model/PurchaseOrder.java +++ b/spring-geode/src/test/java/example/app/pos/model/PurchaseOrder.java @@ -28,8 +28,6 @@ import org.springframework.lang.NonNull; import org.springframework.util.Assert; -import org.jetbrains.annotations.NotNull; - import lombok.Getter; import lombok.ToString; @@ -104,7 +102,7 @@ public PurchaseOrder identifiedAs(Long id) { return this; } - @NotNull @Override + @NonNull @Override public Iterator iterator() { return Collections.unmodifiableList(this.lineItems).iterator(); } From 009ee9645b67f5698d5be9ffe6de13bc75c1c0d1 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:48:08 -0800 Subject: [PATCH 093/216] Set Spring Geode Samples Maven POM Spring Boot version to 2.3.5.RELEASE. --- spring-geode-samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index 79cb39154..ab0e8bc4d 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,7 +8,7 @@ org.springframework.boot spring-boot-starter-parent - 2.3.5.BUILD-SNAPSHOT + 2.3.5.RELEASE From 6d04479670af24dde50733b02fe6873ffb9c7bae Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:50:56 -0800 Subject: [PATCH 094/216] Edit changelog and add 1.1.11.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 7add4a140..08612f9ca 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,21 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.1.11.RELEASE (2020-11-09) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.1.18.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Upgrades to Spring Framework 5.1.19.RELEASE. +* Upgrades to Spring Boot 2.1.18.RELEASE. +* Upgrades to Spring Data Lovelace-SR21. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.1.21.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.1.12.RELEASE. +* Upgrades to Byte Buddy 1.10.18. +* Upgrades to Mockito 3.6.0. +* Upgrades to Testcontainers 1.15.0. + + Changes in version 1.3.4.RELEASE (2020-09-17) --------------------------------------------- Upgrades SBDG to Spring Boot 2.3.4.RELEASE. From 986deec90becc019bd08751cc79f60a3b28a5174 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 10:52:31 -0800 Subject: [PATCH 095/216] Edit changelog and add 1.2.11.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 08612f9ca..d5567d041 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,23 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.2.11.RELEASE (2020-11-09) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.2.11.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Adds a spring-geode-bom Maven BOM to manage all Spring Boot for Apache Geode module dependency versions. +* Upgrades to Spring Framework 5.2.10.RELEASE. +* Upgrades to Spring Boot 2.2.11.RELEASE. +* Upgrades to Spring Data Moore-SR11. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.11.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.6.RELEASE. +* Upgrades to Byte Buddy 1.10.18. +* Upgrades to Gradle 6.7. +* Upgrades to Mockito 3.6.0. +* Upgrades to Testcontainers 1.15.0. + + Changes in version 1.1.11.RELEASE (2020-11-09) ---------------------------------------------- Aligns SBDG with Spring Boot 2.1.18.RELEASE along with the latest versions of Spring Framework, Spring Data From b989697f444df7f2efe5b03bbbf7337f378e21aa Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:01:42 -0800 Subject: [PATCH 096/216] Edit changelog and add 1.3.5.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index d5567d041..984d1b308 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,25 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.5.RELEASE (2020-11-10) +--------------------------------------------- +Aligns SBDG with Spring Boot 2.3.5.RELEASE along with the latest versions of Spring Framework, Spring Data, +Spring Session, and Spring Test. + +* Adds Integration and Smoke Tests to assert the configuration the expected behavior of persisting and accessing (HTTP) +Session state using Spring Session backed by Apache Geode with Mock Objects auto-configured with Spring Boot. +* Upgrades to Spring Framework 5.2.10.RELEASE. +* Upgrades to Spring Boot 2.3.5.RELEASE. +* Upgrades to Spring Data Neumann-SR5. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.5.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.2.RELEASE. +* Upgrades to Spring Test for Apache Geode & VMware Tanzu (Pivotal) GemFire 0.0.20.RELEASE. +* Upgrades to Byte Buddy 1.10.18. +* Upgrades to Gradle 6.7. +* Upgrades to Mockito 3.6.0. +* Upgrades to Testcontainers 1.15.0. + + Changes in version 1.2.11.RELEASE (2020-11-09) ---------------------------------------------- Aligns SBDG with Spring Boot 2.2.11.RELEASE along with the latest versions of Spring Framework, Spring Data From 035a1aa83897b791454f9caabe425849c06e0d68 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:04:19 -0800 Subject: [PATCH 097/216] Release 1.3.5.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9c0ba27e6..1977e1183 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 -version=1.3.5.BUILD-SNAPSHOT +version=1.3.5.RELEASE From 911abf2361b5719ed820dd6b55e6b18ccf9d209a Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:17:50 -0800 Subject: [PATCH 098/216] Prepare next development iteration. Set Spring Boot version to 2.3.6.BUILD-SNAPSHOT. Set version to 1.3.6.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1977e1183..715380a2c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.10.RELEASE -springBootVersion=2.3.5.RELEASE +springBootVersion=2.3.6.BUILD-SNAPSHOT springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 -version=1.3.5.RELEASE +version=1.3.6.BUILD-SNAPSHOT From 4bd174a4d0fd4e08268ec36bdf945e67b9b29487 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:33:37 -0800 Subject: [PATCH 099/216] Declare FindBugs compile-only dependency in Mock Session Caching Smoke Tests to suppress compiler warnings. --- .../spring-geode-smoke-tests-mock-session-caching.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle b/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle index 3d68a05e0..a201647a4 100644 --- a/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle +++ b/spring-geode-tests/smoke-tests/mock-session-caching/spring-geode-smoke-tests-mock-session-caching.gradle @@ -8,6 +8,8 @@ description = "Smoke Tests to assert (Spring) Session state caching using Apache dependencies { + compileOnly "com.google.code.findbugs:jsr305:$findbugsVersion" + implementation "org.assertj:assertj-core" implementation "org.springframework.boot:spring-boot-starter-web" From db39161c06217d4ba1b361f58cf5bef33fe9e1cc Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:34:34 -0800 Subject: [PATCH 100/216] Edit README to refer to 1.1.11.RELEASE and 1.1.12.BUILD-SNAPSHOT in the 1.1.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 116d8f5c3..59c1e436e 100644 --- a/README.adoc +++ b/README.adoc @@ -53,8 +53,8 @@ This, along with many other benefits, are provided by this project. | `current` | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/current/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/#geode-samples[Samples] | `1.0.1.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/#geode-samples[Samples] | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.1.10.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] -| `1.1.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.1.11.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] +| `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.10.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.4.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] From f0be292ed4aeca262f1a62921d51b86a97652dbb Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:35:19 -0800 Subject: [PATCH 101/216] Edit README to refer to 1.2.11.RELEASE and 1.2.12.BUILD-SNAPSHOT in the 1.2.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 59c1e436e..98ddbd87a 100644 --- a/README.adoc +++ b/README.adoc @@ -55,8 +55,8 @@ This, along with many other benefits, are provided by this project. | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.1.11.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.2.10.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] -| `1.2.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.2.11.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] +| `1.2.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.4.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] | `1.3.5.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] From c29d6e3f15f25b421bd96f7b1f7a6a92cf26614b Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 10 Nov 2020 11:36:07 -0800 Subject: [PATCH 102/216] Edit README to refer to 1.3.5.RELEASE and 1.3.6.BUILD-SNAPSHOT in the 1.3.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 98ddbd87a..e242b07d7 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.11.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.4.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.5.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.5.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.6.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From 4f7821d62946f65daad11207720348120e5d20c8 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 17 Nov 2020 11:11:48 -0800 Subject: [PATCH 103/216] Declare and configure repositories for all projects. --- build.gradle | 24 +++++++++++++++++-- ...pring-geode-smoke-tests-initializer.gradle | 8 ------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 71cfaa657..c774020e4 100644 --- a/build.gradle +++ b/build.gradle @@ -11,8 +11,28 @@ buildscript { apply plugin: 'io.spring.convention.root' -group = 'org.springframework.geode' -description = 'Spring Boot for Apache Geode & VMware Tanzu GemFire' +allprojects { + + group = 'org.springframework.geode' + + repositories { + + mavenCentral() + + if (version.contains('-')) { + maven { url "https://repo.spring.io/milestone" } + } + if (version.endsWith('-SNAPSHOT')) { + maven { url "https://repo.spring.io/snapshot" } + } + } + + configurations.all { + resolutionStrategy.cacheChangingModulesFor 0, "minutes" + } +} + +description = 'Spring Boot for Apache Geode' //ext['spring.version'] = "$springVersion" //ext['spring-framework.version'] = "$springVersion" diff --git a/spring-geode-tests/smoke-tests/spring-initializer/spring-geode-smoke-tests-initializer.gradle b/spring-geode-tests/smoke-tests/spring-initializer/spring-geode-smoke-tests-initializer.gradle index 23e3b4905..2a4dd61ca 100644 --- a/spring-geode-tests/smoke-tests/spring-initializer/spring-geode-smoke-tests-initializer.gradle +++ b/spring-geode-tests/smoke-tests/spring-initializer/spring-geode-smoke-tests-initializer.gradle @@ -2,14 +2,6 @@ apply plugin: 'io.spring.convention.spring-test' description = "Smoke Tests to assert that a Spring for Apache Geode project generated from Spring Initializer is a standard, non-Webapp Spring Boot application." -/* -repositories { - mavenCentral() - maven { url 'https://repo.spring.io/milestone' } - maven { url 'https://repo.spring.io/snapshot' } -} -*/ - dependencies { implementation "org.assertj:assertj-core" From ed1e0694ac688b17ce388fce754510b0782e0bf6 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:33:05 -0800 Subject: [PATCH 104/216] Upgrade to Gradle 6.7.1. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index be52383ef..4d9ca1649 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 10fef8e635885962727a99c2b872159ff5da4480 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:34:01 -0800 Subject: [PATCH 105/216] Upgrade to Spring Build Conventions Gradle Plugin 0.0.35.RELEASE. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c774020e4..1e17265fe 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { dependencies { - classpath 'io.spring.gradle:spring-build-conventions:0.0.34.RELEASE' + classpath 'io.spring.gradle:spring-build-conventions:0.0.35.RELEASE' classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion" } repositories { From 1922d8bcd15d37c541ab8672f8ea62282df973dc Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:35:38 -0800 Subject: [PATCH 106/216] Upgrade to Freefair Lombok Gradle Plugin 5.3.0. --- spring-geode-autoconfigure/spring-geode-autoconfigure.gradle | 2 +- spring-geode-docs/spring-geode-docs.gradle | 2 +- .../boot/actuator/spring-geode-samples-boot-actuator.gradle | 2 +- .../spring-geode-samples-boot-configuration.gradle | 2 +- .../caching/inline/spring-geode-samples-caching-inline.gradle | 2 +- .../caching/near/spring-geode-samples-caching-near.gradle | 2 +- .../getting-started/spring-geode-samples-getting-started.gradle | 2 +- ...spring-geode-smoke-tests-function-execution-on-region.gradle | 2 +- .../multi-store/spring-geode-smoke-tests-multi-store.gradle | 2 +- spring-geode/spring-geode.gradle | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle b/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle index bd6926d99..ae9b28e04 100644 --- a/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle +++ b/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-module' diff --git a/spring-geode-docs/spring-geode-docs.gradle b/spring-geode-docs/spring-geode-docs.gradle index 9ab4fa9c3..d06857b0b 100644 --- a/spring-geode-docs/spring-geode-docs.gradle +++ b/spring-geode-docs/spring-geode-docs.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } import org.apache.tools.ant.filters.ReplaceTokens diff --git a/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle b/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle index fcd5c3750..a8cc4d81e 100644 --- a/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle +++ b/spring-geode-samples/boot/actuator/spring-geode-samples-boot-actuator.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' diff --git a/spring-geode-samples/boot/configuration/spring-geode-samples-boot-configuration.gradle b/spring-geode-samples/boot/configuration/spring-geode-samples-boot-configuration.gradle index 3c1fd933b..4c68c9731 100644 --- a/spring-geode-samples/boot/configuration/spring-geode-samples-boot-configuration.gradle +++ b/spring-geode-samples/boot/configuration/spring-geode-samples-boot-configuration.gradle @@ -1,7 +1,7 @@ import org.apache.tools.ant.filters.ReplaceTokens plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' diff --git a/spring-geode-samples/caching/inline/spring-geode-samples-caching-inline.gradle b/spring-geode-samples/caching/inline/spring-geode-samples-caching-inline.gradle index 8dc30f7ae..6d007bb9d 100644 --- a/spring-geode-samples/caching/inline/spring-geode-samples-caching-inline.gradle +++ b/spring-geode-samples/caching/inline/spring-geode-samples-caching-inline.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' diff --git a/spring-geode-samples/caching/near/spring-geode-samples-caching-near.gradle b/spring-geode-samples/caching/near/spring-geode-samples-caching-near.gradle index 116d90f88..90c8d79e1 100644 --- a/spring-geode-samples/caching/near/spring-geode-samples-caching-near.gradle +++ b/spring-geode-samples/caching/near/spring-geode-samples-caching-near.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' diff --git a/spring-geode-samples/intro/getting-started/spring-geode-samples-getting-started.gradle b/spring-geode-samples/intro/getting-started/spring-geode-samples-getting-started.gradle index 9f9b51a65..09f8a5325 100644 --- a/spring-geode-samples/intro/getting-started/spring-geode-samples-getting-started.gradle +++ b/spring-geode-samples/intro/getting-started/spring-geode-samples-getting-started.gradle @@ -1,7 +1,7 @@ import org.apache.tools.ant.filters.ReplaceTokens plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' diff --git a/spring-geode-tests/smoke-tests/function-execution-on-region/spring-geode-smoke-tests-function-execution-on-region.gradle b/spring-geode-tests/smoke-tests/function-execution-on-region/spring-geode-smoke-tests-function-execution-on-region.gradle index 9e5aab99c..d6a64af47 100644 --- a/spring-geode-tests/smoke-tests/function-execution-on-region/spring-geode-smoke-tests-function-execution-on-region.gradle +++ b/spring-geode-tests/smoke-tests/function-execution-on-region/spring-geode-smoke-tests-function-execution-on-region.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-test' diff --git a/spring-geode-tests/smoke-tests/multi-store/spring-geode-smoke-tests-multi-store.gradle b/spring-geode-tests/smoke-tests/multi-store/spring-geode-smoke-tests-multi-store.gradle index 415a4af30..3c3355670 100644 --- a/spring-geode-tests/smoke-tests/multi-store/spring-geode-smoke-tests-multi-store.gradle +++ b/spring-geode-tests/smoke-tests/multi-store/spring-geode-smoke-tests-multi-store.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-test' diff --git a/spring-geode/spring-geode.gradle b/spring-geode/spring-geode.gradle index c90826508..de2b28d06 100644 --- a/spring-geode/spring-geode.gradle +++ b/spring-geode/spring-geode.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.1.0" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-module' From e6a67d73ed286287817b8de5176ec509dc5e1b65 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:38:05 -0800 Subject: [PATCH 107/216] Upgrade to Spring Framework 5.2.11.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 715380a2c..84199eab0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mockitoVersion=3.6.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 -springVersion=5.2.10.RELEASE +springVersion=5.2.11.RELEASE springBootVersion=2.3.6.BUILD-SNAPSHOT springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE From 508067b9b433bc982611a5bf3fdb684dc31ba5e5 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:38:26 -0800 Subject: [PATCH 108/216] Upgrade to Spring Boot 2.3.6.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 84199eab0..5e8f916da 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.11.RELEASE -springBootVersion=2.3.6.BUILD-SNAPSHOT +springBootVersion=2.3.6.RELEASE springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From 47636606266ec11a0cfbf5eb575fd302d7cce146 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:40:56 -0800 Subject: [PATCH 109/216] Add Gradle dependency management for 'org.springframework.data:spring-data-gemfire-test'. --- gradle/dependency-management.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle/dependency-management.gradle b/gradle/dependency-management.gradle index effb39604..24a496c2a 100644 --- a/gradle/dependency-management.gradle +++ b/gradle/dependency-management.gradle @@ -18,6 +18,7 @@ dependencyManagement { dependency "org.mockito:mockito-core:$mockitoVersion" dependency "org.springframework.data:spring-data-gemfire:$springDataGemFireVersion" dependency "org.springframework.data:spring-data-geode:$springDataGeodeVersion" + dependency "org.springframework.data:spring-data-gemfire-test:$springDataGeodeTestVersion" dependency "org.springframework.data:spring-data-geode-test:$springDataGeodeTestVersion" dependency "org.springframework.session:spring-session-data-gemfire:$springSessionDataGeodeVersion" dependency "org.springframework.session:spring-session-data-geode:$springSessionDataGeodeVersion" From 782dd6c0fccc206f7a56bde5677e0af6ea1ec540 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 18 Nov 2020 12:25:11 -0800 Subject: [PATCH 110/216] Add documentation on using the 'spring-geode-bom' in the 'Using Spring Boot for Apache Geode' section. --- .../src/docs/asciidoc/index.adoc | 115 ++++++++++++++++-- 1 file changed, 106 insertions(+), 9 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 3de64017f..1a06bac66 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -156,9 +156,9 @@ TIP: Refer to the corresponding Sample link:guides/getting-started.html[Guide] a to see Spring Boot for {apache-geode-name} in action! [[maven-gradle]] -== Using Spring Boot for {apache-geode-name} & {pivotal-gemfire-name} +== Using Spring Boot for {apache-geode-name} -To use Spring Boot for {apache-geode-name}, declare the `spring-geode-starter` on your application classpath: +To use Spring Boot for {apache-geode-name}, simply declare the `spring-geode-starter` on your application classpath: .Maven [source,xml] @@ -182,11 +182,105 @@ dependencies { } ---- -TIP: To use {pivotal-gemfire-name} in place of {apache-geode-name}, simply change the `artifactId` -from `spring-geode-starter` to `spring-gemfire-starter`. +[[maven-gradle-bom]] +=== Maven BOM + +If you anticipate using more than 1 Spring Boot for {apache-geode-name} (SBDG) module in your Spring Boot application, +then you can also use the new `org.springframework.geode:spring-geode-bom` Maven BOM in your application Maven POM. + +Your application use case(s) may require more than 1 module if, for example, you need (HTTP) Session state management +and replication (e.g. `spring-geode-starter-session`), or you need to enable Spring Boot Actuator endpoints for +{apache-geode-name} (e.g. `spring-geode-starter-actuator`), or perhaps you need assistance writing complex Unit +and distributed Integration Tests using STDG (e.g. `spring-geode-starter-test`). + +You can declare (include) and use any 1 of the SBDG modules: + +* `spring-geode-starter` +* `spring-geode-starter-actuator` +* `spring-geode-starter-logging` +* `spring-geode-starter-session` +* `spring-geode-starter-test` + +When more than 1 SBDG module is in play, then it makes sense to use the `spring-geode-bom` to manage all +the dependencies so that the versions and transitive dependencies necessarily align properly. + +Your Spring Boot application Maven POM using the `spring-geode-bom` along with 2 or more module dependencies +might appear as follows: + +.Spring Boot application Maven POM +[source,xml] +[subs="verbatim,attributes"] +---- + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + {spring-boot-version} + + + my-spring-boot-application + + + {spring-boot-data-geode-version} + + + + + + org.springframework.geode + spring-geode-bom + ${spring-geode.version} + import + pom + + + + + + + org.springframework.geode + spring-geode-starter + + + org.springframework.geode + spring-geode-starter-session + + + org.springframework.geode + spring-geode-starter-test + test + + + + +---- + +Notice that 1) the Spring Boot application Maven POM (`pom.xml`) contains a `` section declaring +the `org.springframework.geode:spring-geode-bom` and that 2) none of the `spring-geode-starter[-xyz]` dependencies +specify an explicit ``, which is 3) managed by the `spring-geode.version` property making it easy to switch +between versions of SBDG as needed. + +If you change the version of SBDG, make sure to change the `org.springframework.boot:spring-boot-starter-parent` POM +version to match. SBDG is always 1 `major` version behind, but matches on `minor` version and `patch` version +(and `version qualifier`, e.g. `SNAPSHOT`, `M#`, `RC#`, or `RELEASE`, if applicable). + +For example, SBDG `1.4.0` is based on Spring Boot `2.4.0`. SBDG `1.3.5.RELEASE` is based on +Spring Boot `2.3.5.RELEASE`. It is important that the versions align. + +Of course, all of these concerns are easy to do by simply going to https://start.spring.io[start.spring.io] +and adding the "_Spring for {apache-geode-name}_" dependency. + +Clink on this https://start.spring.io/#!platformVersion={spring-boot-version}&dependencies=geode[link] +to get started! ifeval::["{version-snapshot}" == "true"] -Since you are using a SNAPSHOT version, you need to add the Spring Snapshot Maven Repository. +[[maven-gradle-repository]] +=== Repository declaration + +Since you are using a `SNAPSHOT` version, you need to add the Spring Snapshot Maven Repository. If you are using _Maven_, include the following `repository` declaration in your `pom.xml`: @@ -196,7 +290,7 @@ If you are using _Maven_, include the following `repository` declaration in your spring-snapshot - https://repo.spring.io/libs-snapshot + https://repo.spring.io/snapshot ---- @@ -207,12 +301,15 @@ If you are using _Gradle_, include the following `repository` declaration in you [source,gradle] ---- repositories { - maven { url: 'https://repo.spring.io/libs-snapshot' } + maven { url: 'https://repo.spring.io/snapshot' } } ---- endif::[] ifeval::["{version-milestone}" == "true"] +[[maven-gradle-repository]] +=== Repository declaration + Since you are using a Milestone version, you need to add the Spring Milestone Maven Repository. If you are using _Maven_, include the following `repository` declaration in your `pom.xml`: @@ -223,7 +320,7 @@ If you are using _Maven_, include the following `repository` declaration in your spring-milestone - https://repo.spring.io/libs-milestone + https://repo.spring.io/milestone ---- @@ -234,7 +331,7 @@ If you are using _Gradle_, include the following `repository` declaration in you [source,gradle] ---- repositories { - maven { url: 'https://repo.spring.io/libs-milestone' } + maven { url: 'https://repo.spring.io/milestone' } } ---- endif::[] From a4046bb3b79d6b5e2eb59c54513d7fec8442fb85 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 12:58:29 -0800 Subject: [PATCH 111/216] Set Samples Parent & Getting Started Maven POM SBDG version to 1.3.6.BUILD-SNAPSHOT. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index 06c9562e1..d779e3931 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.5.BUILD-SNAPSHOT + 1.3.6.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index ab0e8bc4d..e7293754c 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.5.RELEASE + 2.3.6.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.5.BUILD-SNAPSHOT + 1.3.6.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.5.BUILD-SNAPSHOT + 1.3.6.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.5.BUILD-SNAPSHOT + 1.3.6.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.5.BUILD-SNAPSHOT + 1.3.6.BUILD-SNAPSHOT From b8088cfea0b20cdaf308057024fe7dbcffb53bff Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 13:04:14 -0800 Subject: [PATCH 112/216] Edit changelog and add 1.3.6.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 984d1b308..5ea5fefeb 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,20 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.6.RELEASE (2020-11-19) +--------------------------------------------- +Aligns SBDG with Spring Boot 2.3.6.RELEASE along with the latest versions of Spring Framework, Spring Data, +Spring Session, and Spring Test. + +* Adds documentation on using the new spring-geode-bom Maven BOM to manage SBDG module dependencies +in Spring Boot application Maven POM files. +* Upgrades to Spring Framework 5.2.11.RELEASE. +* Upgrades to Spring Boot 2.3.6.RELEASE. +* Upgrades to Spring Build Conventions Gradle Plugin 0.0.35.RELEASE. +* Upgrades to Gradle 6.7.1. +* Upgrades to Freefair Lombok Gradle Plugin 5.3.0. + + Changes in version 1.3.5.RELEASE (2020-11-10) --------------------------------------------- Aligns SBDG with Spring Boot 2.3.5.RELEASE along with the latest versions of Spring Framework, Spring Data, From 43d039595d9470826e72fa039f71658f6777d750 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 13:12:40 -0800 Subject: [PATCH 113/216] Release 1.3.6.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5e8f916da..6dec2a4f2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 -version=1.3.6.BUILD-SNAPSHOT +version=1.3.6.RELEASE From e4dfdfc242dfac3159cfde6013e396070ebadcd8 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 13:27:23 -0800 Subject: [PATCH 114/216] Prepare next development iteration. Set Spring Boot version to 2.3.7.BUILD-SNAPSHOT. Set version to 1.3.7.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6dec2a4f2..d8be2d685 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.11.RELEASE -springBootVersion=2.3.6.RELEASE +springBootVersion=2.3.7.BUILD-SNAPSHOT springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 -version=1.3.6.RELEASE +version=1.3.7.BUILD-SNAPSHOT From fffc68b6da6c029bbeff5dcaf7e0cb5d74946779 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 19 Nov 2020 13:40:03 -0800 Subject: [PATCH 115/216] Edit README to refer to 1.3.6.RELEASE and 1.3.7.BUILD-SNAPSHOT in the 1.3.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index e242b07d7..2e244e466 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.11.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.5.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.6.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.6.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.7.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From 528f2c3a378c849d7a3a0abb94eb0f80748173e1 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:36:57 -0800 Subject: [PATCH 116/216] Upgrade to Mockito 3.6.28. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d8be2d685..626db2135 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.18 findbugsVersion=3.0.2 -mockitoVersion=3.6.0 +mockitoVersion=3.6.28 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 From 8568bc82b611fe5b927ad78359cb777b3b4a1df9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:37:38 -0800 Subject: [PATCH 117/216] Upgrade to Spring Framework 5.2.12.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 626db2135..ecaffddb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mockitoVersion=3.6.28 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 -springVersion=5.2.11.RELEASE +springVersion=5.2.12.RELEASE springBootVersion=2.3.7.BUILD-SNAPSHOT springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE From cccdce7cc779d3670d216d6b11a8967def9fbbf0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:38:09 -0800 Subject: [PATCH 118/216] Upgrade to Spring Boot 2.3.7.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ecaffddb6..364e8ebfb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.12.RELEASE -springBootVersion=2.3.7.BUILD-SNAPSHOT +springBootVersion=2.3.7.RELEASE springDataGemFireVersion=2.3.5.RELEASE springDataGeodeVersion=2.3.5.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From c7a1cc76e6ae8fb430e897f3599b6093ec37f38c Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:39:40 -0800 Subject: [PATCH 119/216] Uprade to Spring Data Neumann-SR6. Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.6.RELEASE. Upgrade to Spring Dat Release Train (BOM) Neumann-SR6. --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 364e8ebfb..4da2f5821 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.12.RELEASE springBootVersion=2.3.7.RELEASE -springDataGemFireVersion=2.3.5.RELEASE -springDataGeodeVersion=2.3.5.RELEASE +springDataGemFireVersion=2.3.6.RELEASE +springDataGeodeVersion=2.3.6.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE -springDataReleaseTrainVersion=Neumann-SR5 +springDataReleaseTrainVersion=Neumann-SR6 springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE From 50477aa3cddaebe1c6317a873dfc401e28d21c43 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 18 Nov 2020 19:54:48 -0800 Subject: [PATCH 120/216] Edit TIP to include a reference to the specific documentation on Synchronous, Inline Caching. --- .../src/docs/asciidoc/guides/caching-inline.adoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc index 6c4e995d8..0fd74c18e 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc @@ -3,6 +3,7 @@ :apache-geode-version: {apache-geode-doc-version} :apache-geode-docs: https://geode.apache.org/docs/guide/{apache-geode-version} :apache-geode-javadoc: https://geode.apache.org/releases/latest/javadoc +:apache-geode-name: Apache Geode :images-dir: ./images :spring-boot-docs: https://docs.spring.io/spring-boot/docs/current/reference/html :spring-boot-javadoc: https://docs.spring.io/spring-boot/docs/current/api @@ -30,9 +31,10 @@ guide. Therefore, it would be helpful to have read that guide before proceeding Let's begin. -TIP: Refer to the link:../index.html#geode-caching-provider-inline-caching[Inline Caching] section -in the link:../index.html#geode-caching-provider[Caching with Apache Geode or VMware Tanzu GemFire] chapter -in the reference documentation for more information. +TIP: Refer to the link:../index.html#geode-caching-provider-inline-caching[Inline Caching] section, and specifically +the link:../index.html#geode-caching-provider-inline-caching-synchronous[Synchronous Inline Caching], +in the link:../index.html#geode-caching-provider[Caching with {apache-geode-name}] chapter +of the reference documentation for more information. [#index-link] link:../index.html[Index] From 9e34651520aaff2a377413c811a70f2fd81e1dbd Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 7 Dec 2020 21:48:11 -0800 Subject: [PATCH 121/216] Add additional GemFire/Geode DiskStore files to .gitignore. --- .gitignore | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d6f56cd92..60fea3b49 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,13 @@ bin/ build/ out/ target/ +.bak/ +.idea/ +.settings/ +_site/ +*.dat .gradle +*.lk .springBeans *.iml *.ipr @@ -11,11 +17,6 @@ target/ *.log .classpath .project -.settings/ -.idea/ -_site/ -.bak/ -*.dat deps* /samples/hello-world/vf.gf.dmn-events.cfg From 2210d9766872f4f51023a48f1c1a923fe8a30b6b Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 8 Dec 2020 19:54:00 -0800 Subject: [PATCH 122/216] Fix syntax error (misspelled class name) in a code snippet in the Inline Caching Sample Guide. --- spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc index 0fd74c18e..72fdf5af0 100644 --- a/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc +++ b/spring-geode-docs/src/docs/asciidoc/guides/caching-inline.adoc @@ -376,7 +376,7 @@ This custom `KeyGenerator` was applied in the caching annotations of the service [source,java] ---- @Service -class CalcultorService { +class CalculatorService { @Cacheable(keyGenerator="resultKeyGenerator") public int factorial(int number) { } From cb0bb4a673430964faa52d7fc43cb67db6bb79ba Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 9 Dec 2020 16:57:18 -0800 Subject: [PATCH 123/216] Add section on 'Gradle Dependency Management' under the 'Using Spring Boot for Apache Geode' section of the reference documentation. --- .../src/docs/asciidoc/index.adoc | 93 +++++++++++++++++-- 1 file changed, 84 insertions(+), 9 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 1a06bac66..e45fa3421 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -49,6 +49,7 @@ John Blum :spring-data-geode-javadoc: https://docs.spring.io/spring-data/geode/docs/current/api :spring-data-geode-website: https://spring.io/projects/spring-data-geode :spring-data-website: https://spring.io/projects/spring-data +:spring-dependency-management-gradle-plugin-version: 1.0.10.RELEASE :spring-framework-docs: https://docs.spring.io/spring/docs/current/spring-framework-reference :spring-framework-javadoc: https://docs.spring.io/spring/docs/current/javadoc-api :spring-framework-website: https://spring.io/projects/spring-framework @@ -158,7 +159,8 @@ to see Spring Boot for {apache-geode-name} in action! [[maven-gradle]] == Using Spring Boot for {apache-geode-name} -To use Spring Boot for {apache-geode-name}, simply declare the `spring-geode-starter` on your application classpath: +To use Spring Boot for {apache-geode-name}, simply declare the `spring-geode-starter` on your Spring Boot application +classpath: .Maven [source,xml] @@ -182,7 +184,7 @@ dependencies { } ---- -[[maven-gradle-bom]] +[[maven-bom]] === Maven BOM If you anticipate using more than 1 Spring Boot for {apache-geode-name} (SBDG) module in your Spring Boot application, @@ -191,7 +193,7 @@ then you can also use the new `org.springframework.geode:spring-geode-bom` Maven Your application use case(s) may require more than 1 module if, for example, you need (HTTP) Session state management and replication (e.g. `spring-geode-starter-session`), or you need to enable Spring Boot Actuator endpoints for {apache-geode-name} (e.g. `spring-geode-starter-actuator`), or perhaps you need assistance writing complex Unit -and distributed Integration Tests using STDG (e.g. `spring-geode-starter-test`). +and (distributed) Integration Tests using Spring Test for Apache Geode (STDG) (e.g. `spring-geode-starter-test`). You can declare (include) and use any 1 of the SBDG modules: @@ -260,25 +262,98 @@ might appear as follows: Notice that 1) the Spring Boot application Maven POM (`pom.xml`) contains a `` section declaring the `org.springframework.geode:spring-geode-bom` and that 2) none of the `spring-geode-starter[-xyz]` dependencies -specify an explicit ``, which is 3) managed by the `spring-geode.version` property making it easy to switch -between versions of SBDG as needed. +explicitly specify a ``, which is 3) managed by the `spring-geode.version` property making it easy to switch +between versions of SBDG as needed, applied evenly to all the SBDG modules declared and used in your application Maven +POM. If you change the version of SBDG, make sure to change the `org.springframework.boot:spring-boot-starter-parent` POM version to match. SBDG is always 1 `major` version behind, but matches on `minor` version and `patch` version (and `version qualifier`, e.g. `SNAPSHOT`, `M#`, `RC#`, or `RELEASE`, if applicable). For example, SBDG `1.4.0` is based on Spring Boot `2.4.0`. SBDG `1.3.5.RELEASE` is based on -Spring Boot `2.3.5.RELEASE`. It is important that the versions align. +Spring Boot `2.3.5.RELEASE` and so on. It is important that the versions align. -Of course, all of these concerns are easy to do by simply going to https://start.spring.io[start.spring.io] -and adding the "_Spring for {apache-geode-name}_" dependency. +Of course, all of these concerns are easy to do and handled for you by simply going to +https://start.spring.io[start.spring.io] and adding the "_Spring for {apache-geode-name}_" dependency. Clink on this https://start.spring.io/#!platformVersion={spring-boot-version}&dependencies=geode[link] to get started! +[[gradle-dependency-management]] +=== Gradle Dependency Management + +The user experience when using Gradle is similar to that of Maven. + +Again, if you will be declaring and using more than 1 SBDG module in your Spring Boot application, for example, +the `spring-geode-starter` along with the `spring-geode-starter-actuator` dependency, then using the `spring-geode-bom` +inside your application Gradle build file will help. + +Your application Gradle build file configuration will roughly appear as follows: + +.Spring Boot application Gradle build file +[source,groovy] +[subs="verbatim,attributes"] +---- +plugins { + id 'org.springframework.boot' version '{spring-boot-version}' + id 'io.spring.dependency-management' version '{spring-dependency-management-gradle-plugin-version}' + id 'java' +} + +// ... + +ext { + set('springGeodeVersion', "{spring-boot-data-geode-version}") +} + +dependencies { + implementation 'org.springframework.geode:spring-geode-starter' + implementation 'org.springframework.geode:spring-geode-starter-actuator' + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} + +dependencyManagement { + imports { + mavenBom "org.springframework.geode:spring-geode-bom:$\{springGeodeVersion\}" + } +} +---- + +A combination of the {spring-boot-docs-html}/using-spring-boot.html#using-boot-gradle[Spring Boot Gradle Plugin] +and the https://github.com/spring-gradle-plugins/dependency-management-plugin[Spring Dependency Management Gradle Plugin] +manage the application dependencies for you. + +In a nutshell, the _Spring Dependency Management Gradle Plugin_ provides dependency management capabilities for Gradle +much like Maven. The _Spring Boot Gradle Plugin_ defines a curated and tested set of versions for many 3rd party Java +libraries. Together they make adding dependencies and managing (compatible) versions easier! + +Again, you don't need to explicitly declare the version when adding a dependency, including a new SBDG module dependency +(e.g. `spring-geode-starter-session`) since this has already been determined for you. You can simply declare the +dependency: + +[source,groovy] +---- +implementation 'org.springframework.geode:spring-geode-starter-session' +---- + +The version of SBDG is controlled by the extension property (`springGeodeVersion`) in the application Gradle build file. + +To use a different version of SBDG, simply set the `springGeodeVersion` property to the desired version +(e.g. `1.3.5.RELEASE`). Of course, make sure the version of Spring Boot matches! + +SBDG is always 1 `major` version behind, but matches on `minor` version and `patch` version (and `version qualifier`, +e.g. `SNAPSHOT`, `M#`, `RC#`, or `RELEASE`, if applicable). For example, SBDG `1.4.0` is based on Spring Boot `2.4.0`. +SBDG `1.3.5.RELEASE` is based on Spring Boot `2.3.5.RELEASE` and so on. It is important that the versions align. + +Of course, all of these concerns are easy to do and handled for you by simply going to +https://start.spring.io[start.spring.io] and adding the "_Spring for {apache-geode-name}_" dependency. + +Clink on this https://start.spring.io/#!type=gradle-project&platformVersion={spring-boot-version}&dependencies=geode[link] +to get started! + ifeval::["{version-snapshot}" == "true"] [[maven-gradle-repository]] -=== Repository declaration +=== Repository Declaration Since you are using a `SNAPSHOT` version, you need to add the Spring Snapshot Maven Repository. From c37dc8200e3b8eea4b16902681387265a64b745c Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:57:20 -0800 Subject: [PATCH 124/216] Upgrade to Freefair Lombok Gradle Plugin 5.3.0. --- .../boot/security/spring-geode-samples-boot-security.gradle | 2 +- .../multi-site/spring-geode-samples-caching-multisite.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle b/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle index fe528f75b..5d017b164 100644 --- a/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle +++ b/spring-geode-samples/boot/security/spring-geode-samples-boot-security.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.0.0-rc2" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' diff --git a/spring-geode-samples/caching/multi-site/spring-geode-samples-caching-multisite.gradle b/spring-geode-samples/caching/multi-site/spring-geode-samples-caching-multisite.gradle index 01e8128f7..f73bef4ff 100644 --- a/spring-geode-samples/caching/multi-site/spring-geode-samples-caching-multisite.gradle +++ b/spring-geode-samples/caching/multi-site/spring-geode-samples-caching-multisite.gradle @@ -1,5 +1,5 @@ plugins { - id "io.freefair.lombok" version "5.0.0-rc6" + id "io.freefair.lombok" version "5.3.0" } apply plugin: 'io.spring.convention.spring-sample-boot' From f28c68c313df6d2b2afe1b074b235824d06e8320 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:57:47 -0800 Subject: [PATCH 125/216] Edit Gradle project module description. --- .../spring-geode-actuator-autoconfigure.gradle | 2 +- spring-geode-actuator/spring-geode-actuator.gradle | 2 +- spring-geode-autoconfigure/spring-geode-autoconfigure.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-geode-actuator-autoconfigure/spring-geode-actuator-autoconfigure.gradle b/spring-geode-actuator-autoconfigure/spring-geode-actuator-autoconfigure.gradle index 1f73e1203..c9e8a3074 100644 --- a/spring-geode-actuator-autoconfigure/spring-geode-actuator-autoconfigure.gradle +++ b/spring-geode-actuator-autoconfigure/spring-geode-actuator-autoconfigure.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot for Apache Geode Actuator Auto-Configuration" +description = "Spring Boot Actuator Auto-Configuration for Apache Geode" dependencies { diff --git a/spring-geode-actuator/spring-geode-actuator.gradle b/spring-geode-actuator/spring-geode-actuator.gradle index 3075bff8b..436a5d768 100644 --- a/spring-geode-actuator/spring-geode-actuator.gradle +++ b/spring-geode-actuator/spring-geode-actuator.gradle @@ -1,7 +1,7 @@ apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot for Apache Geode Actuator" +description = "Spring Boot Actuator for Apache Geode" dependencies { diff --git a/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle b/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle index ae9b28e04..2c909fea8 100644 --- a/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle +++ b/spring-geode-autoconfigure/spring-geode-autoconfigure.gradle @@ -5,7 +5,7 @@ plugins { apply plugin: 'io.spring.convention.spring-module' apply from: MAVEN_POM_EDITOR_GRADLE -description = "Spring Boot for Apache Geode Auto-Configuration" +description = "Spring Boot Auto-Configuration for Apache Geode" dependencies { From 9d584cac4297fec7bded69bcb5e5c5de5fa69dcc Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:59:05 -0800 Subject: [PATCH 126/216] Edit changelog and include 1.2.12.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 5ea5fefeb..7f7ca1b95 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,26 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.2.12.RELEASE (2020-12-10) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.2.12.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Adds documentation on using the 'spring-geode-bom' in the 'Using Spring Boot for Apache Geode' section +of the SBDG Reference Documentation. +* Edits TIP in the Inline Caching Sample Guide to include a reference to the specific documentation on +Synchronous, Inline Caching in the SBDG Reference Documentation. +* Add section on 'Gradle Dependency Management' under the 'Using Spring Boot for Apache Geode' section +of the SBDG Reference Documentation. +* Upgrade to Spring Framework 5.2.12.RELEASE. +* Upgrade to Spring Boot 2.2.12.RELEASE. +* Upgrade to Spring Data ReleaseTrain (BOM) Moore-SR12. +* Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.12.RELEASE. +* Upgrade to Freefair Lombok Gradle Plugin 5.3.0. +* Upgrade to Gradle 6.7.1. +* Upgrade to Mockito 3.6.28. + + Changes in version 1.3.6.RELEASE (2020-11-19) --------------------------------------------- Aligns SBDG with Spring Boot 2.3.6.RELEASE along with the latest versions of Spring Framework, Spring Data, From b4346c6d7b09494156914cc5df4d010726316eab Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 10 Dec 2020 23:59:49 -0800 Subject: [PATCH 127/216] Edit README to refer to 1.2.12.RELEASE and 1.2.13.BUILD-SNAPSHOT in the 1.2.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 2e244e466..1ce1a4651 100644 --- a/README.adoc +++ b/README.adoc @@ -55,8 +55,8 @@ This, along with many other benefits, are provided by this project. | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.1.11.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.2.11.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] -| `1.2.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.2.12.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] +| `1.2.13.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.6.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] | `1.3.7.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] From 2732f427fda11c3cb58ccc136f38832906200b58 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 11 Dec 2020 00:29:58 -0800 Subject: [PATCH 128/216] Disable explicit dependency management for VMware Tanzu (Pivotal) GemFire. Disable explicit dependency management for all 'io.pivotal.gemfire:geode-*' JAR files. --- gradle/dependency-management.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle/dependency-management.gradle b/gradle/dependency-management.gradle index 24a496c2a..37afa409c 100644 --- a/gradle/dependency-management.gradle +++ b/gradle/dependency-management.gradle @@ -5,10 +5,10 @@ dependencyManagement { dependencies { dependency "antlr:antlr:$antlrVersion" dependency "edu.umd.cs.mtc:multithreadedtc:$multithreadedtcVersion" - dependency "io.pivotal.gemfire:geode-core:$pivotalGemFireVersion" - dependency "io.pivotal.gemfire:geode-cq:$pivotalGemFireVersion" - dependency "io.pivotal.gemfire:geode-lucene:$pivotalGemFireVersion" - dependency "io.pivotal.gemfire:geode-wan:$pivotalGemFireVersion" +// dependency "io.pivotal.gemfire:geode-core:$pivotalGemFireVersion" +// dependency "io.pivotal.gemfire:geode-cq:$pivotalGemFireVersion" +// dependency "io.pivotal.gemfire:geode-lucene:$pivotalGemFireVersion" +// dependency "io.pivotal.gemfire:geode-wan:$pivotalGemFireVersion" dependency "net.bytebuddy:byte-buddy:$byteBuddyVersion" dependency "net.bytebuddy:byte-buddy-agent:$byteBuddyVersion" // dependency "org.apache.geode:geode-core:$apacheGeodeVersion" From 081dbd5c5dd6fefaf9dff685161e42d7d0121a20 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 11 Dec 2020 00:34:38 -0800 Subject: [PATCH 129/216] Edit changelog and add 1.3.7.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 7f7ca1b95..c4685235f 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,23 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.7.RELEASE (2020-12-11) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.3.7.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Add section on 'Gradle Dependency Management' under the 'Using Spring Boot for Apache Geode' section +of the SBDG Reference Documentation. +* Edits TIP in the Inline Caching Sample Guide to include a reference to the specific documentation on +Synchronous, Inline Caching in the SBDG Reference Documentation. +* Upgrade to Spring Framework 5.2.12.RELEASE. +* Upgrade to Spring Boot 2.3.7.RELEASE. +* Upgrade to Spring Data Release Train (BOM) Neumann-SR6. +* Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.6.RELEASE. +* Upgrade to Freefair Lombok Gradle Plugin 5.3.0. +* Upgrade to Mockito 3.6.28. + + Changes in version 1.2.12.RELEASE (2020-12-10) ---------------------------------------------- Aligns SBDG with Spring Boot 2.2.12.RELEASE along with the latest versions of Spring Framework, Spring Data @@ -17,7 +34,7 @@ Synchronous, Inline Caching in the SBDG Reference Documentation. of the SBDG Reference Documentation. * Upgrade to Spring Framework 5.2.12.RELEASE. * Upgrade to Spring Boot 2.2.12.RELEASE. -* Upgrade to Spring Data ReleaseTrain (BOM) Moore-SR12. +* Upgrade to Spring Data Release Train (BOM) Moore-SR12. * Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.12.RELEASE. * Upgrade to Freefair Lombok Gradle Plugin 5.3.0. * Upgrade to Gradle 6.7.1. From f3295afcb45d6960089d911a7c07b8e73477822e Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 11 Dec 2020 00:39:18 -0800 Subject: [PATCH 130/216] Release 1.3.7.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 4da2f5821..4ca210f03 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 -version=1.3.7.BUILD-SNAPSHOT +version=1.3.7.RELEASE From 3851f79356a6021a780667a450fbdd672cfc84fc Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 11 Dec 2020 00:51:49 -0800 Subject: [PATCH 131/216] Prepare next development iteration. Set Spring Boot version to 2.3.8.BUILD-SNAPSHOT. Set version to 1.3.8.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4ca210f03..81dabcaa7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.12.RELEASE -springBootVersion=2.3.7.RELEASE +springBootVersion=2.3.8.BUILD-SNAPSHOT springDataGemFireVersion=2.3.6.RELEASE springDataGeodeVersion=2.3.6.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.2.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 -version=1.3.7.RELEASE +version=1.3.8.BUILD-SNAPSHOT From 8a949020ade4057e367c54bc26ed61e83951f5a6 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 11 Dec 2020 01:08:26 -0800 Subject: [PATCH 132/216] Edit README to refer to 1.3.7.RELEASE and 1.3.8.BUILD-SNAPSHOT in the 1.3.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 1ce1a4651..82a63496c 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.12.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.13.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.6.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.7.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.7.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.8.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From f79c671b30a74d5a3d1a763e7a3ea6fbc6ae9377 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:33:45 -0800 Subject: [PATCH 133/216] Upgrade to Byte Buddy 1.10.19. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 81dabcaa7..76777a526 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 -byteBuddyVersion=1.10.18 +byteBuddyVersion=1.10.19 findbugsVersion=3.0.2 mockitoVersion=3.6.28 multithreadedtcVersion=1.01 From 362b542c278615075553de92e09b2c825e650cf4 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:34:07 -0800 Subject: [PATCH 134/216] Upgrade to Mockito 3.7.7. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 76777a526..034fc2f6c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.19 findbugsVersion=3.0.2 -mockitoVersion=3.6.28 +mockitoVersion=3.7.7 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 From 5b66278540885f78e8d4fbf2090ebddcba728ee1 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:35:18 -0800 Subject: [PATCH 135/216] Upgrade to Spring Boot 2.3.8.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 034fc2f6c..0018e74ef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.12.RELEASE -springBootVersion=2.3.8.BUILD-SNAPSHOT +springBootVersion=2.3.8.RELEASE springDataGemFireVersion=2.3.6.RELEASE springDataGeodeVersion=2.3.6.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From cfe349a90a557f55c943fe5ec0073e1e01a06763 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:37:05 -0800 Subject: [PATCH 136/216] Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.3.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0018e74ef..49d23e195 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ springDataGeodeVersion=2.3.6.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE springDataReleaseTrainVersion=Neumann-SR6 springSessionBomVersion=Dragonfruit-SR1 -springSessionDataGeodeVersion=2.3.2.RELEASE +springSessionDataGeodeVersion=2.3.3.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.0 version=1.3.8.BUILD-SNAPSHOT From 683f80a631cbba10b5db2dcf7b0bfa88c5a6081e Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:37:25 -0800 Subject: [PATCH 137/216] Upgrade to Testcontainers 1.15.1. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 49d23e195..8af93c27c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,5 @@ springDataReleaseTrainVersion=Neumann-SR6 springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.3.RELEASE springShellVersion=1.2.0.RELEASE -testcontainersVersion=1.15.0 +testcontainersVersion=1.15.1 version=1.3.8.BUILD-SNAPSHOT From f71c43e13806fb602e2af66b6b96a60449dfd1b3 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:37:51 -0800 Subject: [PATCH 138/216] Upgrade to Gradle 6.8. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4d9ca1649..da9702f9e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 487f5c42eb9f321ea4b0bfcbd6810946cd64b441 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:52:18 -0800 Subject: [PATCH 139/216] Change Spring Geode Samples Maven POM to build with Spring Boot 2.3.8.RELEASE. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index d779e3931..210f34d9d 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.6.BUILD-SNAPSHOT + 1.3.8.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index e7293754c..8893d027e 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.6.RELEASE + 2.3.8.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.6.BUILD-SNAPSHOT + 1.3.8.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.6.BUILD-SNAPSHOT + 1.3.8.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.6.BUILD-SNAPSHOT + 1.3.8.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.6.BUILD-SNAPSHOT + 1.3.8.BUILD-SNAPSHOT From 2ba999119efd7a5fe76d284e059e857fdf9cb2c9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:52:35 -0800 Subject: [PATCH 140/216] Edit changelog and include 1.2.13.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index c4685235f..3ea02d810 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,19 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.2.13.RELEASE (2021-01-19) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.2.13.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Upgrade to Spring Boot 2.2.13.RELEASE. +* Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.7.RELEASE. +* Upgrade to Byte Buddy 1.10.19. +* Upgrade to Gradle 6.8. +* Upgrade to Mockito 3.7.7. +* Upgrade to Testcontainers 1.15.1. + + Changes in version 1.3.7.RELEASE (2020-12-11) ---------------------------------------------- Aligns SBDG with Spring Boot 2.3.7.RELEASE along with the latest versions of Spring Framework, Spring Data From f2154e6b8b86022220c99e6a18c01b6f0389b3d3 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:55:25 -0800 Subject: [PATCH 141/216] Edit README to refer to 1.2.13.RELEASE and 1.2.14.BUILD-SNAPSHOT in the 1.2.x release series. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 82a63496c..e6a05d210 100644 --- a/README.adoc +++ b/README.adoc @@ -55,8 +55,8 @@ This, along with many other benefits, are provided by this project. | `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.1.11.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples] | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.2.12.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] -| `1.2.13.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] +| `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.3.7.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] | `1.3.8.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] From 8c28ab61a282bc195918a19973b2078044176b9f Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:53:36 -0800 Subject: [PATCH 142/216] Edit changelog and add 1.3.8.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 3ea02d810..4869b17ff 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,19 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.8.RELEASE (2021-01-19) +--------------------------------------------- +Aligns SBDG with Spring Boot 2.3.8.RELEASE along with the latest versions of Spring Framework, Spring Data +and Spring Session. + +* Upgrade to Spring Boot 2.3.8.RELEASE. +* Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.3.RELEASE. +* Upgrade to Byte Buddy 1.10.19. +* Upgrade to Gradle 6.8. +* Upgrade to Mockito 3.7.7. +* Upgrade to Testcontainers 1.15.1. + + Changes in version 1.2.13.RELEASE (2021-01-19) ---------------------------------------------- Aligns SBDG with Spring Boot 2.2.13.RELEASE along with the latest versions of Spring Framework, Spring Data From 778ebd5ffd31993ee64ce01366850898939865af Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 16:57:13 -0800 Subject: [PATCH 143/216] Release 1.3.8.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8af93c27c..43cdef316 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.3.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.1 -version=1.3.8.BUILD-SNAPSHOT +version=1.3.8.RELEASE From 87a13e6c3eda845eb4fce1ac3a96c85db4feee5b Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 17:08:50 -0800 Subject: [PATCH 144/216] Prepare next development iteration. Set Spring Boot version to 2.3.9.BUILD-SNAPSHOT. Set version to 1.3.9.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 43cdef316..f8db4af0e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 springVersion=5.2.12.RELEASE -springBootVersion=2.3.8.RELEASE +springBootVersion=2.3.9.BUILD-SNAPSHOT springDataGemFireVersion=2.3.6.RELEASE springDataGeodeVersion=2.3.6.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.3.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.1 -version=1.3.8.RELEASE +version=1.3.9.BUILD-SNAPSHOT From e6fff7849cfff030f59cc1ac7e6543e0c9628f14 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 19 Jan 2021 17:23:04 -0800 Subject: [PATCH 145/216] Edit README to refer to 1.3.8.RELEASE and 1.3.9.BUILD-SNAPSHOT. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index e6a05d210..a98e0cf25 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.7.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.8.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.8.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.9.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From 5d612e244b3761d8259fe52a3635920c94834b0e Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:30:16 -0800 Subject: [PATCH 146/216] Upgrade to Byte Buddy 1.10.20. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f8db4af0e..301c0e182 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 -byteBuddyVersion=1.10.19 +byteBuddyVersion=1.10.20 findbugsVersion=3.0.2 mockitoVersion=3.7.7 multithreadedtcVersion=1.01 From b5f4a08f8d738ae9a65dc5a897570042d3a3ac71 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:30:51 -0800 Subject: [PATCH 147/216] Upgrade to Mockito 3.8.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 301c0e182..171b87812 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.20 findbugsVersion=3.0.2 -mockitoVersion=3.7.7 +mockitoVersion=3.8.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.5 From 6c9d2b4528a112ec544dbc980cb1dd005bc94b59 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:32:24 -0800 Subject: [PATCH 148/216] Upgrade to VMware Tanzu (Pivotal) GemFire 9.10.6. Enable dependency management for GemFire in declared dependencies. --- gradle.properties | 2 +- gradle/dependency-management.gradle | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 171b87812..9f6dbdfa5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ findbugsVersion=3.0.2 mockitoVersion=3.8.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 -pivotalGemFireVersion=9.10.5 +pivotalGemFireVersion=9.10.6 springVersion=5.2.12.RELEASE springBootVersion=2.3.9.BUILD-SNAPSHOT springDataGemFireVersion=2.3.6.RELEASE diff --git a/gradle/dependency-management.gradle b/gradle/dependency-management.gradle index 37afa409c..24a496c2a 100644 --- a/gradle/dependency-management.gradle +++ b/gradle/dependency-management.gradle @@ -5,10 +5,10 @@ dependencyManagement { dependencies { dependency "antlr:antlr:$antlrVersion" dependency "edu.umd.cs.mtc:multithreadedtc:$multithreadedtcVersion" -// dependency "io.pivotal.gemfire:geode-core:$pivotalGemFireVersion" -// dependency "io.pivotal.gemfire:geode-cq:$pivotalGemFireVersion" -// dependency "io.pivotal.gemfire:geode-lucene:$pivotalGemFireVersion" -// dependency "io.pivotal.gemfire:geode-wan:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-core:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-cq:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-lucene:$pivotalGemFireVersion" + dependency "io.pivotal.gemfire:geode-wan:$pivotalGemFireVersion" dependency "net.bytebuddy:byte-buddy:$byteBuddyVersion" dependency "net.bytebuddy:byte-buddy-agent:$byteBuddyVersion" // dependency "org.apache.geode:geode-core:$apacheGeodeVersion" From 5bf1856d64faad7b3f279a1113666c7f323be040 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:33:00 -0800 Subject: [PATCH 149/216] Upgrade to Spring Framework 5.2.13.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9f6dbdfa5..f6102eb12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mockitoVersion=3.8.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.6 -springVersion=5.2.12.RELEASE +springVersion=5.2.13.RELEASE springBootVersion=2.3.9.BUILD-SNAPSHOT springDataGemFireVersion=2.3.6.RELEASE springDataGeodeVersion=2.3.6.RELEASE From f228385fbe43c65faa6911c325efb46bafd03c02 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:33:30 -0800 Subject: [PATCH 150/216] Upgrade to Spring Boot 2.3.9.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f6102eb12..52850f9e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.6 springVersion=5.2.13.RELEASE -springBootVersion=2.3.9.BUILD-SNAPSHOT +springBootVersion=2.3.9.RELEASE springDataGemFireVersion=2.3.6.RELEASE springDataGeodeVersion=2.3.6.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From 3a7c5c0c146a76e502b34a74ffc28fb0a3fc81be Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:36:08 -0800 Subject: [PATCH 151/216] Upgrade to Spring Data Neumann-SR7. Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.7.RELEASE. Upgrade to Spring Data Release Train (BOM) Neumann-SR7. --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 52850f9e6..64ac16acb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,10 +9,10 @@ pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.6 springVersion=5.2.13.RELEASE springBootVersion=2.3.9.RELEASE -springDataGemFireVersion=2.3.6.RELEASE -springDataGeodeVersion=2.3.6.RELEASE +springDataGemFireVersion=2.3.7.RELEASE +springDataGeodeVersion=2.3.7.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE -springDataReleaseTrainVersion=Neumann-SR6 +springDataReleaseTrainVersion=Neumann-SR7 springSessionBomVersion=Dragonfruit-SR1 springSessionDataGeodeVersion=2.3.3.RELEASE springShellVersion=1.2.0.RELEASE From dcfa2e1131ba2c36cab6dbe9a949e7f012e0af37 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:37:29 -0800 Subject: [PATCH 152/216] Upgrade to Spring Session BOM Dragonfruit-SR2. Upgrade to Spring Session for Apache Geoede & VMware Tanzu (Pivotal) GemFire 2.3.4.RELEASE. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 64ac16acb..5ca1f4ae2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ springDataGemFireVersion=2.3.7.RELEASE springDataGeodeVersion=2.3.7.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE springDataReleaseTrainVersion=Neumann-SR7 -springSessionBomVersion=Dragonfruit-SR1 -springSessionDataGeodeVersion=2.3.3.RELEASE +springSessionBomVersion=Dragonfruit-SR2 +springSessionDataGeodeVersion=2.3.4.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.1 version=1.3.9.BUILD-SNAPSHOT From 81e39e8dc961f2756dd9da542aaf0f0995a4a1c3 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:38:22 -0800 Subject: [PATCH 153/216] Upgrade to Testcontainers 1.15.2. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5ca1f4ae2..cb2235fd8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,5 @@ springDataReleaseTrainVersion=Neumann-SR7 springSessionBomVersion=Dragonfruit-SR2 springSessionDataGeodeVersion=2.3.4.RELEASE springShellVersion=1.2.0.RELEASE -testcontainersVersion=1.15.1 +testcontainersVersion=1.15.2 version=1.3.9.BUILD-SNAPSHOT From 8edd8d28b9bdc46fb368340b967620fda7d14751 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 16:39:51 -0800 Subject: [PATCH 154/216] Upgrade to Gradle 6.8.2. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index da9702f9e..2a563242c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 69682c257095728fcf4038f9d0d01199d0f77242 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 18:19:53 -0800 Subject: [PATCH 155/216] Add comment in build.gradle to note that the Spring Build Conventions Gradle Plugin is now fixed on 0.0.35.RELEASE. --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 1e17265fe..17f0615c7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,7 @@ buildscript { dependencies { + // Cannot upgrade to Spring Build Conventions Gradle Plugin after 0.0.35.RELEASE since the Gradle build + // can no longer resolve VMware Tanzu (Pivotal) GemFire bits. classpath 'io.spring.gradle:spring-build-conventions:0.0.35.RELEASE' classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion" } From f65b0e63738879486a4422032cffbaf74617ff7d Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 18:20:06 -0800 Subject: [PATCH 156/216] Upgrade Spring Geode Samples Maven POMs to Spring Boot 2.3.9.RELEASE & SBDG 1.3.9.BUILD-SNAPSHOT. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index 210f34d9d..96b83e3b2 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.8.BUILD-SNAPSHOT + 1.3.9.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index 8893d027e..86eb9da0d 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.8.RELEASE + 2.3.9.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.8.BUILD-SNAPSHOT + 1.3.9.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.8.BUILD-SNAPSHOT + 1.3.9.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.8.BUILD-SNAPSHOT + 1.3.9.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.8.BUILD-SNAPSHOT + 1.3.9.BUILD-SNAPSHOT From 256dbe75112fba6aa4f5b729e7db795c17a0bac9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 1 Feb 2021 14:26:37 -0800 Subject: [PATCH 157/216] State the project goals in documentation. Resolves gh-101. --- .../src/docs/asciidoc/index.adoc | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index e45fa3421..9a998c8b9 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -87,7 +87,7 @@ and Spring Data for {pivotal-gemfire-name} are commonly known as SDG.]) since th Spring Boot for {apache-geode-name} & {pivotal-gemfire-name} automatically applies _auto-configuration_ to several key application concerns (_Use Cases_) including, but not limited to: -* _Look-Aside, Inline, Near_ and _Multi-Site Caching_, using {apache-geode-name} as a caching provider in +* _Look-Aside, [Async] Inline, Near_ and _Multi-Site Caching_, using {apache-geode-name} as a caching provider in {spring-framework-docs}/integration.html#cache[Spring's Cache Abstraction]. <>. * {wikipedia-docs}/System_of_record[_System of Record_ (SOR)], persisting application state reliably in {apache-geode-name} @@ -125,6 +125,24 @@ While Spring Data for {apache-geode-name} & {pivotal-gemfire-name} offers a simp and declarative approach to configure all these powerful {apache-geode-name} features, Spring Boot for {apache-geode-name} & {pivotal-gemfire-name} makes it even easier to do as we will explore throughout this reference documentation. +[[introduction-goals]] +=== Goals + +While the SBDG project has many goals and objectives, the primary goals of this project centers around +three key principles: + +1. From **_Open Source_** ({apache-geode-name}) to **_Commercial_** ({pivotal-gemfire-name}) +2. From **_Non-Managed_** (self-managed/hosted or on-premise installations) to **_Managed_** +({pivotal-cloudcache-name}, {vmware-gemfire-name}) environments +3. With **little to no code or configuration changes** necessary + +It is also possible to go in the reverse direction, from _Managed_ back to a _Non-Managed_ environment +and even from _Commercial_ back to the _Open Source_ offering, again, with _little to no code or configuration_ changes; +it simply just works! + +NOTE: SBDG's promise is to deliver on these principles as much as is technically possible and is technically allowed +by {apache-geode-name}. + [[getting-started]] == Getting Started @@ -411,6 +429,7 @@ repositories { ---- endif::[] + include::{include-dir}/clientcache-applications.adoc[] include::{include-dir}/configuration-auto.adoc[] include::{include-dir}/configuration-declarative.adoc[] From c2c57ab8866f59401b1463a53a597062b90070db Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 1 Feb 2021 20:42:08 -0800 Subject: [PATCH 158/216] Declare 'org.springframework.geode:spring-geode-starter-test' as a test-compile dependency in the spring-geode-docs module. --- spring-geode-docs/spring-geode-docs.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-geode-docs/spring-geode-docs.gradle b/spring-geode-docs/spring-geode-docs.gradle index d06857b0b..219616a05 100644 --- a/spring-geode-docs/spring-geode-docs.gradle +++ b/spring-geode-docs/spring-geode-docs.gradle @@ -20,9 +20,10 @@ dependencies { testCompile "junit:junit" testCompile "org.mockito:mockito-core" - testCompile "org.springframework:spring-test" testCompile "edu.umd.cs.mtc:multithreadedtc" + testCompile project(":spring-geode-starter-test") + } def versions = dependencyManagement.managedVersions From 586b8d5902a3b9595434674e7d2d7b8e38725969 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 1 Feb 2021 20:44:26 -0800 Subject: [PATCH 159/216] Add an example of Unit Testing with Apache Geode using Spring Boot Test and STDG frameworks in a Spring context for the 'Testing' chapter. --- .../unit/SpringBootApacheGeodeUnitTest.java | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 spring-geode-docs/src/test/java/example/test/unit/SpringBootApacheGeodeUnitTest.java diff --git a/spring-geode-docs/src/test/java/example/test/unit/SpringBootApacheGeodeUnitTest.java b/spring-geode-docs/src/test/java/example/test/unit/SpringBootApacheGeodeUnitTest.java new file mode 100644 index 000000000..9848ff609 --- /dev/null +++ b/spring-geode-docs/src/test/java/example/test/unit/SpringBootApacheGeodeUnitTest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.test.unit; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.annotation.Profile; +import org.springframework.data.annotation.Id; +import org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions; +import org.springframework.data.gemfire.mapping.annotation.Region; +import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport; +import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; +import org.springframework.data.repository.CrudRepository; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +/** + * Unit Test using Spring Boot with Apache Geode. + * + * @author John Blum + * @see org.junit.Test + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.test.context.SpringBootTest + * @see org.springframework.context.annotation.Profile + * @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport + * @see org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects + * @see org.springframework.test.context.ActiveProfiles + * @see org.springframework.test.context.junit4.SpringRunner + * @since 1.5.0 + */ +@ActiveProfiles("spring-geode-docs-unit-test") +@DirtiesContext +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE) +@SuppressWarnings("unused") +public class SpringBootApacheGeodeUnitTest extends IntegrationTestsSupport { + + @Autowired + private UserRepository userRepository; + + @Test + public void saveAndFindUserIsSuccessful() { + + User jonDoe = User.as("jonDoe"); + + assertThat(this.userRepository.save(jonDoe)).isNotNull(); + + User jonDoeFoundById = this.userRepository.findById(jonDoe.getName()).orElse(null); + + assertThat(jonDoeFoundById).isEqualTo(jonDoe); + } + + @SpringBootApplication + @EnableGemFireMockObjects + @EnableEntityDefinedRegions(basePackageClasses = User.class) + @Profile("spring-geode-docs-unit-test") + static class TestConfiguration { } + +} + +@Getter +@ToString +@EqualsAndHashCode +@RequiredArgsConstructor(staticName = "as") +@Region("Users") +class User { + + @Id + @lombok.NonNull + private String name; + +} + +interface UserRepository extends CrudRepository { } From 555824ff831c315c3651ef9f9e1d3e0ca5d2200b Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 1 Feb 2021 20:45:08 -0800 Subject: [PATCH 160/216] Add an example of Integration Testing with Apache Geode using Spring Boot Test and STDG frameworks in a Spring context for the 'Testing' chapter. --- .../SpringBootApacheGeodeIntegrationTest.java | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 spring-geode-docs/src/test/java/example/test/integration/SpringBootApacheGeodeIntegrationTest.java diff --git a/spring-geode-docs/src/test/java/example/test/integration/SpringBootApacheGeodeIntegrationTest.java b/spring-geode-docs/src/test/java/example/test/integration/SpringBootApacheGeodeIntegrationTest.java new file mode 100644 index 000000000..54c82f3d8 --- /dev/null +++ b/spring-geode-docs/src/test/java/example/test/integration/SpringBootApacheGeodeIntegrationTest.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +package example.test.integration; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; + +import javax.annotation.Resource; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.apache.geode.cache.DataPolicy; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.WebApplicationType; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.annotation.Profile; +import org.springframework.data.annotation.Id; +import org.springframework.data.gemfire.config.annotation.CacheServerApplication; +import org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions; +import org.springframework.data.gemfire.mapping.annotation.Region; +import org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport; +import org.springframework.data.repository.CrudRepository; +import org.springframework.geode.config.annotation.EnableClusterAware; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; + +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +/** + * Integration Test using Spring Boot with Apache Geode. + * + * @author John Blum + * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.boot.builder.SpringApplicationBuilder + * @see org.springframework.boot.test.context.SpringBootTest + * @see org.springframework.context.annotation.Profile + * @see org.springframework.data.gemfire.config.annotation.CacheServerApplication + * @see org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport + * @see org.springframework.test.context.ActiveProfiles + * @see org.springframework.test.context.junit4.SpringRunner + * @since 1.5.0 + */ +@ActiveProfiles("spring-geode-docs-integration-test-client") +@DirtiesContext +@RunWith(SpringRunner.class) +@SpringBootTest( + properties = "spring.data.gemfire.management.use-http=false", + webEnvironment = SpringBootTest.WebEnvironment.NONE +) +@SuppressWarnings("unused") +public class SpringBootApacheGeodeIntegrationTest extends ForkingClientServerIntegrationTestsSupport { + + @BeforeClass + public static void startGeodeServer() throws IOException { + startGemFireServer(TestGeodeServerConfiguration.class); + } + + @Resource(name = "Users") + private org.apache.geode.cache.Region users; + + @Autowired + private UserRepository userRepository; + + @Before + public void assertRegionConfiguration() { + + assertThat(this.users).isNotNull(); + assertThat(this.users.getName()).isEqualTo("Users"); + assertThat(this.users.getAttributes()).isNotNull(); + assertThat(this.users.getAttributes().getDataPolicy()).isEqualTo(DataPolicy.EMPTY); + } + + @Test + public void saveAndFindUserIsSuccessful() { + + User jonDoe = User.as("jonDoe"); + + assertThat(this.userRepository.save(jonDoe)).isNotNull(); + + User jonDoeFoundById = this.userRepository.findById(jonDoe.getName()).orElse(null); + + assertThat(jonDoeFoundById).isEqualTo(jonDoe); + assertThat(jonDoeFoundById).isNotSameAs(jonDoe); + } + + @SpringBootApplication + @EnableClusterAware + @EnableEntityDefinedRegions(basePackageClasses = User.class) + @Profile("spring-geode-docs-integration-test-client") + static class TestGeodeClientConfiguration { } + + @CacheServerApplication + @Profile("spring-geode-docs-integration-test-server") + static class TestGeodeServerConfiguration { + + public static void main(String[] args) { + + new SpringApplicationBuilder(TestGeodeServerConfiguration.class) + .profiles("spring-geode-docs-integration-test-server") + .web(WebApplicationType.NONE) + .build() + .run(args); + } + } +} + +@Getter +@ToString +@EqualsAndHashCode +@RequiredArgsConstructor(staticName = "as") +@Region("Users") +class User { + + @Id + @lombok.NonNull + private String name; + +} + +interface UserRepository extends CrudRepository { } From 237cf8ec3ef6ff933159864bd23520a2638876cb Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 1 Feb 2021 22:05:00 -0800 Subject: [PATCH 161/216] Add reference documentation chapter on 'Testing'. Resolves gh-102. --- .../src/docs/asciidoc/_includes/appendix.adoc | 4 +- .../src/docs/asciidoc/_includes/testing.adoc | 251 ++++++++++++++++++ .../src/docs/asciidoc/index.adoc | 2 +- 3 files changed, 254 insertions(+), 3 deletions(-) create mode 100644 spring-geode-docs/src/docs/asciidoc/_includes/testing.adoc diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc index 1edd58001..c39704265 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/appendix.adoc @@ -13,7 +13,7 @@ _Table of Contents_ 3. <> 4. <> 5. <> -6. <> +6. <> 7. <> 8. <> @@ -555,7 +555,7 @@ Congratulations! You just started a small {geode-name} cluster, with 3 members, It is pretty simple to build and run a Spring Boot, {geode-name}, `ClientCache` application that connects to this cluster. Simply include and use Spring Boot for {geode-name}, ;-). -[[geode-testing]] +[[geode-testing-support]] === Testing https://github.com/spring-projects/spring-test-data-geode[Spring Test for {geode-name}] is a new, soon to be released diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/testing.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/testing.adoc new file mode 100644 index 000000000..e3f9bd9ac --- /dev/null +++ b/spring-geode-docs/src/docs/asciidoc/_includes/testing.adoc @@ -0,0 +1,251 @@ +[[geode-testing]] +== Testing +:gemfire-name: {pivotal-gemfire-name} +:geode-name: {apache-geode-name} +:stdg-website: https://github.com/spring-projects/spring-test-data-geode + +Spring Boot for {geode-name} (SBDG), with help from {stdg-website}[Spring Test for {geode-name} (STDG)], offers +first-class support for both _Unit_ & _Integration Testing_ of {geode-name} in your Spring Boot applications. + +TIP: See the Spring Test for Apache Geode (STDG) {stdg-website}/#stdg-in-a-nutshell[documentation] for more details. + +[[geode-testing-unit]] +=== Unit Testing + +_Unit Testing_ with {geode-name} using _mock objects_ in a Spring Boot Test is as simple as declaring the STDG +`@EnableGemFireMockObjects` annotation in your test configuration: + +.Unit Test with {geode-name} using Spring Boot +[source,java] +---- +@SpringBootTest +@RunWith(SpringRunner.class) +public class SpringBootApacheGeodeUnitTest extends IntegrationTestsSupport { + + @Autowired + private UserRepository userRepository; + + @Test + public void saveAndFindUserIsSuccessful() { + + User jonDoe = User.as("jonDoe"); + + assertThat(this.userRepository.save(jonDoe)).isNotNull(); + + User jonDoeFoundById = this.userRepository.findById(jonDoe.getName()).orElse(null); + + assertThat(jonDoeFoundById).isEqualTo(jonDoe); + } + + @SpringBootApplication + @EnableGemFireMockObjects + @EnableEntityDefinedRegions(basePackageClasses = User.class) + static class TestConfiguration { } + +} + +@Getter +@ToString +@EqualsAndHashCode +@RequiredArgsConstructor(staticName = "as") +@Region("Users") +class User { + + @Id + @lombok.NonNull + private String name; + +} + +interface UserRepository extends CrudRepository { } +---- + +While this test class is not a "pure" _Unit Test_, particularly since it bootstraps an actual Spring `ApplicationContext` +using Spring Boot, it does, however, "_mock_" all {geode-name} objects, such as the "_Users_" `Region` declared by the +`User` application entity class, which was annotated with SDG's `@Region` mapping annotation. + +This test class conveniently uses Spring Boot's _auto-configuration_ to auto-configure an {geode-name} `ClientCache` +instance. In addition, SDG's `@EnableEntityDefinedRegions` annotation was used to conveniently create the {geode-name} +"_Users_" `Region` to store instances of `User`. + +Finally, Spring Data's _Repository_ abstraction was used to conveniently perform basic CRUD (e.g. `save`) and simple +(OQL) query (e.g. `findById`) data access operations on the "_Users_" `Region`. + +Even though the {geode-name} objects (e.g. "_Users_" `Region`) are "_mock objects_", you can still perform many of +the data access operations required by your Spring Boot application's business logic in a {geode-name} API agnostic way, +that is, using Spring's powerful programming model and constructs! + +TIP: By extending STDG's `org.springframework.data.gemfire.tests.integration.IntegrationTestSupport` class, +you ensure that all {geode-name} mock objects and resources are properly released after the test class runs, +thereby preventing any interference with downstream tests. + +While STDG tries to {stdg-website}/#mock-regions-with-data[mock the functionality and behavior] for many `Region` +operations, it is simply not pragmatic to mock them all. For example, it would not be practical to mock `Region` +query operations involving complex OQL statements having sophisticated predicates. + +If such functional testing is required, then the test might be better suited as an _Integration Test_. Alternatively, +you can follow the advice in this {stdg-website}/#mocking-unsupported-region-operations[section]. + +In general, STDG provides the following capabilities when mocking {geode-name} objects out-of-the-box: + +* {stdg-website}#mock-object-scope--lifecycle-management[Mock Object Scope & Lifecycle Management] +* {stdg-website}#mock-regions-with-data[Support for Mock Regions with Data] +* {stdg-website}#mock-region-callbacks[Support for Mocking Region Callbacks] +* {stdg-website}#mocking-unsupported-region-operations[Support for Mocking Unsupported Region Operations] + +TIP: See documentation on {stdg-website}/#unit-testing-with-stdg[Unit Testing with STDG] for more details. + +[[geode-testing-integration]] +=== Integration Testing + +_Integration Testing_ with {geode-name} in a Spring Boot Test is as simple as **not** declaring STDG's +`@EnableGemFireMockObjects` annotation in your test configuration. Of course, you may then want to additionally use +SBDG's `@EnableClusterAware` annotation to conditionally detect the presence of a {geode-name} cluster: + +.Using `@EnableClusterAware` in test configuration +[source,java] +---- +@SpringBootApplication +@EnableClusterAware +@EnableEntityDefinedRegions(basePackageClasses = User.class) +static class TestConfiguration { } +---- + +The SBDG `@EnableClusterAware` annotation will conveniently toggle your auto-configured `ClientCache` instance +between local-only mode and client/server. Additionally, it will even push configuration metadata +(e.g. `Region` definitions) up to the server(s) in the cluster required by the application to persist data. + +In most cases, in addition to testing with "_live_" {geode-name} objects (e.g. _Regions_), we also want to test +in a client/server capacity. This unlocks the full capabilities of the {geode-name} data management system +in a Spring context, and gets you as close as possible to production from the comfort of your IDE. + +Building on our example from the section on <>, you can modify the test to use "_live_" +{geode-name} objects in a client/server topology as follows: + +.Integration Test with {geode-name} using Spring Boot +[source,java] +---- +@ActiveProfiles("client") +@RunWith(SpringRunner.class) +@SpringBootTest(properties = "spring.data.gemfire.management.use-http=false") +public class SpringBootApacheGeodeIntegrationTest extends ForkingClientServerIntegrationTestsSupport { + + @BeforeClass + public static void startGeodeServer() throws IOException { + startGemFireServer(TestGeodeServerConfiguration.class); + } + + @Autowired + private UserRepository userRepository; + + @Test + public void saveAndFindUserIsSuccessful() { + + User jonDoe = User.as("jonDoe"); + + assertThat(this.userRepository.save(jonDoe)).isNotNull(); + + User jonDoeFoundById = this.userRepository.findById(jonDoe.getName()).orElse(null); + + assertThat(jonDoeFoundById).isEqualTo(jonDoe); + assertThat(jonDoeFoundById).isNotSameAs(jonDoe); + } + + @SpringBootApplication + @EnableClusterAware + @EnableEntityDefinedRegions(basePackageClasses = User.class) + @Profile("client") + static class TestGeodeClientConfiguration { } + + @CacheServerApplication + @Profile("server") + static class TestGeodeServerConfiguration { + + public static void main(String[] args) { + + new SpringApplicationBuilder(TestGeodeServerConfiguration.class) + .web(WebApplicationType.NONE) + .profiles("server") + .build() + .run(args); + } + } +} + +@Getter +@ToString +@EqualsAndHashCode +@RequiredArgsConstructor(staticName = "as") +@Region("Users") +class User { + + @Id + @lombok.NonNull + private String name; + +} + +interface UserRepository extends CrudRepository { } +---- + +The application client/server-based _Integration Test_ class extend STDG's +`org.springframework.data.gemfire.tests.integration.ForkingClientServerIntegrationTestsSupport` class. +This ensures that all {geode-name} objects and resources are properly cleaned up after the test class runs. In addition, +it coordinates the client & server components of the test (e.g. connecting the client to the server using a random port). + +The server is started in a `@BeforeClass` setup method: + +.Start the {geode-name} server +[source,java] +---- +class SpringBootApacheGeodeIntegrationTest extends ForkingClientServerIntegrationTestsSupport { + + @BeforeClass + public static void startGeodeServer() throws IOException { + startGemFireServer(TestGeodeServerConfiguration.class); + } +} +---- + +STDG allows you to configure the server with Spring config, specified in the `TestGeodeServerConfiguration` class. +The Java class needs to provide a `main` method. It uses the `SpringApplicationBuilder` to bootstrap the {geode-name} +`CacheServer` application. + +.{geode-name} server configuration +[source,java] +---- +@CacheServerApplication +@Profile("server") +static class TestGeodeServerConfiguration { + + public static void main(String[] args) { + + new SpringApplicationBuilder(TestGeodeServerConfiguration.class) + .web(WebApplicationType.NONE) + .profiles("server") + .build() + .run(args); + } +} +---- + +In this case, we provide very minimal configuration since the configuration is determined and pushed up to the server +by the client. For example, we do not need to explicitly create the "_Users_" `Region` on the server-side since it is +implicitly handled for you by the SBDG/STDG frameworks from the client. + +We take advantage of Spring _Profiles_ in the test setup to distinguish between the client & server configuration. Keep +in mind that the test is the "client" in this arrangement. + +The STDG framework is doing as the supporting class states, "forking" the Spring Boot-based, {geode-name} `CacheServer` +application in a separate JVM process. Subsequently, the STDG framework will stop the server upon completion of +the tests in the test class. + +Of course, you are free to start your server(s) or cluster however you choose. STDG simply and conveniently provides +this capability for you since it is a common concern. + +This test class is very simple and much more complex test scenarios can be easily handled by STDG. + +TIP: Review SBDG's test suite to witness the full power and functionality of the STDG framework for yourself. + +NOTE: See documentation on {stdg-website}/#integration-testing-with-stdg[Integration Testing with STDG] +for more details. diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 9a998c8b9..35321a2b7 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -429,7 +429,6 @@ repositories { ---- endif::[] - include::{include-dir}/clientcache-applications.adoc[] include::{include-dir}/configuration-auto.adoc[] include::{include-dir}/configuration-declarative.adoc[] @@ -444,6 +443,7 @@ include::{include-dir}/data.adoc[] include::{include-dir}/data-serialization.adoc[] include::{include-dir}/logging.adoc[] include::{include-dir}/security.adoc[] +include::{include-dir}/testing.adoc[] include::{include-dir}/geode-api-ext.adoc[] include::{include-dir}/actuator.adoc[] include::{include-dir}/session.adoc[] From 80e4740af4ba6480fe76afef3d77a53801809426 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 18:43:40 -0800 Subject: [PATCH 162/216] Fix gemfire reference in index.adoc. --- spring-geode-docs/src/docs/asciidoc/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-geode-docs/src/docs/asciidoc/index.adoc b/spring-geode-docs/src/docs/asciidoc/index.adoc index 35321a2b7..dc79bcb31 100644 --- a/spring-geode-docs/src/docs/asciidoc/index.adoc +++ b/spring-geode-docs/src/docs/asciidoc/index.adoc @@ -133,7 +133,7 @@ three key principles: 1. From **_Open Source_** ({apache-geode-name}) to **_Commercial_** ({pivotal-gemfire-name}) 2. From **_Non-Managed_** (self-managed/hosted or on-premise installations) to **_Managed_** -({pivotal-cloudcache-name}, {vmware-gemfire-name}) environments +({pivotal-cloudcache-name}, {pivotal-gemfire-name}) environments 3. With **little to no code or configuration changes** necessary It is also possible to go in the reverse direction, from _Managed_ back to a _Non-Managed_ environment From 0ff6784d9738ff450b15962a0c5f0f47204f00e6 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 18:58:41 -0800 Subject: [PATCH 163/216] Edit changelog and add 1.3.9.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 4869b17ff..5a81abfb6 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,26 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.9.RELEASE (2021-02-22) +--------------------------------------------- +Aligns SBDG with Spring Boot 2.3.9.RELEASE along with the latest versions of Spring Framework, Spring Data, +Spring Session and Spring Test for Apache Geode. + +* States project goals in the reference documentation under the 'Introduction'. +* Adds new chapter on 'Testing' in the reference documentation. +* Upgrade to Byte Buddy 1.10.20. +* Upgrade to Gradle 6.8.2. +* Upgrade to Mockito 3.8.0. +* Upgrade to VMware Tanzu (Pivotal) GemFire 9.10.6. +* Upgrade to Spring Framework 5.2.13.RELEASE. +* Upgrade to Spring Boot 2.3.9.RELEASE. +* Upgrade to Spring Data Neumann-SR7. +* Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.7.RELEASE. +* Upgrade to Spring Session BOM Dragonfruit-SR2. +* Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.4.RELEASE. +* Upgrade to Testcontainers 1.15.2. + + Changes in version 1.3.8.RELEASE (2021-01-19) --------------------------------------------- Aligns SBDG with Spring Boot 2.3.8.RELEASE along with the latest versions of Spring Framework, Spring Data From 46b37734478b5a661e37f3b898340165bbf0af46 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 19:00:07 -0800 Subject: [PATCH 164/216] Release 1.3.9.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index cb2235fd8..dcfcb1544 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR2 springSessionDataGeodeVersion=2.3.4.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.2 -version=1.3.9.BUILD-SNAPSHOT +version=1.3.9.RELEASE From c166ba865c3c26458994a2d0e675771dbf36c970 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 19:10:18 -0800 Subject: [PATCH 165/216] Prepare next development iteration. Set Spring Boot version to 2.3.10.BUILD-SNAPSHOT. Set version to 1.3.10.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index dcfcb1544..55ac693af 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.6 springVersion=5.2.13.RELEASE -springBootVersion=2.3.9.RELEASE +springBootVersion=2.3.10.BUILD-SNAPSHOT springDataGemFireVersion=2.3.7.RELEASE springDataGeodeVersion=2.3.7.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -17,4 +17,4 @@ springSessionBomVersion=Dragonfruit-SR2 springSessionDataGeodeVersion=2.3.4.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.2 -version=1.3.9.RELEASE +version=1.3.10.BUILD-SNAPSHOT From 7492bf10fb5cf693c1b7f5e7cf1e09f244204c5e Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 22 Feb 2021 19:25:33 -0800 Subject: [PATCH 166/216] Edit README to refer to 1.3.9.RELEASE and 1.3.10.BUILD-SNAPSHOT. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index a98e0cf25..a88bb58c8 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.8.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.9.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From ca3c869ee1d61bba2134e66ca2e0ca6db523f065 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 12 Apr 2021 14:51:07 -0700 Subject: [PATCH 167/216] Upgrade to Gradle 6.8.3. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2a563242c..442d9132e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 9c56f7951bd6935ba890f85e616f16e1f36cbc35 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 12 Apr 2021 15:07:33 -0700 Subject: [PATCH 168/216] Upgrade Spring Geode Sample parent Maven POM to Spring Boot 2.3.10.BUILD-SNAPSHOT. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index 96b83e3b2..2c25eff6d 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.9.BUILD-SNAPSHOT + 1.3.10.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index 86eb9da0d..3f962593d 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.9.RELEASE + 2.3.10.BUILD-SNAPSHOT org.springframework.geode spring-geode-samples-parent - 1.3.9.BUILD-SNAPSHOT + 1.3.10.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.9.BUILD-SNAPSHOT + 1.3.10.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.9.BUILD-SNAPSHOT + 1.3.10.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.9.BUILD-SNAPSHOT + 1.3.10.BUILD-SNAPSHOT From da7c3fea6fb3003fb27a7f01fdaa4df59be28657 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 12 Apr 2021 15:34:40 -0700 Subject: [PATCH 169/216] Login to Docker (Hub) prior to running the SBDG test suite. Specifically, login to Docker Hub prior to running the spring-geode tests, which use Testcontainers to fork a Cassandra server in a Docker container for Inline Caching Integration Tests. --- Jenkinsfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a5fd1174e..23763140e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,8 +15,11 @@ try { node('linux') { checkout scm try { - withEnv(["JAVA_HOME=${tool 'jdk8'}"]) { - sh './gradlew clean check --no-daemon --refresh-dependencies --stacktrace' + withCredentials([usernamePassword(credentialsId: 'hub.docker.com-springbuildmaster', usernameVariable: 'DOCKER_HUB_USR', passwordVariable: 'DOCKER_HUB_PSW')]) { + withEnv(["JAVA_HOME=${tool 'jdk8'}"]) { + sh 'docker login --username $DOCKER_HUB_USR --password $DOCKER_HUB_PSW' + sh './gradlew clean check --no-daemon --refresh-dependencies --stacktrace' + } } } catch (e) { From b5ea5358a2644e0f82a3d5647edc95cc0032ccba Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 12 Apr 2021 16:10:09 -0700 Subject: [PATCH 170/216] Use new Jenkins (Jenkinsfile) Declarative Pipeline syntax. --- Jenkinsfile | 177 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 101 insertions(+), 76 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 23763140e..f20ba8ac7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,105 +1,130 @@ -properties([ - buildDiscarder(logRotator(numToKeepStr: '10')), - pipelineTriggers([ +pipeline { + + agent { + label "nogeode" + } + + options { + buildDiscarder(logRotator(numToKeepStr: '15')) + disableConcurrentBuilds() + } + + triggers { cron('@daily') - ]), -]) - -def SUCCESS = hudson.model.Result.SUCCESS.toString() -currentBuild.result = SUCCESS - -try { - parallel check: { - stage('Check') { - timeout(time: 10, unit: 'MINUTES') { - node('linux') { - checkout scm - try { - withCredentials([usernamePassword(credentialsId: 'hub.docker.com-springbuildmaster', usernameVariable: 'DOCKER_HUB_USR', passwordVariable: 'DOCKER_HUB_PSW')]) { - withEnv(["JAVA_HOME=${tool 'jdk8'}"]) { - sh 'docker login --username $DOCKER_HUB_USR --password $DOCKER_HUB_PSW' - sh './gradlew clean check --no-daemon --refresh-dependencies --stacktrace' + } + + stages { + + stage('Build') { + environment { + DOCKER_HUB = credentials('hub.docker.com-springbuildmaster') + } + options { + timeout(time: 15, unit: "MINUTES") + } + steps { + script { + docker.withRegistry('', 'hub.docker.com-springbuildmaster') { + docker.image('adoptopenjdk/openjdk8:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp') { + + sh "echo 'Setup build environment...'" + sh "ci/setup.sh" + + // Cleanup any prior build system resources + try { + sh "echo 'Clean up GemFire/Geode files & build artifacts...'" + sh "ci/cleanupGemFiles.sh" + sh "ci/cleanupArtifacts.sh" + } + catch (ignore) { } + + // Run the SBDG project Gradle build using JDK 8 inside Docker + try { + sh "echo 'Building SBDG...'" + sh "ci/check.sh" + } + catch (e) { + currentBuild.result = "FAILED: build" + throw e + } + finally { + junit '**/build/test-results/*/*.xml' } } } - catch (e) { - currentBuild.result = 'FAILED: check' - throw e - } - finally { - junit '**/build/test-results/*/*.xml' - } } } } - } - if (currentBuild.result == 'SUCCESS') { - parallel artifacts: { - stage('Deploy Artifacts') { - node('linux') { - checkout scm - try { - withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) { - withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) { - withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) { - withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) { - withEnv(["JAVA_HOME=${tool 'jdk8'}"]) { - sh './gradlew deployArtifacts finalizeDeployArtifacts --no-daemon --refresh-dependencies --stacktrace -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD' - } - } + stage ('Deploy Docs') { + steps { + script { + docker.withRegistry('', 'hub.docker.com-springbuildmaster') { + docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}Two -u root -v /tmp:/tmp") { + withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { + try { + sh "ci/deployDocs.sh" + } + catch (e) { + currentBuild.result = "FAILED: deploy docs" + throw e } } } } - catch (e) { - currentBuild.result = 'FAILED: artifacts' - throw e - } } } - }, - docs: { - stage('Deploy Docs') { - node('linux') { - checkout scm - try { - withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { - withEnv(["JAVA_HOME=${tool 'jdk8'}"]) { - sh './gradlew deployDocs --no-daemon --refresh-dependencies --stacktrace -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME' + } + + stage ('Deploy Artifacts') { + steps { + script { + docker.withRegistry('', 'hub.docker.com-springbuildmaster') { + docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}One -u root -v /tmp:/tmp") { + withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) { + withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) { + withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) { + withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) { + try { + sh "ci/deployArtifacts.sh" + } + catch (e) { + currentBuild.result = "FAILED: deploy artifacts" + throw e + } + } + } + } } } } - catch (e) { - currentBuild.result = 'FAILED: docs' - throw e - } } } } } -} -finally { - def buildStatus = currentBuild.result - def buildNotSuccess = !SUCCESS.equals(buildStatus) - def lastBuildNotSuccess = !SUCCESS.equals(currentBuild.previousBuild?.result) + post { + changed { + script { - if (buildNotSuccess || lastBuildNotSuccess) { - stage('Notify') { - node { + def BUILD_SUCCESS = hudson.model.Result.SUCCESS.toString() + def buildStatus = currentBuild.result + def buildNotSuccess = !BUILD_SUCCESS.equals(buildStatus) + def previousBuildStatus = currentBuild.previousBuild?.result + def previousBuildNotSuccess = !BUILD_SUCCESS.equals(previousBuildStatus) - final def RECIPIENTS = [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']] + if (buildNotSuccess || previousBuildNotSuccess) { - def subject = "${buildStatus}: Build ${env.JOB_NAME} ${env.BUILD_NUMBER} status is now ${buildStatus}" - def details = "The build status changed to ${buildStatus}. For details see ${env.BUILD_URL}" + def RECIPIENTS = [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']] + def subject = "${buildStatus}: Build ${env.JOB_NAME} ${env.BUILD_NUMBER} status is now ${buildStatus}" + def details = "The build status changed to ${buildStatus}. For details see ${env.BUILD_URL}" - emailext( - subject: subject, - body: details, - recipientProviders: RECIPIENTS, - to: "$GEODE_TEAM_EMAILS" - ) + emailext(subject: subject, body: details, recipientProviders: RECIPIENTS, to: "$GEODE_TEAM_EMAILS") + + slackSend(color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger', + channel: '#spring-data-dev', + message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}") + } } } } From 7f0f7b83dfa88d20282eeb45196809c2da810f01 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 12 Apr 2021 16:12:27 -0700 Subject: [PATCH 171/216] Use Bash shell scripts to separate and encapsulate the build steps in the Jenkins CI build stages. --- ci/check.sh | 6 ++++++ ci/cleanupArtifacts.sh | 5 +++++ ci/cleanupGemFiles.sh | 9 +++++++++ ci/deployArtifacts.sh | 20 ++++++++++++++++++++ ci/deployDocs.sh | 15 +++++++++++++++ ci/setup.sh | 14 ++++++++++++++ 6 files changed, 69 insertions(+) create mode 100755 ci/check.sh create mode 100755 ci/cleanupArtifacts.sh create mode 100755 ci/cleanupGemFiles.sh create mode 100755 ci/deployArtifacts.sh create mode 100755 ci/deployDocs.sh create mode 100755 ci/setup.sh diff --git a/ci/check.sh b/ci/check.sh new file mode 100755 index 000000000..3911036e7 --- /dev/null +++ b/ci/check.sh @@ -0,0 +1,6 @@ +#!/bin/bash -x + +set -eou pipefail + +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/boot/build-gradle-cache" \ + ./gradlew clean check --no-daemon --refresh-dependencies --stacktrace diff --git a/ci/cleanupArtifacts.sh b/ci/cleanupArtifacts.sh new file mode 100755 index 000000000..9f343d2f4 --- /dev/null +++ b/ci/cleanupArtifacts.sh @@ -0,0 +1,5 @@ +#!/bin/bash -x + +rm -Rf ./.gradle +rm -Rf ./.m2 +exit 0 diff --git a/ci/cleanupGemFiles.sh b/ci/cleanupGemFiles.sh new file mode 100755 index 000000000..5918c8387 --- /dev/null +++ b/ci/cleanupGemFiles.sh @@ -0,0 +1,9 @@ +#!/bin/bash -x + +rm -Rf `find . -name "BACKUPDEFAULT*"` +rm -Rf `find . -name "ConfigDiskDir*"` +rm -Rf `find . -name "locator*" | grep -v "src" | grep -v "locator-application"` +rm -Rf `find . -name "newDB"` +rm -Rf `find . -name "server" | grep -v "src"` +rm -Rf `find . -name "*.log"` +exit 0 diff --git a/ci/deployArtifacts.sh b/ci/deployArtifacts.sh new file mode 100755 index 000000000..6f5d6d7d7 --- /dev/null +++ b/ci/deployArtifacts.sh @@ -0,0 +1,20 @@ +#!/bin/bash -x + +set -eou pipefail + +echo "Deploying artifacts on host [$HOSTNAME]" + +# User ID 1001 is "jenkins" +# Group ID 1001 is "jenkins" +# Syntax: `chown -R userId:groupId .` +chown -R 1001:1001 . + +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/boot/artifacts-gradle-cache" \ + ./gradlew deployArtifacts finalizeDeployArtifacts --no-build-cache --no-configuration-cache --no-daemon --stacktrace \ + -PartifactoryUsername=$ARTIFACTORY_USERNAME \ + -PartifactoryPassword=$ARTIFACTORY_PASSWORD \ + -PossrhUsername=$OSSRH_USERNAME \ + -PossrhPassword=$OSSRH_PASSWORD \ + -Psigning.keyId=$SPRING_SIGNING_KEYID \ + -Psigning.password=$SIGNING_PASSWORD \ + -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE diff --git a/ci/deployDocs.sh b/ci/deployDocs.sh new file mode 100755 index 000000000..f250d8209 --- /dev/null +++ b/ci/deployDocs.sh @@ -0,0 +1,15 @@ +#!/bin/bash -x + +set -eou pipefail + +echo "Deploying docs on host [$HOSTNAME]" + +# User ID 1001 is "jenkins" +# Group ID 1001 is "jenkins" +# Syntax: `chown -R userId:groupId .` +chown -R 1001:1001 . + +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/boot/docs-gradle-cache" \ + ./gradlew deployDocs --no-daemon --stacktrace \ + -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY \ + -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME diff --git a/ci/setup.sh b/ci/setup.sh new file mode 100755 index 000000000..0235c9b10 --- /dev/null +++ b/ci/setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash -x + +# User ID 1001 is "jenkins" +# Group ID 1001 is "jenkins" +# Syntax: `chown -R userId:groupId .` + +echo "Logged in as user [$USER] with home directory [$HOME] in the current working directory [$PWD]" +chown -R 1001:1001 . +mkdir -p /tmp/geode/boot/artifacts-gradle-cache +mkdir -p /tmp/geode/boot/build-gradle-cache +mkdir -p /tmp/geode/boot/docs-gradle-cache +echo "Logging into Docker..." +docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW} +exit 0 From ea4d3388b6b626017663bc6e0556a6078b1854b3 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 15 Apr 2021 15:43:21 -0700 Subject: [PATCH 172/216] Log JRE ($JAVA_HOME) directory. --- ci/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/setup.sh b/ci/setup.sh index 0235c9b10..ea078cbc9 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -5,6 +5,7 @@ # Syntax: `chown -R userId:groupId .` echo "Logged in as user [$USER] with home directory [$HOME] in the current working directory [$PWD]" +echo "Running with JRE [$JAVA_HOME]" chown -R 1001:1001 . mkdir -p /tmp/geode/boot/artifacts-gradle-cache mkdir -p /tmp/geode/boot/build-gradle-cache From 7f2b64eb1c9722a08d9ee46bca10580bfeb1135b Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 12 Apr 2021 14:52:38 -0700 Subject: [PATCH 173/216] [REVERT] Set log-level to 'INFO' for both 'org.apache.geode' & 'org.springframework.geode' Loggers for debugging purposes. Attempting to uncover the root cause of the stale GemFire/Geode SSL configuration & state issues. --- spring-geode-docs/src/main/resources/logback.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-geode-docs/src/main/resources/logback.xml b/spring-geode-docs/src/main/resources/logback.xml index de99c52b4..541f33852 100644 --- a/spring-geode-docs/src/main/resources/logback.xml +++ b/spring-geode-docs/src/main/resources/logback.xml @@ -13,8 +13,12 @@ + + + + From 40939be53656cbd28b7aaf7a9fca7af54203ef9c Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 13 Apr 2021 16:26:40 -0700 Subject: [PATCH 174/216] [REVERT] Un-Dockerize the Jenkins CI build Stages. --- Jenkinsfile | 93 ++++++++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f20ba8ac7..d0526b874 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,10 @@ pipeline { label "nogeode" } + environment { + JAVA_HOME = "${tool 'jdk8'}" + } + options { buildDiscarder(logRotator(numToKeepStr: '15')) disableConcurrentBuilds() @@ -24,33 +28,28 @@ pipeline { } steps { script { - docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp') { - - sh "echo 'Setup build environment...'" - sh "ci/setup.sh" - - // Cleanup any prior build system resources - try { - sh "echo 'Clean up GemFire/Geode files & build artifacts...'" - sh "ci/cleanupGemFiles.sh" - sh "ci/cleanupArtifacts.sh" - } - catch (ignore) { } + sh "echo 'Setup build environment...'" + sh "ci/setup.sh" + + // Cleanup any prior build system resources + try { + sh "echo 'Clean up GemFire/Geode files & build artifacts...'" + sh "ci/cleanupGemFiles.sh" + sh "ci/cleanupArtifacts.sh" + } + catch (ignore) { } - // Run the SBDG project Gradle build using JDK 8 inside Docker - try { - sh "echo 'Building SBDG...'" - sh "ci/check.sh" - } - catch (e) { - currentBuild.result = "FAILED: build" - throw e - } - finally { - junit '**/build/test-results/*/*.xml' - } - } + // Run the SBDG project Gradle build using JDK 8 inside Docker + try { + sh "echo 'Building SBDG...'" + sh "ci/check.sh" + } + catch (e) { + currentBuild.result = "FAILED: build" + throw e + } + finally { + junit '**/build/test-results/*/*.xml' } } } @@ -59,17 +58,13 @@ pipeline { stage ('Deploy Docs') { steps { script { - docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}Two -u root -v /tmp:/tmp") { - withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { - try { - sh "ci/deployDocs.sh" - } - catch (e) { - currentBuild.result = "FAILED: deploy docs" - throw e - } - } + withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { + try { + sh "ci/deployDocs.sh" + } + catch (e) { + currentBuild.result = "FAILED: deploy docs" + throw e } } } @@ -79,20 +74,16 @@ pipeline { stage ('Deploy Artifacts') { steps { script { - docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside("--name ${env.HOSTNAME}One -u root -v /tmp:/tmp") { - withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) { - withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) { - withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) { - withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) { - try { - sh "ci/deployArtifacts.sh" - } - catch (e) { - currentBuild.result = "FAILED: deploy artifacts" - throw e - } - } + withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) { + withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) { + withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) { + withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) { + try { + sh "ci/deployArtifacts.sh" + } + catch (e) { + currentBuild.result = "FAILED: deploy artifacts" + throw e } } } From af3c91685764f2cb47d35a4e2df40763ed2bdedb Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 26 Apr 2021 12:57:46 -0700 Subject: [PATCH 175/216] Set the Docs host for deployment. --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index 55ac693af..a186ba998 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,5 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 +deployDocsHost=docs-ip.spring.io antlrVersion=2.7.7 apacheGeodeVersion=1.12.0 byteBuddyVersion=1.10.20 From 471785a31e31a9c868adcd5a071bff06f6fca34d Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 07:45:06 -0700 Subject: [PATCH 176/216] Upgrade to Apache Geode 1.12.2. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a186ba998..1d97b6a9e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 deployDocsHost=docs-ip.spring.io antlrVersion=2.7.7 -apacheGeodeVersion=1.12.0 +apacheGeodeVersion=1.12.2 byteBuddyVersion=1.10.20 findbugsVersion=3.0.2 mockitoVersion=3.8.0 From 13ad3e395623d029b87d3afb00b1e2c1de323431 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 07:46:53 -0700 Subject: [PATCH 177/216] Upgrade to Byte Buddy 1.10.22. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1d97b6a9e..098281e6c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 deployDocsHost=docs-ip.spring.io antlrVersion=2.7.7 apacheGeodeVersion=1.12.2 -byteBuddyVersion=1.10.20 +byteBuddyVersion=1.10.22 findbugsVersion=3.0.2 mockitoVersion=3.8.0 multithreadedtcVersion=1.01 From 3fc38730b0f9c6915bf895f1a070f0046378dc1d Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 07:47:21 -0700 Subject: [PATCH 178/216] Upgrade to Mockito 3.9.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 098281e6c..6c27c3ab2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.2 byteBuddyVersion=1.10.22 findbugsVersion=3.0.2 -mockitoVersion=3.8.0 +mockitoVersion=3.9.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.6 From b43b7f7581208316d62234e82438aa5bff473d88 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 07:48:51 -0700 Subject: [PATCH 179/216] Upgrade to VMware Tanzu (Pivotal) GemFire 9.10.7. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6c27c3ab2..b30b41596 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ findbugsVersion=3.0.2 mockitoVersion=3.9.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 -pivotalGemFireVersion=9.10.6 +pivotalGemFireVersion=9.10.7 springVersion=5.2.13.RELEASE springBootVersion=2.3.10.BUILD-SNAPSHOT springDataGemFireVersion=2.3.7.RELEASE From 45e4d0c26919f91eb62ed0414d81f38f6d5f0bba Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 07:55:33 -0700 Subject: [PATCH 180/216] Upgrade to Spring Framework 5.2.14.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b30b41596..5af9b974c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ mockitoVersion=3.9.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.7 -springVersion=5.2.13.RELEASE +springVersion=5.2.14.RELEASE springBootVersion=2.3.10.BUILD-SNAPSHOT springDataGemFireVersion=2.3.7.RELEASE springDataGeodeVersion=2.3.7.RELEASE From 1ff711d92f7f47b940bfc3e9337e966a30abfbb3 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 07:59:56 -0700 Subject: [PATCH 181/216] Upgrade to Spring Boot 2.3.10.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5af9b974c..da7031a4e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.7 springVersion=5.2.14.RELEASE -springBootVersion=2.3.10.BUILD-SNAPSHOT +springBootVersion=2.3.10.RELEASE springDataGemFireVersion=2.3.7.RELEASE springDataGeodeVersion=2.3.7.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From f5e2a37dabfb91a6756bab8e39264bede3d97529 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:01:29 -0700 Subject: [PATCH 182/216] Upgrade to Spring Data Neumann-SR9. Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.9.RELEASE. Upgrade to Spring Data Release Train (BOM) Neumann-SR9. --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index da7031a4e..dbc1d4c56 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,10 +10,10 @@ pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.7 springVersion=5.2.14.RELEASE springBootVersion=2.3.10.RELEASE -springDataGemFireVersion=2.3.7.RELEASE -springDataGeodeVersion=2.3.7.RELEASE +springDataGemFireVersion=2.3.9.RELEASE +springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE -springDataReleaseTrainVersion=Neumann-SR7 +springDataReleaseTrainVersion=Neumann-SR9 springSessionBomVersion=Dragonfruit-SR2 springSessionDataGeodeVersion=2.3.4.RELEASE springShellVersion=1.2.0.RELEASE From 8cafda9654d9ea1546eece8fe376e86ade011fba Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:03:17 -0700 Subject: [PATCH 183/216] Upgrade to Spring Session BOM Dragonfruit-SR3. Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.5.RELEASE. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index dbc1d4c56..aaf5966dd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,8 +14,8 @@ springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE springDataReleaseTrainVersion=Neumann-SR9 -springSessionBomVersion=Dragonfruit-SR2 -springSessionDataGeodeVersion=2.3.4.RELEASE +springSessionBomVersion=Dragonfruit-SR3 +springSessionDataGeodeVersion=2.3.5.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.2 version=1.3.10.BUILD-SNAPSHOT From c89a3e11057aa0a53261aac2a2cd22857bd4ca1b Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:04:45 -0700 Subject: [PATCH 184/216] Upgrade to Testcontainers 1.15.3. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index aaf5966dd..cfe54f914 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,5 +17,5 @@ springDataReleaseTrainVersion=Neumann-SR9 springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.5.RELEASE springShellVersion=1.2.0.RELEASE -testcontainersVersion=1.15.2 +testcontainersVersion=1.15.3 version=1.3.10.BUILD-SNAPSHOT From 0290ca919eebb7bc4517542e02a08f450eb04547 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:15:03 -0700 Subject: [PATCH 185/216] Change Jenkinsfile to build on any available agent. --- Jenkinsfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d0526b874..0735770b3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,6 @@ pipeline { - agent { - label "nogeode" - } + agent any environment { JAVA_HOME = "${tool 'jdk8'}" From 779598d57c6ae584927e5f0ace2f5b007baebe9a Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:27:56 -0700 Subject: [PATCH 186/216] Edit changelog and add 1.3.10.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 91 +++++++++++-------- 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index 5a81abfb6..e1a037ee9 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,25 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.10.RELEASE (2021-04-28) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.3.10.RELEASE along with the latest versions of Spring Framework, Spring Data, +Spring Session and Spring Test for Apache Geode. + +* Upgrades to Apache Geode 1.12.2. +* Upgrades to Byte Buddy 1.10.22. +* Upgrades to Gradle 6.8.3. +* Upgrades to Mockito 3.9.0. +* Upgrades to VMware Tanzu (Pivotal) GemFire 9.10.7. +* Upgrades to Spring Framework 5.2.14.RELEASE. +* Upgrades to Spring Boot 2.3.10.RELEASE. +* Upgrades to Spring Data Neumann-SR10. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.9.RELEASE. +* Upgrades to Spring Session BOM Dragonfruit-SR3. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.5.RELEASE. +* Upgrades to Testcontainers 1.15.3. + + Changes in version 1.3.9.RELEASE (2021-02-22) --------------------------------------------- Aligns SBDG with Spring Boot 2.3.9.RELEASE along with the latest versions of Spring Framework, Spring Data, @@ -11,17 +30,17 @@ Spring Session and Spring Test for Apache Geode. * States project goals in the reference documentation under the 'Introduction'. * Adds new chapter on 'Testing' in the reference documentation. -* Upgrade to Byte Buddy 1.10.20. -* Upgrade to Gradle 6.8.2. -* Upgrade to Mockito 3.8.0. -* Upgrade to VMware Tanzu (Pivotal) GemFire 9.10.6. -* Upgrade to Spring Framework 5.2.13.RELEASE. -* Upgrade to Spring Boot 2.3.9.RELEASE. -* Upgrade to Spring Data Neumann-SR7. -* Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.7.RELEASE. -* Upgrade to Spring Session BOM Dragonfruit-SR2. -* Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.4.RELEASE. -* Upgrade to Testcontainers 1.15.2. +* Upgrades to Byte Buddy 1.10.20. +* Upgrades to Gradle 6.8.2. +* Upgrades to Mockito 3.8.0. +* Upgrades to VMware Tanzu (Pivotal) GemFire 9.10.6. +* Upgrades to Spring Framework 5.2.13.RELEASE. +* Upgrades to Spring Boot 2.3.9.RELEASE. +* Upgrades to Spring Data Neumann-SR7. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.7.RELEASE. +* Upgrades to Spring Session BOM Dragonfruit-SR2. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.4.RELEASE. +* Upgrades to Testcontainers 1.15.2. Changes in version 1.3.8.RELEASE (2021-01-19) @@ -29,12 +48,12 @@ Changes in version 1.3.8.RELEASE (2021-01-19) Aligns SBDG with Spring Boot 2.3.8.RELEASE along with the latest versions of Spring Framework, Spring Data and Spring Session. -* Upgrade to Spring Boot 2.3.8.RELEASE. -* Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.3.RELEASE. -* Upgrade to Byte Buddy 1.10.19. -* Upgrade to Gradle 6.8. -* Upgrade to Mockito 3.7.7. -* Upgrade to Testcontainers 1.15.1. +* Upgrades to Spring Boot 2.3.8.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.3.RELEASE. +* Upgrades to Byte Buddy 1.10.19. +* Upgrades to Gradle 6.8. +* Upgrades to Mockito 3.7.7. +* Upgrades to Testcontainers 1.15.1. Changes in version 1.2.13.RELEASE (2021-01-19) @@ -42,12 +61,12 @@ Changes in version 1.2.13.RELEASE (2021-01-19) Aligns SBDG with Spring Boot 2.2.13.RELEASE along with the latest versions of Spring Framework, Spring Data and Spring Session. -* Upgrade to Spring Boot 2.2.13.RELEASE. -* Upgrade to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.7.RELEASE. -* Upgrade to Byte Buddy 1.10.19. -* Upgrade to Gradle 6.8. -* Upgrade to Mockito 3.7.7. -* Upgrade to Testcontainers 1.15.1. +* Upgrades to Spring Boot 2.2.13.RELEASE. +* Upgrades to Spring Session for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.7.RELEASE. +* Upgrades to Byte Buddy 1.10.19. +* Upgrades to Gradle 6.8. +* Upgrades to Mockito 3.7.7. +* Upgrades to Testcontainers 1.15.1. Changes in version 1.3.7.RELEASE (2020-12-11) @@ -59,12 +78,12 @@ and Spring Session. of the SBDG Reference Documentation. * Edits TIP in the Inline Caching Sample Guide to include a reference to the specific documentation on Synchronous, Inline Caching in the SBDG Reference Documentation. -* Upgrade to Spring Framework 5.2.12.RELEASE. -* Upgrade to Spring Boot 2.3.7.RELEASE. -* Upgrade to Spring Data Release Train (BOM) Neumann-SR6. -* Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.6.RELEASE. -* Upgrade to Freefair Lombok Gradle Plugin 5.3.0. -* Upgrade to Mockito 3.6.28. +* Upgrades to Spring Framework 5.2.12.RELEASE. +* Upgrades to Spring Boot 2.3.7.RELEASE. +* Upgrades to Spring Data Release Train (BOM) Neumann-SR6. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.3.6.RELEASE. +* Upgrades to Freefair Lombok Gradle Plugin 5.3.0. +* Upgrades to Mockito 3.6.28. Changes in version 1.2.12.RELEASE (2020-12-10) @@ -78,13 +97,13 @@ of the SBDG Reference Documentation. Synchronous, Inline Caching in the SBDG Reference Documentation. * Add section on 'Gradle Dependency Management' under the 'Using Spring Boot for Apache Geode' section of the SBDG Reference Documentation. -* Upgrade to Spring Framework 5.2.12.RELEASE. -* Upgrade to Spring Boot 2.2.12.RELEASE. -* Upgrade to Spring Data Release Train (BOM) Moore-SR12. -* Upgrade to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.12.RELEASE. -* Upgrade to Freefair Lombok Gradle Plugin 5.3.0. -* Upgrade to Gradle 6.7.1. -* Upgrade to Mockito 3.6.28. +* Upgrades to Spring Framework 5.2.12.RELEASE. +* Upgrades to Spring Boot 2.2.12.RELEASE. +* Upgrades to Spring Data Release Train (BOM) Moore-SR12. +* Upgrades to Spring Data for Apache Geode & VMware Tanzu (Pivotal) GemFire 2.2.12.RELEASE. +* Upgrades to Freefair Lombok Gradle Plugin 5.3.0. +* Upgrades to Gradle 6.7.1. +* Upgrades to Mockito 3.6.28. Changes in version 1.3.6.RELEASE (2020-11-19) From c95bf31027f332f434f3dce5063f0a626cf9a1be Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:29:14 -0700 Subject: [PATCH 187/216] Release 1.3.10.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index cfe54f914..9b92e66b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.5.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 -version=1.3.10.BUILD-SNAPSHOT +version=1.3.10.RELEASE From 4033f8ed74c37af95b88ec56999d4a33f9c4e27e Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 08:47:15 -0700 Subject: [PATCH 188/216] Prepare next development iteration. Set Spring Boot version to 2.3.11.BUILD-SNAPSHOT. Set version to 1.3.11.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9b92e66b1..49f36e6ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.7 springVersion=5.2.14.RELEASE -springBootVersion=2.3.10.RELEASE +springBootVersion=2.3.11.BUILD-SNAPSHOT springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -18,4 +18,4 @@ springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.5.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 -version=1.3.10.RELEASE +version=1.3.11.BUILD-SNAPSHOT From 1c207f0e89d2f64b13f9d6845b7365d026d48ec0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 28 Apr 2021 09:03:03 -0700 Subject: [PATCH 189/216] Edit README to refer to 1.3.10.RELEASE. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index a88bb58c8..79d9d844b 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.9.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.10.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.10.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From d4316d32cb6cd53e3d0e632241900bac103ff964 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:10:43 -0700 Subject: [PATCH 190/216] Upgrade to Byte Buddy 1.11.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 49f36e6ae..8bd13fe21 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 deployDocsHost=docs-ip.spring.io antlrVersion=2.7.7 apacheGeodeVersion=1.12.2 -byteBuddyVersion=1.10.22 +byteBuddyVersion=1.11.0 findbugsVersion=3.0.2 mockitoVersion=3.9.0 multithreadedtcVersion=1.01 From c40be9f5a2082c54ec9f0c921baffc098b3fa0fc Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:11:02 -0700 Subject: [PATCH 191/216] Upgrade to Mockito 3.10.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8bd13fe21..283004c11 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.2 byteBuddyVersion=1.11.0 findbugsVersion=3.0.2 -mockitoVersion=3.9.0 +mockitoVersion=3.10.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.0 pivotalGemFireVersion=9.10.7 From aff79f4602f76d1821fd9c4ad6772aec244afb7c Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:14:13 -0700 Subject: [PATCH 192/216] Upgrade to VMware Tanzu GemFire for VMs (Pivotal Cloud Cache) product version 1.12.2. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 283004c11..dcc7bddfa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ byteBuddyVersion=1.11.0 findbugsVersion=3.0.2 mockitoVersion=3.10.0 multithreadedtcVersion=1.01 -pivotalCloudCacheVersion=1.12.0 +pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 springVersion=5.2.14.RELEASE springBootVersion=2.3.11.BUILD-SNAPSHOT From 51adc40bbff465f4b97d08c69b1fa306113c6ea0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:15:13 -0700 Subject: [PATCH 193/216] Upgrade to Spring Framework 5.2.15.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index dcc7bddfa..1a892fb6d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ mockitoVersion=3.10.0 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 -springVersion=5.2.14.RELEASE +springVersion=5.2.15.RELEASE springBootVersion=2.3.11.BUILD-SNAPSHOT springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE From 5165a725cd083e916b8003dd2e3f1fda44354408 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:15:49 -0700 Subject: [PATCH 194/216] Upgrade to Spring Boot 2.3.11.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1a892fb6d..0b9e47b34 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 springVersion=5.2.15.RELEASE -springBootVersion=2.3.11.BUILD-SNAPSHOT +springBootVersion=2.3.11.RELEASE springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From 931885a0482dd95cc2591e17c0c394f754562193 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:17:50 -0700 Subject: [PATCH 195/216] Format Gradle build script. --- build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 17f0615c7..cbe5c7aa8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,14 @@ buildscript { + repositories { + gradlePluginPortal() + maven { url 'https://repo.spring.io/plugins-snapshot' } + } dependencies { // Cannot upgrade to Spring Build Conventions Gradle Plugin after 0.0.35.RELEASE since the Gradle build // can no longer resolve VMware Tanzu (Pivotal) GemFire bits. classpath 'io.spring.gradle:spring-build-conventions:0.0.35.RELEASE' classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion" } - repositories { - gradlePluginPortal() - maven { url 'https://repo.spring.io/plugins-snapshot' } - } } apply plugin: 'io.spring.convention.root' From a2e2a9bf6a0662d42c56c95c9af415358c14e42f Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:30:50 -0700 Subject: [PATCH 196/216] Upgrade Spring Geode Samples Maven POM to Spring Boot 2.3.11.RELEASE. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index 2c25eff6d..d75ed57ae 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.10.BUILD-SNAPSHOT + 1.3.11.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index 3f962593d..b6628f6a5 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.10.BUILD-SNAPSHOT + 2.3.11.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.10.BUILD-SNAPSHOT + 1.3.11.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.10.BUILD-SNAPSHOT + 1.3.11.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.10.BUILD-SNAPSHOT + 1.3.11.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.10.BUILD-SNAPSHOT + 1.3.11.BUILD-SNAPSHOT From 01f73dedcada3bf521c1b6160911956d65a173c0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:32:35 -0700 Subject: [PATCH 197/216] Edit changelog and add 1.3.11.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index e1a037ee9..dbc1729e9 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,18 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.11.RELEASE (2021-05-20) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.3.11.RELEASE along with the latest versions of Spring Framework, Spring Data, +Spring Session and Spring Test for Apache Geode. + +* Upgrades to Byte Buddy 1.11.0. +* Upgrades to Mockito 3.10.0. +* Upgrades to VMware Tanzu GemFire for VMS (Pivotal Cloud Cache) 1.12.2. +* Upgrades to Spring Framework 5.2.15.RELEASE. +* Upgrades to Spring Boot 2.3.11.RELEASE. + + Changes in version 1.3.10.RELEASE (2021-04-28) ---------------------------------------------- Aligns SBDG with Spring Boot 2.3.10.RELEASE along with the latest versions of Spring Framework, Spring Data, From 94ca8311485a69a8c4ff182d2bb4a74cfa9d62ab Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 14:38:03 -0700 Subject: [PATCH 198/216] Release 1.3.11.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 0b9e47b34..a9bde03a9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.5.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 -version=1.3.11.BUILD-SNAPSHOT +version=1.3.11.RELEASE From 7ef029c6e8b8947254db977d4cda57fb053b9a78 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 15:12:04 -0700 Subject: [PATCH 199/216] Prepare next development iteration. Set Spring Boot version to 2.3.12.BUILD-SNAPSHOT. Set version to 1.3.12.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index a9bde03a9..d7ff52f3c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 springVersion=5.2.15.RELEASE -springBootVersion=2.3.11.RELEASE +springBootVersion=2.3.12.BUILD-SNAPSHOT springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -18,4 +18,4 @@ springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.5.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 -version=1.3.11.RELEASE +version=1.3.12.BUILD-SNAPSHOT From 0b1fa7deb3fa9696b5eb975a7d0447c3a816f39e Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 20 May 2021 15:37:17 -0700 Subject: [PATCH 200/216] Edit README to refer to 1.3.11.RELEASE & 1.3.12.BUILD-SNAPSHOT. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 79d9d844b..5e7da4dc8 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.10.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.11.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.11.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From 7c80e46011071b5076d7848da157a62c51d9cd9f Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 14 Jun 2021 17:28:06 -0700 Subject: [PATCH 201/216] Change wording in Apache Geode API Extensions chapter of the Reference Documentation on the purpose of the module and the Apache Geaode API extensions. --- .../asciidoc/_includes/geode-api-ext.adoc | 61 +++++-------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index 51b2a080d..a38b1158a 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -6,52 +6,21 @@ The Spring Boot for {geode-name} (SBDG) project includes the `org.springframework.geode:apache-geode-extensions` module -to make using {geode-name} {apache-geode-javadoc}[APIs] tolerable and useful. While this module is relatively new, it -contains several API extensions already. - -{geode-name}'s {apache-geode-javadoc}[API] is quite convoluted with many design problems: - -1. Non-intuitive, complex interfaces that contradict industry standard terms. -(e.g. https://javadoc.io/static/javax.cache/cache-api/1.1.1/javax/cache/Cache.html[`Cache`] -vs. {apache-geode-javadoc}/org/apache/geode/cache/Region.html[`Region`]). -2. APIs with an excessive footprint and no sensible https://en.wikipedia.org/wiki/Abstract_data_type[ADTs] resulting in -too many overloaded methods with loaded method signatures (e.g. {apache-geode-javadoc}/org/apache/geode/cache/Region.html[`Region`]). -3. Lingering deprecations causing excess baggage. -4. Use of public fields exposing internal state, violating encapsulation, making it difficult to uphold invariants. -5. Useful functionality hidden behind so called "internal" APIs that should be public. -6. Utility/Helper classes containing functionality that should be part of the types on which the Utility class operates -(e.g. {apache-geode-javadoc}/org/apache/geode/cache/partition/PartitionRegionHelper.html[`PartitionRegionHelper`]). -7. Incorrect use of _Checked_ `Exceptions` -(e.g. {apache-geode-javadoc}/org/apache/geode/cache/IncompatibleVersionException.html[`IncompatibleVersionException`]). -8. Inconsistent behavior across different methods of configuration: API vs. `cache.xml` vs. _Cluster Configuration_ -using _Gfsh_. -9. APIs closed for modification, yet offer no option for extension thereby violating the -https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle[_Open/Closed Principle_]. -10. In general, poor _Separation of Concerns_ (e.g. `Region`), violating many of the -https://en.wikipedia.org/wiki/SOLID[SOLID] principles. -11. Components (e.g. `Pool`) that are difficult to test properly: {geode-name} often incorrectly refers to implementation -classes rather than interfaces leading to `ClassCastExceptions` and violation of the _Program to Interfaces_ principle. -12. Excessive use of `static` initializer blocks making {geode-name} difficult to test. -13. Untimely shutdown and release of resources that run interference when writing _Integration Tests_. - -This list goes on making {geode-name}'s APIs difficult and confusing to use at times, especially without prior knowledge -or experience. Users very often get this wrong and it is the main reason why Spring's APIs for {geode-name} are so -invaluable; they can help you do the right thing! - -Let's consider a few examples. - -The one and only cache implementation (`GemFireCacheImpl`) implements both the `ClientCache` and `Cache` interfaces. -A `ClientCache` instance is created by client applications to access and persist data in a {geode-name} cluster. On the -contrary, a _peer_ `Cache` instance is created by server-side applications serving as peer members of the {geode-name} -cluster and distributed system to manage data. Both incarnations result in an instance of `GemFireCacheImpl`, yet a -cache cannot be both a client and a peer. But, you would never know this by introspecting the cache instance. - -The {apache-geode-javadoc}/org/apache/geode/Delta.html[`Delta`] interface, {apache-geode-javadoc}/org/apache/geode/Delta.html#hasDelta--[`hasDelta()`] -method, is another point of confusion. If there is no delta, why send the object in its entirety? Presumably there are -no changes. Of course, there is a reason but it is not immediately apparent why given the lack of documentation. - -Spring in general, and SBDG in particular, shield users from design problems as well as changes to {geode-name}'s APIs -that could adversely affect your applications when integrating with {geode-name}. Spring's APIs provide a layer of +to make the use of {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non-Spring application context more +effective. While this module is relatively new, it contains several, necessary API extensions already. + +The {geode-name} {apache-geode-javadoc}[API] is quite complex and difficult to use properly, especially without prior +knowledge or experience to do so. Users very often get things wrong and is the main reason why Spring's APIs +for {geode-name} are invaluable; they lead users to do the right thing, first and foremost, to begin with! + +However, this module and its extensions do not simply exist to only help users use {geode-name}'s APIs more effectively. +In fact, with Spring's abstractions, it should not be necessary to use {geode-name} APIs at all, e.g. like when using +the Spring Cache Abstraction for caching or the the Spring Data Repository abstraction for DAO developement. This module +exists and is necessary primarily because it enables Spring for {geode-name} in many capacities do what it needs to do +along with working around the complexities and limitations of {geode-name} APIs in a Spring and application context. + +In general, Spring shields users from design problems as well as changes in 3rd party library APIs, which could +adversely affect your Spring applications when integrating with these libraries. Spring's APIs provide a layer of indirection along with enhanced capabilities (e.g. Exception translation). TIP: Spring Data for {geode-name} (SDG) also {spring-data-geode-docs-html}/#apis[offers] some relief when using From afdc4b6e09d76ebde41aa871a971af5ddcb59fb7 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 11:24:31 -0700 Subject: [PATCH 202/216] Edit and revise wording in the Apache Geode API Extensions chapter of the Reference Documentation. --- .../docs/asciidoc/_includes/geode-api-ext.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index a38b1158a..2c705af6a 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -6,18 +6,18 @@ The Spring Boot for {geode-name} (SBDG) project includes the `org.springframework.geode:apache-geode-extensions` module -to make the use of {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non-Spring application context more +to make use of the {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non-Spring application context more effective. While this module is relatively new, it contains several, necessary API extensions already. -The {geode-name} {apache-geode-javadoc}[API] is quite complex and difficult to use properly, especially without prior +{geode-name} {apache-geode-javadoc}[APIs] are quite complex and difficult to use properly, especially without prior knowledge or experience to do so. Users very often get things wrong and is the main reason why Spring's APIs -for {geode-name} are invaluable; they lead users to do the right thing, first and foremost, to begin with! +for {geode-name} are invaluable; they lead users to do the right thing from the start, first and foremost. -However, this module and its extensions do not simply exist to only help users use {geode-name}'s APIs more effectively. -In fact, with Spring's abstractions, it should not be necessary to use {geode-name} APIs at all, e.g. like when using -the Spring Cache Abstraction for caching or the the Spring Data Repository abstraction for DAO developement. This module -exists and is necessary primarily because it enables Spring for {geode-name} in many capacities do what it needs to do -along with working around the complexities and limitations of {geode-name} APIs in a Spring and application context. +However, this module does not simply exist only to help users use {geode-name}'s APIs more effectively. In fact, with +Spring's abstractions, it should not be necessary to use {geode-name} APIs at all, e.g. like when using the Spring Cache +Abstraction for caching or the Spring Data Repository abstraction for DAO development. This module is necessary +to enable Spring for {geode-name} to overcome and adapt to the limitations the API in a Spring and application context +in order to do what Spring for {geode-name} needs to do that makes the experience familiar to Spring users. In general, Spring shields users from design problems as well as changes in 3rd party library APIs, which could adversely affect your Spring applications when integrating with these libraries. Spring's APIs provide a layer of From 53210f3a6c32c4f9025a3485eefaa19b176a701b Mon Sep 17 00:00:00 2001 From: Jay Bryant Date: Tue, 15 Jun 2021 18:21:27 -0500 Subject: [PATCH 203/216] Edit the intro to the Apache Geode API Extensions chapter in the reference documentation. Mostly fixed small things and a couple of sentences that were long enough to be hard to parse. Resolves gh-106. --- .../asciidoc/_includes/geode-api-ext.adoc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index 2c705af6a..d53b19639 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -7,21 +7,21 @@ The Spring Boot for {geode-name} (SBDG) project includes the `org.springframework.geode:apache-geode-extensions` module to make use of the {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non-Spring application context more -effective. While this module is relatively new, it contains several, necessary API extensions already. +effective. While this module is relatively new, it already contains several necessary API extensions. -{geode-name} {apache-geode-javadoc}[APIs] are quite complex and difficult to use properly, especially without prior -knowledge or experience to do so. Users very often get things wrong and is the main reason why Spring's APIs -for {geode-name} are invaluable; they lead users to do the right thing from the start, first and foremost. +{geode-name} {apache-geode-javadoc}[APIs] can be complex and difficult to use properly, especially without prior +knowledge or experience. Users often get things wrong, which is why Spring's APIs +for {geode-name} are invaluable. They lead users to do the right thing from the start, first and foremost. -However, this module does not simply exist only to help users use {geode-name}'s APIs more effectively. In fact, with -Spring's abstractions, it should not be necessary to use {geode-name} APIs at all, e.g. like when using the Spring Cache +However, this module does not exist only to help users use {geode-name}'s APIs more effectively. In fact, with +Spring's abstractions, it should not be necessary to use {geode-name} APIs at all -- for example, when using the Spring Cache Abstraction for caching or the Spring Data Repository abstraction for DAO development. This module is necessary -to enable Spring for {geode-name} to overcome and adapt to the limitations the API in a Spring and application context -in order to do what Spring for {geode-name} needs to do that makes the experience familiar to Spring users. +to enable Spring for {geode-name} to overcome and adapt to the limitations of the API in a Spring application context. +That lets Spring for {geode-name} offer an experience familiar to Spring users. -In general, Spring shields users from design problems as well as changes in 3rd party library APIs, which could +In general, Spring shields users from design problems as well as changes in third party library APIs that could adversely affect your Spring applications when integrating with these libraries. Spring's APIs provide a layer of -indirection along with enhanced capabilities (e.g. Exception translation). +indirection along with enhanced capabilities (such as exception translation). TIP: Spring Data for {geode-name} (SDG) also {spring-data-geode-docs-html}/#apis[offers] some relief when using {geode-name}'s APIs. From cd4df6f7eaa653fe4d574fa79ed58b3c72ad8c24 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 17:18:28 -0700 Subject: [PATCH 204/216] Polish to the edits in Chapter 19 - Apache Geode API Extentions. Resolves gh-106. --- .../src/docs/asciidoc/_includes/geode-api-ext.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index d53b19639..cf073fcb2 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -10,8 +10,8 @@ to make use of the {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non effective. While this module is relatively new, it already contains several necessary API extensions. {geode-name} {apache-geode-javadoc}[APIs] can be complex and difficult to use properly, especially without prior -knowledge or experience. Users often get things wrong, which is why Spring's APIs -for {geode-name} are invaluable. They lead users to do the right thing from the start, first and foremost. +knowledge or experience. Users often get things wrong, which is why Spring's APIs for {geode-name} are invaluable. +They lead users to do the right thing from the start, first and foremost. However, this module does not exist only to help users use {geode-name}'s APIs more effectively. In fact, with Spring's abstractions, it should not be necessary to use {geode-name} APIs at all -- for example, when using the Spring Cache From e8d8e25677a050fa6607e66b6b6c6221531efd37 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 17:38:44 -0700 Subject: [PATCH 205/216] Upgrade to Byte Buddy 1.11.2. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d7ff52f3c..9e94989d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 deployDocsHost=docs-ip.spring.io antlrVersion=2.7.7 apacheGeodeVersion=1.12.2 -byteBuddyVersion=1.11.0 +byteBuddyVersion=1.11.2 findbugsVersion=3.0.2 mockitoVersion=3.10.0 multithreadedtcVersion=1.01 From 4f83f279b453cb4b299582df934b9666e1e1ceaf Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 17:39:16 -0700 Subject: [PATCH 206/216] Upgrade to Mockito 3.11.1. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9e94989d7..45bc42af7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ antlrVersion=2.7.7 apacheGeodeVersion=1.12.2 byteBuddyVersion=1.11.2 findbugsVersion=3.0.2 -mockitoVersion=3.10.0 +mockitoVersion=3.11.1 multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 From 88cd5beeb2d5270d967d45b9c1be0cc8dbd1f448 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 17:40:48 -0700 Subject: [PATCH 207/216] Upgrade to Spring Boot 2.3.12.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 45bc42af7..beaf4781e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 springVersion=5.2.15.RELEASE -springBootVersion=2.3.12.BUILD-SNAPSHOT +springBootVersion=2.3.12.RELEASE springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE From 5294156814241b0e28576bd50d6fc3696c5906fa Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 17:43:26 -0700 Subject: [PATCH 208/216] Upgrade to Spring Session for Apache Geode 2.3.6.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index beaf4781e..ba730fa50 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE springDataReleaseTrainVersion=Neumann-SR9 springSessionBomVersion=Dragonfruit-SR3 -springSessionDataGeodeVersion=2.3.5.RELEASE +springSessionDataGeodeVersion=2.3.6.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 version=1.3.12.BUILD-SNAPSHOT From 4420cf9f2aba45221c25a138fb52fbc83cb0b3cd Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 18:01:16 -0700 Subject: [PATCH 209/216] Upgrade Spring Geode Samples (parent) Maven POM to Spring Boot 2.3.12.RELEASE and SBDG 1.3.12.BUILD-SNAPSHOT. --- spring-geode-samples/intro/getting-started/pom.xml | 2 +- spring-geode-samples/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-geode-samples/intro/getting-started/pom.xml b/spring-geode-samples/intro/getting-started/pom.xml index d75ed57ae..a2f987d24 100644 --- a/spring-geode-samples/intro/getting-started/pom.xml +++ b/spring-geode-samples/intro/getting-started/pom.xml @@ -8,7 +8,7 @@ org.springframework.geode spring-geode-samples-parent - 1.3.11.BUILD-SNAPSHOT + 1.3.12.BUILD-SNAPSHOT ../../pom.xml diff --git a/spring-geode-samples/pom.xml b/spring-geode-samples/pom.xml index b6628f6a5..6b303a1cd 100644 --- a/spring-geode-samples/pom.xml +++ b/spring-geode-samples/pom.xml @@ -8,13 +8,13 @@ org.springframework.boot spring-boot-starter-parent - 2.3.11.RELEASE + 2.3.12.RELEASE org.springframework.geode spring-geode-samples-parent - 1.3.11.BUILD-SNAPSHOT + 1.3.12.BUILD-SNAPSHOT pom Spring Geode Samples Parent @@ -42,19 +42,19 @@ org.springframework.geode spring-geode-starter - 1.3.11.BUILD-SNAPSHOT + 1.3.12.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-logging - 1.3.11.BUILD-SNAPSHOT + 1.3.12.BUILD-SNAPSHOT org.springframework.geode spring-geode-starter-test - 1.3.11.BUILD-SNAPSHOT + 1.3.12.BUILD-SNAPSHOT From d14722ff0ad1655e2d92c70d955e37cd62af5346 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 18:04:45 -0700 Subject: [PATCH 210/216] Upgrade to Gradle 6.9. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 442d9132e..549d84424 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 488a53b7b12e0f0ffe686d748de54e6e60a19dea Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 18:38:51 -0700 Subject: [PATCH 211/216] Edit changelog and add 1.3.12.RELEASE notes. --- spring-geode/src/main/resources/changelog.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-geode/src/main/resources/changelog.txt b/spring-geode/src/main/resources/changelog.txt index dbc1729e9..33eca019d 100644 --- a/spring-geode/src/main/resources/changelog.txt +++ b/spring-geode/src/main/resources/changelog.txt @@ -4,6 +4,19 @@ https://github.com/spring-projects/spring-boot-data-geode ============================================================== +Changes in version 1.3.12.RELEASE (2021-06-15) +---------------------------------------------- +Aligns SBDG with Spring Boot 2.3.12.RELEASE. + +* Edits and revises Chapter 19 - Apache Geode API Extensions. +Resolves https://github.com/spring-projects/spring-boot-data-geode/pull/106. +* Upgrades to Byte Buddy 1.11.2. +* Upgrades to Gradle 6.9. +* Upgrades to Mockito 3.11.1. +* Upgrades to Spring Boot 2.3.12.RELEASE. +* Upgrades to Spring Session for Apache Geode 2.3.6.RELEASE. + + Changes in version 1.3.11.RELEASE (2021-05-20) ---------------------------------------------- Aligns SBDG with Spring Boot 2.3.11.RELEASE along with the latest versions of Spring Framework, Spring Data, From 6692e9c57fd342dc6d434fdca3b694d623e5898d Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 22:03:48 -0700 Subject: [PATCH 212/216] Release 1.3.12.RELEASE. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ba730fa50..1fa98da01 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.6.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 -version=1.3.12.BUILD-SNAPSHOT +version=1.3.12.RELEASE From 26d12a4730f571d4726e90f2d78ef56eb9e1afd5 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 22:20:01 -0700 Subject: [PATCH 213/216] Prepare next development iteration. Set Spring Boot version to 2.3.13.BUILD-SNAPSHOT. Set version to 1.3.13.BUILD-SNAPSHOT. --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1fa98da01..fd9836a53 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ multithreadedtcVersion=1.01 pivotalCloudCacheVersion=1.12.2 pivotalGemFireVersion=9.10.7 springVersion=5.2.15.RELEASE -springBootVersion=2.3.12.RELEASE +springBootVersion=2.3.13.BUILD-SNAPSHOT springDataGemFireVersion=2.3.9.RELEASE springDataGeodeVersion=2.3.9.RELEASE springDataGeodeTestVersion=0.0.20.RELEASE @@ -18,4 +18,4 @@ springSessionBomVersion=Dragonfruit-SR3 springSessionDataGeodeVersion=2.3.6.RELEASE springShellVersion=1.2.0.RELEASE testcontainersVersion=1.15.3 -version=1.3.12.RELEASE +version=1.3.13.BUILD-SNAPSHOT From c69dfd6006ab016a4a001842f1073679fd99e641 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 15 Jun 2021 22:39:28 -0700 Subject: [PATCH 214/216] Edit README to refer to 1.3.12.RELEASE and 1.3.13.BUILD-SNAPSHOT. --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 5e7da4dc8..897a041a0 100644 --- a/README.adoc +++ b/README.adoc @@ -57,8 +57,8 @@ This, along with many other benefits, are provided by this project. | `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples] | `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples] | `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples] -| `1.3.11.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] -| `1.3.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] +| `1.3.12.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples] +| `1.3.13.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples] |=== From da4769dc3f758c71a23c11ea015a5edb85dcb8f4 Mon Sep 17 00:00:00 2001 From: John Blum Date: Sun, 20 Jun 2021 23:24:28 -0700 Subject: [PATCH 215/216] Reword the intro to Chapter 19 - Apache Geode API Extensions in the SBDG Reference Documentation once again. --- .../asciidoc/_includes/geode-api-ext.adoc | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc index cf073fcb2..b429f7e89 100644 --- a/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc +++ b/spring-geode-docs/src/docs/asciidoc/_includes/geode-api-ext.adoc @@ -5,25 +5,16 @@ :images-dir: ./images -The Spring Boot for {geode-name} (SBDG) project includes the `org.springframework.geode:apache-geode-extensions` module -to make use of the {geode-name} {apache-geode-javadoc}[APIs] in a Spring and non-Spring application context more -effective. While this module is relatively new, it already contains several necessary API extensions. +When using the Spring programming model and abstractions, it should not be necessary to use {geode-name} +{apache-geode-javadoc}[APIs] at all -- for example, when using the Spring Cache Abstraction for caching +or the Spring Data Repository abstraction for DAO development. There are many more examples. -{geode-name} {apache-geode-javadoc}[APIs] can be complex and difficult to use properly, especially without prior -knowledge or experience. Users often get things wrong, which is why Spring's APIs for {geode-name} are invaluable. -They lead users to do the right thing from the start, first and foremost. +For certain use cases, users may require low level access to fine-grained functionally. Spring Boot for {geode-name}'s +`org.springframework.geode:apache-geode-extensions` module and library builds on {geode-name}'s APIs +by including several extensions with enhanced functionality to offer an experience familiar to Spring users +inside a Spring context. -However, this module does not exist only to help users use {geode-name}'s APIs more effectively. In fact, with -Spring's abstractions, it should not be necessary to use {geode-name} APIs at all -- for example, when using the Spring Cache -Abstraction for caching or the Spring Data Repository abstraction for DAO development. This module is necessary -to enable Spring for {geode-name} to overcome and adapt to the limitations of the API in a Spring application context. -That lets Spring for {geode-name} offer an experience familiar to Spring users. - -In general, Spring shields users from design problems as well as changes in third party library APIs that could -adversely affect your Spring applications when integrating with these libraries. Spring's APIs provide a layer of -indirection along with enhanced capabilities (such as exception translation). - -TIP: Spring Data for {geode-name} (SDG) also {spring-data-geode-docs-html}/#apis[offers] some relief when using +TIP: Spring Data for {geode-name} (SDG) also {spring-data-geode-docs-html}/#apis[includes] additional extensions to {geode-name}'s APIs. [[geode-api-extensions-cacheresolver]] @@ -143,9 +134,9 @@ In the case where membership events are useful to the Spring Boot application, S * {spring-boot-data-geode-javadoc}/org/springframework/geode/distributed/event/MembershipListenerAdapter.html[`MembershipListenerAdapter`] * {spring-boot-data-geode-javadoc}/org/springframework/geode/distributed/event/MembershipEvent.html[`MembershipEvent`] -The abstract `MembershipListenerAdapter` class implements {geode-name}'s clumsy -`org.apache.geode.distributed.internal.MembershipListener` interface to simplify the event handler method signatures by -using an appropriate `MembershipEvent` type to encapsulate the actors in the event. +The abstract `MembershipListenerAdapter` class implements {geode-name}'s `org.apache.geode.distributed.internal.MembershipListener` interface +to simplify the event handler method signatures by using an appropriate `MembershipEvent` type +to encapsulate the actors in the event. The abstract `MembershipEvent` class is further subclassed to represent specific membership event types that occur within the {geode-name} system: From 5d5444f6a50e8f744b917d0b942bd6f9ad896ce4 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 11 Aug 2021 16:09:13 -0700 Subject: [PATCH 216/216] Optimize Cassandra-based Testcontainer configuration for SBDG Inline Caching Integration Tests. Trying to fix test failures caused by Testcontainers running in Docker on Jenkins. The Cassandra Docker image/container is forked inside Docker running in Jenkins CI and is currently throwing: Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (172.17.0.1 ports: [49401] should be listening) at org.testcontainers.containers.wait.strategy.HostPortWaitStrategy.waitUntilReady(HostPortWaitStrategy.java:49) at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:35) at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:892) at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:440) ... 85 more In the Testcontainers project, I found: https://github.com/testcontainers/testcontainers-java/issues/4360 And specifically: https://github.com/testcontainers/testcontainers-java/issues/4360#issuecomment-892481828 The Jenkins servers (worker nodes) were recently upgraded to: docker-ce (5:20.10.8~3-0~ubuntu-bionic) containerd.io (1.4.9-1) --- .../crm/config/TestCassandraConfiguration.java | 9 +++++---- .../TestcontainersCassandraConfiguration.java | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/spring-geode/src/test/java/example/app/crm/config/TestCassandraConfiguration.java b/spring-geode/src/test/java/example/app/crm/config/TestCassandraConfiguration.java index 8a01de397..2e490dd9e 100644 --- a/spring-geode/src/test/java/example/app/crm/config/TestCassandraConfiguration.java +++ b/spring-geode/src/test/java/example/app/crm/config/TestCassandraConfiguration.java @@ -52,18 +52,19 @@ public abstract class TestCassandraConfiguration extends AbstractCassandraConfig private static final String KEYSPACE_NAME = "CustomerService"; private static final String SESSION_NAME = "CustomerServiceCluster"; - @NonNull @Override + @NonNull + @Override protected String getKeyspaceName() { return KEYSPACE_NAME; } @Override - @SuppressWarnings("all") protected String getLocalDataCenter() { return LOCAL_DATA_CENTER; } - @Nullable @Override + @Nullable + @Override protected String getSessionName() { return SESSION_NAME; } @@ -87,7 +88,7 @@ protected List getStartupScripts() { return startupScripts; } - private List readLines(Resource resource) { + private @NonNull List readLines(@NonNull Resource resource) { BufferedReader resourceReader = null; diff --git a/spring-geode/src/test/java/example/app/crm/config/TestcontainersCassandraConfiguration.java b/spring-geode/src/test/java/example/app/crm/config/TestcontainersCassandraConfiguration.java index 2c01985f9..4d4d9824b 100644 --- a/spring-geode/src/test/java/example/app/crm/config/TestcontainersCassandraConfiguration.java +++ b/spring-geode/src/test/java/example/app/crm/config/TestcontainersCassandraConfiguration.java @@ -42,8 +42,7 @@ public class TestcontainersCassandraConfiguration extends TestCassandraConfigura @SuppressWarnings("rawtypes") GenericContainer cassandraContainer() { - GenericContainer cassandraContainer = newCassandraContainer() - .withExposedPorts(CASSANDRA_DEFAULT_PORT); + GenericContainer cassandraContainer = newCustomCassandraContainer(); cassandraContainer.start(); @@ -52,11 +51,21 @@ GenericContainer cassandraContainer() { @SuppressWarnings("rawtypes") private GenericContainer newCassandraContainer() { - return new GenericContainer(CASSANDRA_DOCKER_IMAGE_NAME); + return new GenericContainer(CASSANDRA_DOCKER_IMAGE_NAME) + .withExposedPorts(CASSANDRA_DEFAULT_PORT); + } + + @SuppressWarnings("rawtypes") + private GenericContainer newCustomCassandraContainer() { + + return newCassandraContainer() + .withEnv("HEAP_NEWSIZE", "128M") + .withEnv("MAX_HEAP_SIZE", "1024M") + .withEnv("JVM_OPTS", "-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.initial_token=0") + .withEnv("CASSANDRA_SNITCH", "GossipingPropertyFileSnitch"); } @Override - @SuppressWarnings("all") protected String getContactPoints() { return cassandraContainer().getContainerIpAddress(); }