Questions tagged [spring-cloud-gcp]

Ask questions about the Spring Cloud GCP project.

Integrations between Google Cloud Platform APIs and Spring.

The Spring Cloud GCP project makes the Spring Framework a first-class citizen of Google Cloud Platform (GCP).

Spring Cloud GCP lets you leverage the power and simplicity of the Spring Framework to:

  • Publish and subscribe to Google Cloud Pub/Sub topics

  • Configure Spring JDBC with a few properties to use Google Cloud SQL

  • Map objects, relationships, and collections with Spring Data Cloud Spanner and Spring Data Cloud Datastore

  • Write and read from Spring Resources backed up by Google Cloud Storage

  • Exchange messages with Spring Integration using Google Cloud Pub/Sub on the background

  • Trace the execution of your app with Spring Cloud Sleuth and Google Stackdriver Trace

  • Configure your app with Spring Cloud Config, backed up by the Google Runtime Configuration API

  • Consume and produce Google Cloud Storage data via Spring Integration GCS Channel Adapters

  • Use Spring Security via Google Cloud IAP

  • Analyze your images for text, objects, and other content with Google Cloud Vision

147 questions
2
votes
1 answer

What is the recomended way to connect spring boot application and google Cloud SQL?

When I read google documentation I see that the recommended way is using cloud sql proxy: To connect securely to Cloud SQL from Google Kubernetes Engine using a public IP address, you must use the Cloud SQL Proxy. From other side when I read…
2
votes
2 answers

Is there way to use pg_cron from the google cloud sql?

Currently I need to move my database from postgreSql to google cloud sql. I use pg_cron to remove stale records like this: SELECT cron.schedule('30 3 * * 6', $$DELETE FROM events WHERE event_time < now() - interval '1 week'$$); I've read folowing…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
2
votes
1 answer

Application accepts duplicated messages from google Pub/Sub even after acknowledge

I experience very strange floating bug() when I test application in GCP environment. I can't find out concrete steps to reproduce but it really happens from time to time. I see that message was successfully acknowledged: 2019-12-06 12:37:47.348 …
2
votes
0 answers

Error using PubSub emulator with Spring Cloud GCP (UNIMPLEMENTED: Method not found)

I'm trying to use Spring Cloud GCP PubSub to communicate to a PubSub emulator. Dependency: org.springframework.cloud spring-cloud-gcp-starter-pubsub
Lucas Soares
  • 343
  • 1
  • 11
2
votes
1 answer

Unable to read from GCP pubsub

I am struggling to read message off the destination channel the cloud streaming handler is being written to. I have the gcp emulator for pub/sub running in test containers. I am able to successfully send messages to the input queue/topic(sorry I…
2
votes
1 answer

How to wire/configure two pubsub gcp projects in one spring boot application with spring cloud?

Currently, we're working on a spring boot application in a GCP project, which connects to a PubSub endpoint in the same GCP project, but also to a PubSub endpoint in another GCP project. I want to use plain spring cloud GCP PubSub components, but…
SvenR
  • 39
  • 1
  • 6
2
votes
1 answer

Structured Stackdriver logs - adding MDC to logs

Added MDC to logs to be able track specific error logs in Stackdriver Dashboard and Logging Console. Current implementation is working fine on local machine but on cloud it is not - just don't include my MDC to log entry. The problem is that I…
2
votes
1 answer

How to connect spring gcp PubSubTemplate to local instance?

i'm using spring boot starter spring-cloud-gcp-starter-pubsub and PubSubTemplate. it works perfectly with actual GCP but now i want to use it for my tests with local Google PubSub emulator. how can i provide my custom url, port and no credentials?…
piotrek
  • 13,982
  • 13
  • 79
  • 165
2
votes
1 answer

Spring+GCP Datastore: I use repository and want to configure it to use datastore emulator during development or test

I started emulator by this line: gcloud beta emulators datastore start --host-port=localhost:8484 --no-store-on-disk of course i can define com.google.cloud.datastore.Datastore and create instance by this lines: return…
Alexey Alexeenka
  • 891
  • 12
  • 15
2
votes
3 answers

Disable Spring Cloud Sleuth when running Integration Tests?

When using org.springframework.cloud:spring-cloud-gcp-starter-trace:1.0.0.RELEASE and running my integration tests locally I get this error message: org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
Johan
  • 37,479
  • 32
  • 149
  • 237
1
vote
0 answers

GcpDatastoreEmulatorAutoConfiguration doesn't happen before GcpDatastoreAutoConfiguration

I am trying to set a spring boot application, using Datastore as DB storage. For that I use the spring-cloud-gcp starter dependency to auto-configure the Datastore instance for me. Since I want to work with two spring profiles - one production and…
1
vote
0 answers

Spring boot App API hosted on Google cloud under a custom domain using a dispatch file, is throwing CROS from last week

We have a Spring-boot application hosted on Google cloud console and we have mapped a custom domain for our API, the configuration was done using a dispatch file. The application was working fine, but from last week the API calls gets random CORS…
1
vote
1 answer

Spring Native build with GCP failed

I am trying to build a native version of my Spring Boot app (3.0.6, Java 17, Gradle 7.5) using Spring Native. The target runtime is Cloud Run on the GCP. When I try to run the Gradle task 'bootBuildImage', I get this error message: Exception in…
Ben
  • 290
  • 2
  • 17
1
vote
0 answers

spring-cloud-gcp-starter-logging 4.1.x depends on outdated artifacts javax.annotation-api as well as org.apache.httpcomponents 4

I am currently trying to update our Spring Boot Applications to Spring Boot 3.0.5. Accordingly I am trying to migrate to Spring Cloud GCP version 4.1.4, which according to their readme on github is intended to be compatible with Spring Boot…
1
vote
1 answer

Trying to connect Spring Application to Postgresql GCP Instance with SSL/TLS

I'm trying to connect my Spring Application with maven as build tool to a postgres instance on my GCP project. I had setup a postgres instance, generated client-key.pem, client-cert.pem & server-ca.pem, turned on ssl on those instances and added all…
1
2
3
9 10