diff --git a/hello-world/README.md b/hello-world/README.md index d55d51c..ff9d18b 100644 --- a/hello-world/README.md +++ b/hello-world/README.md @@ -6,9 +6,3 @@ SPDX-License-Identifier: Apache-2.0 # Hello, World! Code Example The *Hello, World!* example app is a small and simple application that was created to test your various environment setups. When you run the app the first time, it simulates a query to a backend data source. Then, on subsequent queries for that data, it demonstrates how caching that data can improve your apps read performance. - -The *Hello, World!* app is used by the following guides: - -- [Set Up Your Local Envinroment](https://tanzu.vmware.com/developer/data/tanzu-gemfire/guides/get-started-locally-sbdg/) -- [Set Up Tanzu GemFire on TAS](https://tanzu.vmware.com/developer/data/tanzu-gemfire/guides/get-started-tgf4vms-sbdg/) -- [Set Up Tanzu GemFire on Kubernetes](https://tanzu.vmware.com/developer/data/tanzu-gemfire/guides/get-started-tgf4k8s-sbdg/) \ No newline at end of file diff --git a/hello-world/build.gradle b/hello-world/build.gradle index 8f469a2..64889b2 100644 --- a/hello-world/build.gradle +++ b/hello-world/build.gradle @@ -4,12 +4,12 @@ */ plugins { - id 'org.springframework.boot' version '2.4.1' - id 'io.spring.dependency-management' version '1.0.10.RELEASE' + id 'org.springframework.boot' version '2.7.4' + id 'io.spring.dependency-management' version '1.0.15.RELEASE' id 'java' } -group = 'com.vmware.tanzu.gemfire.helloworld' +group = 'com.vmware.gemfire.helloworld' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' @@ -19,26 +19,27 @@ bootBuildImage{ repositories { mavenCentral() + maven { + credentials { + username "$gemfireRepoUsername" + password "$gemfireRepoPassword" + } + url = uri("https://commercial-repo.pivotal.io/data3/gemfire-release-repo/gemfire") + } } -ext { - set('springGeodeVersion', "1.4.0") -} dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.geode:spring-geode-starter' + implementation "com.vmware.gemfire:spring-boot-2.7-gemfire-9.15:1.0.0" } dependencyManagement { dependencies { - dependencySet(group: 'org.apache.logging.log4j', version: '2.16.0') { + dependencySet(group: 'org.apache.logging.log4j', version: '2.19.0') { entry('log4j-api') entry('log4j-core') entry('log4j-to-slf4j') } } - imports { - mavenBom "org.springframework.geode:spring-geode-bom:${springGeodeVersion}" - } } diff --git a/hello-world/gradle.properties b/hello-world/gradle.properties new file mode 100644 index 0000000..712cbc8 --- /dev/null +++ b/hello-world/gradle.properties @@ -0,0 +1,2 @@ +gemfireRepoUsername=YOUR_PIVOTAL_COMMERCIAL_MAVEN_REPO_USERNAME +gemfireRepoPassword=YOUR_PIVOTAL_COMMERCIAL_MAVEN_REPO_PASSWORD \ No newline at end of file diff --git a/hello-world/gradle/wrapper/gradle-wrapper.properties b/hello-world/gradle/wrapper/gradle-wrapper.properties index 25f587d..71a1ffc 100644 --- a/hello-world/gradle/wrapper/gradle-wrapper.properties +++ b/hello-world/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip diff --git a/hello-world/manifest.yml b/hello-world/manifest.yml index 37b761e..ffd4812 100644 --- a/hello-world/manifest.yml +++ b/hello-world/manifest.yml @@ -6,4 +6,4 @@ applications: - name: helloworld path: ./build/libs/hello-world-0.0.1-SNAPSHOT.jar services: - - + - diff --git a/hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldApplication.java b/hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldApplication.java similarity index 70% rename from hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldApplication.java rename to hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldApplication.java index a9ed5cc..f18325a 100644 --- a/hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldApplication.java +++ b/hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldApplication.java @@ -3,16 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -package com.vmware.tanzu.gemfire.helloworld; +package com.vmware.gemfire.helloworld; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.data.gemfire.config.annotation.EnableCachingDefinedRegions; -import org.springframework.geode.config.annotation.EnableClusterAware; +import org.springframework.data.gemfire.config.annotation.EnableClusterDefinedRegions; @SpringBootApplication -@EnableCachingDefinedRegions -@EnableClusterAware +@EnableClusterDefinedRegions public class HelloWorldApplication { diff --git a/hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldController.java b/hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldController.java similarity index 95% rename from hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldController.java rename to hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldController.java index 90b8c4a..60b6903 100644 --- a/hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldController.java +++ b/hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldController.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package com.vmware.tanzu.gemfire.helloworld; +package com.vmware.gemfire.helloworld; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldService.java b/hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldService.java similarity index 95% rename from hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldService.java rename to hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldService.java index 146573d..6384b4c 100644 --- a/hello-world/src/main/java/com/vmware/tanzu/gemfire/helloworld/HelloWorldService.java +++ b/hello-world/src/main/java/com/vmware/gemfire/helloworld/HelloWorldService.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package com.vmware.tanzu.gemfire.helloworld; +package com.vmware.gemfire.helloworld; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; diff --git a/hello-world/src/main/resources/application.properties b/hello-world/src/main/resources/application.properties index 33ce260..79b9542 100644 --- a/hello-world/src/main/resources/application.properties +++ b/hello-world/src/main/resources/application.properties @@ -3,6 +3,6 @@ # SPDX-License-Identifier: Apache-2.0 # -#Properties used to connect to a Tanzu GemFire for Kubernetes instance. +#Properties used to connect to a VMware GemFire for Kubernetes instance. #spring.data.gemfire.pool.locators: hello-world-gemfire-cluster-locator-0.hello-world-gemfire-cluster-locator.tanzu-gemfire[10334] #spring.data.gemfire.management.http.host: hello-world-gemfire-cluster-locator-0.hello-world-gemfire-cluster-locator.tanzu-gemfire \ No newline at end of file