Java Spring Framework with Spring Boot-Quick Start [1]

Mr. Brave
4 min readFeb 7, 2024

--

Spring is a renowned choice among Java developers for enterprise application development on the backend, is a functional web framework.

Its extensive collection of modules and projects contributes to its considerable size.

Developers leverage the Spring Framework and Spring Boot to craft enterprise-grade Java applications that excel in performance, reusability, testability, and loose coupling.

These tools are versatile, suitable for developing a wide range of Java applications.

Firstly, my setup includes a Macbook M1 Pro 2021, Java 17, Spring Boot 3.2.2, and MySQL 8.0.3.

Toolchain:

Code Editor:IntelliJ IDEA Ultimate

API Testing Tool:Postman

Through this article, you will learn how to set up the necessary environment on Mac OS and run a simple backend service using Spring Boot.

Environment Setup:

1. Install IntelliJ IDEA Ultimate

Download IntelliJ IDEA Ultimate as the primary tool for editing code, although you can also use your preferred editor such as VS Code.

Ensure that Java SDK is installed on your local machine. Installation instructions for Java SDK will not be covered here.

2. Install MySQL

Visit the MySQL official website to download the software. Choose the appropriate installation package based on your computer model. In this case, I selected macOS 14 (ARM, 64-bit), DMG Archive.

During the installation process, remember to keep track of your password to avoid any issues later on. After the installation is complete, you will see a confirmation message in the settings.

3. Install Postman

Download Postman from the official website. Postman’s primary function is to simulate sending HTTP requests, greatly improving testing efficiency.

Creating a Spring Boot Project:

Open IntelliJ IDEA, which you installed earlier, and create a new project.

You will notice that IntelliJ provides various tools. For now, select only Spring Web and click finish.

After the initial project setup is complete, you will see all the code blocks on the left side of the page. In this article, we will focus on using the src folder and the pom.xml file in the root directory.

SpringBoot-Demo
┣ .idea
┃ ┣ .gitignore
┃ ┣ compiler.xml
┃ ┣ encodings.xml
┃ ┣ jarRepositories.xml
┃ ┣ misc.xml
┃ ┗ workspace.xml
┣ .mvn
┃ ┗ wrapper
┃ ┃ ┣ maven-wrapper.jar
┃ ┃ ┗ maven-wrapper.properties
┣ src
┃ ┣ main
┃ ┃ ┣ java
┃ ┃ ┃ ┗ org
┃ ┃ ┃ ┃ ┗ example
┃ ┃ ┃ ┃ ┃ ┗ springbootdemo
┃ ┃ ┃ ┃ ┃ ┃ ┗ SpringBootDemoApplication.java
┃ ┃ ┗ resources
┃ ┃ ┃ ┣ static
┃ ┃ ┃ ┣ templates
┃ ┃ ┃ ┗ application.properties
┃ ┗ test
┃ ┃ ┗ java
┃ ┃ ┃ ┗ org
┃ ┃ ┃ ┃ ┗ example
┃ ┃ ┃ ┃ ┃ ┗ springbootdemo
┃ ┃ ┃ ┃ ┃ ┃ ┗ SpringBootDemoApplicationTests.java
┣ target
┃ ┣ classes
┃ ┃ ┣ org
┃ ┃ ┃ ┗ example
┃ ┃ ┃ ┃ ┗ springbootdemo
┃ ┃ ┃ ┃ ┃ ┗ SpringBootDemoApplication.class
┃ ┃ ┗ application.properties
┃ ┗ test-classes
┃ ┃ ┗ org
┃ ┃ ┃ ┗ example
┃ ┃ ┃ ┃ ┗ springbootdemo
┃ ┃ ┃ ┃ ┃ ┗ SpringBootDemoApplicationTests.class
┣ .gitignore
┣ HELP.md
┣ mvnw
┣ mvnw.cmd
┗ pom.xml

Click the run button in the top right corner, and you will successfully run an empty backend server.

Further steps will be covered in the next article.

Java Spring Framework with Spring Boot-Quick Start [2]

--

--

Mr. Brave

Software Engineer. My favorite food is sausages and mash.