DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Frameworks
  4. Spring Boot: The Most Notable Features You Should Know

Spring Boot: The Most Notable Features You Should Know

Let’s see what Spring Boot looks like under the hood so you can get your program up and running as soon as possible.

Zoltan Raffai user avatar by
Zoltan Raffai
·
Jul. 30, 18 · Analysis
Like (23)
Save
Tweet
Share
121.31K Views

Join the DZone community and get the full member experience.

Join For Free

Spring Boot Logo

What Is Spring Boot?

All in all, Spring Boot is a project built on the top of the Spring framework. It provides a simpler and faster way to set up, configure, and run both simple and web-based applications.

what is spring boot

In the Spring core framework, you need to configure all the things for yourself. Hence, you can have a lot of configuration files, such as XML descriptors. That’s one out of the main problems that Spring Boot solves for you.

It smartly chooses your dependencies, auto-configures all the features you will want to use, and you can start your application with one click. Furthermore, it also simplifies the deployment process of your application.

It can be a bit frightening for a few of you, because it seems that there a lot of “magic” things happening in the background. Despite that, I will explain the best features of the framework. I hope you take the advantage of this additional knowledge on Spring Boot in your future projects. It really makes your life simpler.

Firstly, let’s see the notable features that make it unique and easy to use.

Notable Features

  • Auto-configuration: It sets up your application based on the surrounding environment, as well as hints what the developers provide.
  • Standalone: Literally, it's completely standalone. Hence, you don’t need to deploy your application to a web server or any special environment. Your only task is to click on the button or give out the run command, and it will start.
  • Opinionated: This means that the framework chooses how to things for itself. This is the point where a lot of people says "wait a minute, I do not want to participate in it." Here I encourage you to wait for a second and hold your judgment for now, because, actually, it can be a good thing.

Intelligent Auto-Configuration

The intelligent auto-configuration attempts to auto-configure your application based on what dependencies you added. It is contextually aware and smart. Let’s see an example according to a database feature.

If you add a dependency to the pom.xml, which relates to a database, the framework assumes that you probably would like to use a database. Then, it auto-configures your application for database access.

spring auto configure database

Furthermore, if the dependency appears for a very specific database, for example, Oracle or MySQL. It can make a more certain assumption and probably will configure that specific database access what you exactly need.

To set up auto-configuration is extremely effortless. You only need to add the  @EnableAutoConfiguration annotation to your Spring Boot application.

enable auto configuration in spring boot

That’s easy, and to remove it. So, you don’t force to use all that features if you don’t want to.

Being Standalone

Spring Boot makes it easy to create stand-alone, production-grade, Spring-based applications that you can run.

—Spring Boot Project

You may think that running a Java application is easy — you simply give out the run command and everything works. To be honest, it is not that simple.

The Process of Starting a Java-Based Web Application

  • First of all, you need to package your application.
  • Choose which type of web servers you want to use and download it. They are a lot of different solutions out there.
  • You need to configure that specific web server.
  • After that, you must organize the deployment process and start your web server.

process of running a web application

With Spring Boot, you need the following process:

  • Package your application
  • Run it with some simple command like java -jar my-application.jar

Really, it's that simple.

Spring Boot takes care of the rest by starting and configuring an embedded web server and deploys your application there.

Opinionated

Spring Boot takes an opinionated view of building production-ready Spring applications.

— Spring Boot project

As I mentioned before, I don’t think of it as a bad thing. If you write Java applications, you have tons of choices, starting from the web, logging, collection framework, and the build tool you use.

Despite this, in the most cases, the developers use the same most popular libraries. All that the Spring Boot does is that it loads and configures them in the most standard way. Hence, the developers don’t need to spend a lot of time to configure up the same thing over and over again.

Hence, the developers have more time for writing code and satisfying business needs.

For an example, check out the https://start.spring.io/ where you can easily select your needs and simply download the appropriate ready-to start application for yourself — with just a few clicks!

The above is a great example of how you can take the advantage of the Spring Boot opinionated setup and start your project as fast as possible.

Summary

In this article, you learned about the basic fundamentals of Spring Boot, why it is created, what are the main cornerstones of it, and what problems it solves.

The most notable features properties were:

  • Auto-configuration
  • Standalone
  • Opinionated

All in all, the above serves one purpose:

To get your program up and running as quick as possible.

Further Reading

Spring Boot Tutorial for Beginners: Hello World Program

Spring Boot Microservices: Building a Microservices Application With Spring Boot

Spring Framework Spring Boot Web application

Published at DZone with permission of Zoltan Raffai, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Distributed Tracing: A Full Guide
  • Benefits and Challenges of Multi-Cloud Integration
  • What Is Docker Swarm?
  • Introduction to Cloud Native

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: