Spring

The Spring Framework is a powerful, open-source application framework for Java that provides comprehensive infrastructure support for developing Java applications. It offers a wide array of features and functionalities, including inversion of control (IoC), aspect-oriented programming (AOP), and a broad range of modules for various purposes like data access, web development, security, and more. Spring simplifies the development process by promoting a modular and flexible architecture, making it easier for developers to create loosely coupled and easily testable applications. It enables developers to build robust, scalable, and maintainable enterprise-level applications by offering a cohesive framework that integrates seamlessly with other libraries and frameworks.

Spring is considered a “framework of frameworks” where several sub-frameworks or sub-tools exists to simplify the development of complex applications or systems. We’ll be going over some of them such as Spring Data JPA, and Spring Secuirty, but the concern for this post is Spring Boot.

Spring Boot, an extension of the Spring Framework, is designed to simplify and accelerate the initial setup and development of Spring-based applications. It provides an opinionated approach to configuration, reducing the need for developers to spend time on boilerplate code and configurations. Spring Boot favors convention over configuration, offering a set of pre-configured settings and defaults that allow developers to create stand-alone, production-grade applications with minimal effort. It simplifies the deployment process by embedding a web server within the application, enabling applications to be easily packaged as JAR files, and simplifying the setup of production-ready features such as health checks, metrics, and monitoring. Overall, Spring Boot streamlines the development process, allowing developers to focus more on building the core features of their applications.

Oftentimes, you will hear developers incorrectly use the term “Spring Boot” and “Spring Framework” interchangeably. This will be important in interviews because a hiring manager may assume a dev has worked with several Spring tools since they have Spring Boot on their resume. So just note that Spring Boot is apart of the Spring Framework and not the entire Spring Framework.

Spring Initializr

Spring Initializr is a web-based tool that facilitates the rapid kick-starting of Spring-based applications by generating a foundational project structure with the necessary dependencies. Developed by the Spring team, it offers an intuitive and user-friendly interface allowing developers to select the specific dependencies, programming language, build tools, and version preferences for their Spring Boot project.

Use the following criteria to generate a boilerplate project. You can then open it up in your IDE and run it:

Project: Maven

Language: Java

Spring Boot: 3.1.4

Packaging: Jar

Java Version: 17

Dependencies:

  • Spring Web: a base for full stack development and provides an embedded Tomcat server.
  • Spring Boot DevTools: provides us with the Spring Boot developer tools, which provide automatic restart functionality. It makes development much faster because the application is automatically restarted when changes have been saved.