DEV Community

Cover image for Birthdate Speciality | Azure SpringBoot
Atharva Shirdhankar
Atharva Shirdhankar

Posted on • Updated on

Birthdate Speciality | Azure SpringBoot

Hey,have you ever counted how many days are left for your birthday?Whats your birthstone? What's your Zodiac and Shēngxiào? No!
Don't worry this web app will find it for you.

Submission Category: Java Jackpot

Overview of My Submission

Hello everyone, here is my Fun type Java Spring boot web app which will help you count days left for your next Birthday.
And Moreover,it will tell you your Birthstone,zodiac,etc.

Lets start building the project and deploy it on Azure Web Service for Java

Setup and requirements for this project :

  • Java Framework : Spring Boot
  • Project Management Tool : Maven
  • IDE : IntelliJ
  • IntelliJ plugin : Azure Toolkit for Intellij
  • Deployment : Azure
  • Browser : Chrome

and yes some coffee...

Step 1: Download SpringBoot Template from Spring Initializr

Spring Initialzr helps us to create Spring boot Web app in easy way. It also has amazing option to add dependencies to our springboot app.

Link : https://start.spring.io/
(official website from SpringBoot)

Here is the Screenshot of this project bootstrapping with the help of Spring Initializr

Image description

  1. Give your project name and Description(you can also change the group but I have left it default)
  2. Dependencies : Spring Web, Spring Boot Devtools, Thymeleaf(Template engine).
  3. Select the options
    • Project : Maven
    • Language : Java
    • SpringBoot version : Leave it Default selected
    • Packaging : jar
    • Java : 11

Then click on 'GENERATE'. Zip file will be downloaded.

Yay!!!Our initial setup is ready🎉.

Step 2: Java Spring Boot Web App Code

GitHub logo StarTrooper08 / BirthdateSpeciality

Fun kind of SpringBoot project which shows details regarding Birthdate(days left for next birthday, zodiac,etc)




Step 3: Deployment Process using IntelliJ on Azure Spring Boot

  1. After, we are done with building web app and tested by running on localhost. Lets deploy it to azure spring cloud using IntelliJ Azure plugin.
  2. Go to the settings option of IntelliJ(you can see it on top upper right side in the IDE) Image description
  3. Click on plugin option
  4. Search for Azure Toolkit plugin. Image description
  5. Install the plugin and restart the IntelliJ IDE. It will get installed. Image description
  6. Now click on the main project and head towards Azure option. After hovering on Azure you will see many option we will be using Spring Cloud option. But before that we need to connect intelliJ IDE with Azure. Image description
  7. Now click on Azure Spring Cloud.Here you will be asked to sign in with your Azure Account.Many options are available to sign in,you can go with any option.I have signup with OAuth option here. Image description
  8. After done with sign-in. One pop up will be showed on IDE regarding Azure subscription. And IntelliJ and Azure connection will done successfully.
  9. And then go to the azure portal and select Azure Spring Cloud option for creating spring boot service instance for our web app. Image description
  10. Click on create button Image description
  11. Now we will be asked for giving our service instance name and asked to select region.After that click on review and create. Now have patience, let the Azure do the magic.It will take few minutes to deploy our service instance. After our service instance get deployed successfully. Head towards IntelliJ IDE(I suggest restarting IDE before moving to next step). Image description
  12. Now we have service instance. Lets deploy our java spring boot web app on it. Open the option as shown in Step 3.6. And click on Azure Spring Cloud. You will get some pop up below. Select the Service instance created and add the app name by clicking on the + sign. Image description
  13. Now for app we need to select some options. Example below. Image description
  14. Now click on apply and run. The app deployment will start(please dont click on any buttons like run stop app in IDE or else the deployment process will stop and fails) Image description
  15. After few minutes our app will deployed successfully and we will following output in our IDE console. Image description
  16. We can have a look in Azure portal to cross check whether our SpringBoot app is successfully deployed or not. Image description
  17. We can get the link to our springboot app in Application dashboard (And even in IDE console) Image description

Final Output :

  1. Home Page:
    Image description

  2. Result Page:

Image description

Image description

Image description

  1. Web App link : https://birthdate-speciality-service-birthdate-sp-app.azuremicroservices.io
Yes we have successfully Created our Spring Boot Web Application and deployed it on Azure using Spring Cloud Service🎉🚀.
Resources credit:
  1. Azure Docs :
  2. Spring Boot : https://spring.io/projects/spring-boot
  3. Apache Commons: https://commons.apache.org/

Top comments (1)

Collapse
 
star_trooper profile image
Atharva Shirdhankar

My Microsoft Azure credit is over so site is unreachable currently.
Sorry for the inconvenience.