1. Overview

If you are visiting this article means that you are going to plan to learn the spring boot. When we are unknown to particular technology at that time we might be a little bit confused about what to learn and from where to start? and also up to which level it will be enough to know about the basic about it. So in this article, we will try to remove the confusion about spring and spring boot.

 2. Want to learn spring boot but from where to start?

I would like to say some basic about spring boot, Spring boot is not a framework but it just helps and makes the configurations easy for application development as well as production, Here are some of the advantages of Spring boot:

  • Easily configure spring modules like Spring JPA, Spring web and etc using spring starter
  • Embedded web servers like Tomcat, Jetty, and undertow (No need to setup server just run single jar)
  • Easy dependency management & just worry about modules, not about dependency supported versions
  • Simple configurations, No need of XML configurations. Develop an application with minimal configurations

To develop any web application, we should generally know about:

  • How to create Rest services and how to make it secure (secure endpoints)?
  • How to communicate with the databases (SQL/NoSQL)?
  • How to debug the application and how to configure logs?
  • How to build and package the application for production or staging (Testing)?
  • How to deploy an application in production? and what the important point that we should care about?
  • How to develop API documentation, Which helps to the frontend developer to call rest points and show in UI?
  • What are the best practices for application development?

3. How to create Rest services and how to make it secure (secure endpoints) in spring boot?

4. How to communicate with the databases (SQL/NoSQL)?

5. How to debug the application and how to configure logs in spring boot?

  • Debugging useful while application development. To check that code execution flow step by step debugging is requires, Here is an article for how to debug that spring boot application.
  • Logging mostly useful for production, We check the exceptions and error in the doing from production logs. Spring boot supports so many logging frameworks, Here are configurations examples for log4j and slf4j-and-logbackHow to build and package the application for production or staging (Testing)?

6. How to deploy a spring boot application in production? and what the important point that we should care about?

  • To deploy spring boot application in production with just run .jar in production server for 80 for http and 443 for https ports.
  • Our database or any other configurations generally different from the production environment, in that case, we can use profiling: Here is an example for how to set different profile for different environments.
  • Another challenge for the production deployment is database migrations, Generally each and every we might have new database changes like added some new tables or modification in the schema, we have some tools for database migrations that we can configure in spring boot using that when new build deploy in production at that time .SQL file will be executed automatically. Here is an example of flyway configurations with spring boot and another tool is there for database migration is liquibase, here is an example of liquibase configurations with spring boot.

7. How to develop API documentation, which helps to the frontend developer to call rest points and show in UI?

  • We are developing Rest API and automatically generate documents for endpoints then? Look likes a dream !. Dreams come to true using swagger. We can easly configure swagger with our spring web application, which helps UI developers to check and develop a swagger. Here is the guideline to configure swagger with spring boot.

8. Best practice for spring boot application development

 

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *