Skip to content
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.gradle
.vscode
/build/
/logs/
!gradle/wrapper/gradle-wrapper.jar

*key.json
### STS ###
.apt_generated
.classpath
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ published in the [QuintoAndar Tech Blog](https://medium.com/quintoandar-tech-blo

- [Part 1: Setup](https://medium.com/quintoandar-tech-blog/creating-google-cloud-pub-sub-publishers-and-subscribers-with-spring-cloud-gcp-part-1-setup-a96c53025fec)
- [Part 2: Implementation](https://medium.com/quintoandar-tech-blog/creating-google-cloud-pub-sub-publishers-and-subscribers-with-spring-cloud-gcp-part-2-362bd25eb03c)

## Steps
- Setup Gradle old version 7.3.2 as this uses spring 2.7.12
- Download gradle wrapper
```
gradle wrapper
```
- set up Enviornment Variables GOOGLE_APPLICATION_CREDENTIALS/GCP_KEY_FILE_BASE64 ( Vscode you can use terminal.integrated.env.windows)
- ./gradlew clean build
- ./gradlew bootRun
- Refer the articles above for more details
```
curl -X POST http://localhost:8080/hello/publish?[1-30] -H 'Content-Type: text/plain' -d 'Hello, Pub/Sub'
```
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
springBootVersion = '2.1.1.RELEASE'
springBootVersion = '2.7.12'
}
repositories {
mavenCentral()
Expand All @@ -22,7 +22,7 @@ sourceCompatibility = 11.0
targetCompatibility = 11.0

wrapper {
gradleVersion = '4.10.2'
gradleVersion = '7.3.2'
}

repositories {
Expand All @@ -37,6 +37,7 @@ dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')

testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('junit:junit:4.12')
}

dependencyManagement {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading