Codelab: Spring Cloud GCP with Cloud SQL

Hi, Spring fans! In this installment Shinya Yanagihara (@yanashin18618) talks to Spring Cloud GCP.

In my last article, I gave a general overview of Spring Cloud GCP with Cloud SQL. And also I announced to publish a hands-on about Spring Cloud GCP. Sorry for the delay but I publish the hands-on lab today.

Introduction

I created the hands-on lab as a container image. Therefor you can start it soon if you have a container environment. I explain how-to-start:

First of all, let’s pull the lab image:

$ docker pull ghcr.io/shinyay/codelab-spring-cloud-gcp-mysql:1.0.0

All that remains for you to do is to run the image.

$ docker run --rm -it -p 8080:8080 ghcr.io/shinyay/codelab-spring-cloud-gcp-mysql:1.0.0

This image has nginx in the container. Theirfore you can run it not only on local but also Kubernetes.

This lab opens at 8080 port. You can access it:

http://localhost:8080

When you access it, you can see the following site. It contains a tutorial, so please follow it.

Codelab Image

Tips for the lab

The lab explains a project template. You can retrieve the project template when you click the download button.

I use IntelliJ IDEA though, you can use whatever you like.

IntelliJ IDEA

I have prepared several test codes in advance. Therefore I expect you run the tests, check the results and modify codes.

Key Takeaways and the next

I introduced the Codelab about Spring Cloud GCP. I would like to create and publish the Codelabs from here on out.

As I described in my last article, I am sure you notice Spring Cloud GCP is easy if you have already known and developed Spring Boot.

The only point was to configure what to use for the external database.

I will be glad to hear you start using Google Cloud when you tried this lab.

Please send your comments and suggestions to @yanashin18618.

Developer Advocate at VMware (ex Google and Pivotal). All views and opinions are my own. 🐦 : @yanashin18618