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
- Give your project name and Description(you can also change the group but I have left it default)
- Dependencies : Spring Web, Spring Boot Devtools, Thymeleaf(Template engine).
- 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
StarTrooper08 / BirthdateSpeciality
Fun kind of SpringBoot project which shows details regarding Birthdate(days left for next birthday, zodiac,etc)
BirthdateSpeciality
Explantory Blog : https://dev.to/star_trooper/birthdate-speciality-azure-springboot-2i4l
WebApp link : https://birthdate-speciality-service-birthdate-sp-app.azuremicroservices.io
Licence : MIT
Step 3: Deployment Process using IntelliJ on Azure Spring Boot
- 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.
- Go to the settings option of IntelliJ(you can see it on top upper right side in the IDE)
- Click on plugin option
- Search for Azure Toolkit plugin.
- Install the plugin and restart the IntelliJ IDE. It will get installed.
- 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.
- 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.
- After done with sign-in. One pop up will be showed on IDE regarding Azure subscription. And IntelliJ and Azure connection will done successfully.
- And then go to the azure portal and select Azure Spring Cloud option for creating spring boot service instance for our web app.
- Click on create button
- 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).
- 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.
- Now for app we need to select some options. Example below.
- 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)
- After few minutes our app will deployed successfully and we will following output in our IDE console.
- We can have a look in Azure portal to cross check whether our SpringBoot app is successfully deployed or not.
- We can get the link to our springboot app in Application dashboard (And even in IDE console)
Final Output :
Yes we have successfully Created our Spring Boot Web Application and deployed it on Azure using Spring Cloud Service🎉🚀.
Resources credit:
- Azure Docs :
- Spring Boot : https://spring.io/projects/spring-boot
- Apache Commons: https://commons.apache.org/
Top comments (1)
My Microsoft Azure credit is over so site is unreachable currently.
Sorry for the inconvenience.