Azure Web App- Spring Boot Backend Service with Azure Database for MySQL server and Redis Cache— part 03

Shalika Prasad
4 min readAug 3, 2020

Lets continue our third part related to Deploy Your Azure Web Application tutorial.

First, go to see previous blog post =>

  1. After creating the web app, you want to add Database for your Backend Application. So. create MySQL DB simply, and get the connection string using the bellow tab.
  • If you want to access DB from your local machine you can add id address to DB. (Disable SSL connection enforce as you like)
  • You can simply log to the database server and create a database.
  • Add these code to the application properties file

2. Add Azure Cash for Redis to store cashing value with key-value pairs.

Now you can check that cash database working or not using cmd.

Add Redis for Spring boot =>

  1. Add these code to pom.xml

2. Add these code to the application properties file (use Primary key in Access key tab for password)

3. Create Pincode Service for saving and retrieving values from Redis DB.

3.1 PincodeService

3.2 PincodeDao

3.3 Pincode

3.4 RedisController

  • Now you can connect Redis DB for store key-value pairs.
  • Now you want to add a configuration to pom.xml for deploying your web project.

First, config your web application details.

You can deploy the app project simply. If you want to change the java version follow this step(configuration=> Java minor version*)

Next, we go to part 03 related to Deploy Your Azure Web Application tutorial.

Azure Function with Azure Storage using Java — part 04

References

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response