Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

[DRAFT] Update hello world to spring for gemfire #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
23 changes: 12 additions & 11 deletions hello-world/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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}"
}
}
2 changes: 2 additions & 0 deletions hello-world/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gemfireRepoUsername=YOUR_PIVOTAL_COMMERCIAL_MAVEN_REPO_USERNAME
gemfireRepoPassword=YOUR_PIVOTAL_COMMERCIAL_MAVEN_REPO_PASSWORD
2 changes: 1 addition & 1 deletion hello-world/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion hello-world/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ applications:
- name: helloworld
path: ./build/libs/hello-world-0.0.1-SNAPSHOT.jar
services:
- <your-tanzu-gemfire-service>
- <your-vmware-gemfire-for-TAS-service-instance-name>
Original file line number Diff line number Diff line change
Expand Up @@ -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 {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion hello-world/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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