Complete Guide to Creating a Spring Boot 4 Project: JetBrains (IntelliJ) vs. Non-JetBrains (VS Code) Setups
Hello, this is Lovefield.
Whether you are a frontend developer building your own backend API or starting a new full-stack service, the very first hurdle when approaching Spring Boot 4 is deciding "how to bootstrap and configure the project cleanly for my editor."
In the Java and Spring ecosystem, the initial setup workflow differs noticeably depending on your IDE. Specifically, the workflow splits into two paths: using IntelliJ IDEA Ultimate (which includes native Spring tooling) versus using free environments like Visual Studio Code (VS Code) or IntelliJ Community Edition.
In this guide, we will walk through the cleanest, standard ways to initialize a Spring Boot 4.x project running on Java 25 for both environments, along with essential starter dependencies.
Prerequisite: Verify Your Java 25 (LTS) Version
To take full advantage of Spring Boot 4.x and modern JVM capabilities (such as enhanced Virtual Threads and runtime optimizations), Java 25 (LTS) or higher is required. Check your active Java version in the terminal first:
Shell
1
java -versionIf you are running an older version or do not have Java installed yet, installing JDK 25 via SDKMAN! (macOS/Linux) or Eclipse Temurin (Adoptium) is recommended.
For JetBrains (IntelliJ IDEA Ultimate) Users
If you use IntelliJ IDEA Ultimate, you do not need to leave your editor. You can generate and configure the entire project structure directly via its built-in Spring Boot wizard.
Project Creation Steps
Open IntelliJ IDEA and click New Project on the welcome screen.
Select Spring Boot from the Generators list on the left sidebar. (Note: This built-in generator is exclusive to the Ultimate edition.)
Fill in your project metadata:
Name / Location: Project name and directory path
Language: Java (or Kotlin)
Type: Gradle - Groovy or Gradle - Kotlin (Recommended over Maven for faster builds and concise configuration)
Group / Artifact: Package namespace (e.g., com.example / demo)
JDK / Java: Select your installed 25
Click Next, select Spring Boot 4.x.x, check the starter dependencies you need, and click Create. IntelliJ will automatically resolve Gradle dependencies and configure your Run profiles.
Built-in Advantages of IntelliJ Ultimate
Provides instant autocomplete and deprecation warnings for Spring Boot 4 properties inside application.yml or application.properties.
Running and debugging the embedded Tomcat server works immediately via the top-right Run button (Shift + F10).
For Non-JetBrains Users (VS Code, IntelliJ Community, etc.)
If you prefer VS Code or IntelliJ Community Edition, the standard approach is to generate the skeleton project using the official Spring Initializr web tool (or CLI) and open it in your editor.
Bootstrapping via Spring Initializr Web
Navigate to start.spring.io in your browser.
Configure the project metadata on the left panel:
Project: Gradle - Groovy
Language: Java
Spring Boot: Select the latest 4.x.x stable release (avoid SNAPSHOT versions for production stability)
Packaging: Jar (Standard for embedded server execution and Docker container deployments)
Java: 25
Click ADD DEPENDENCIES... on the right panel to select your libraries.
Click GENERATE at the bottom to download the .zip archive, then extract it into your workspace folder.
Quick Generation via CLI (curl)
If you prefer staying in the terminal, you can download and extract the exact same Java 25 starter project with a single curl command:
Shell
1
2
3
4
5
6
7
8
curl https://start.spring.io/starter.zip \
-d type=gradle-project \
-d language=java \
-d javaVersion=25 \
-d groupId=com.example \
-d artifactId=my-api \
-d dependencies=web,lombok,validation \
-o my-api.zip && unzip my-api.zip -d my-apiSetting Up Spring Boot 4 in VS Code
Because VS Code is a lightweight editor by default, you need to install two official extension packs (kept up to date for Java 25 syntax support) to unlock full compilation, debugging, and Spring management features.
Install Required Extension Packs
Open the Extensions view (Ctrl + Shift + X) in VS Code and install:
Extension Pack for Java (by Microsoft): Provides Java 25 language support, debugging, test runner, and Gradle integration.
Spring Boot Extension Pack (by VMware): Adds Spring Bean navigation, application.yml autocomplete, and the Spring Boot Dashboard for one-click server start/stop.
Opening and Running the Server
Open the extracted my-api folder in VS Code.
Wait a few moments for the Gradle build synchronization notification in the bottom-right corner to complete.
Locate the Spring Boot Dashboard section in the left Activity Bar and click the Play (▶) icon next to your application to boot up the server.
Recommended Core Dependencies for Beginners
If you are unsure which dependencies to pick when starting out, these four cover almost every foundational REST API use case:
Spring Web | Essential module for building REST APIs (@RestController) and running the embedded Tomcat server
Lombok | Eliminates repetitive Java boilerplate using annotations like @Getter, @Setter, and @RequiredArgsConstructor
Validation | Enables declarative request DTO validation (@NotNull, @Email, @Size, etc.)
Spring Boot DevTools | Automatically triggers fast application restarts whenever code changes are compiled during development
> Note on Lombok & Java 25: If Lombok annotations trigger compilation errors in your editor, verify that Annotation Processing is enabled in your IDE's Java compiler settings and ensure your Gradle build pulls a Lombok release supporting Java 25 bytecode.
Summary
To recap: IntelliJ Ultimate users can streamline setup via the built-in wizard, while VS Code and Community Edition users can bootstrap cleanly through start.spring.io targeting Java 25 and Spring Boot 4, pairing it with official extension packs for a fast, productive workflow.
Choose the workflow that fits your daily editor, spin up your first Spring Boot 4 endpoint, and expand from there into database integration (Spring Data JPA) or Docker container deployments.
This article was generated by AI.

Lovefield
Web Front-End developer
하고싶은게 많고, 나만의 서비스를 만들고 싶은 변태스러운 개발자입니다.

CSS Anchor Positioning and Popover API: Building Tooltips and Dropdowns Without External Libraries
Learn how to build top-layer tooltips, dropdown menus, and automatic viewport edge-flipping (position-try-fallbacks) using native HTML and CSS standards—eliminating JavaScript positioning libraries and Vue Teleport.
CSS