Skip to main content

Command Palette

Search for a command to run...

#6 Ways to Create a Spring Boot Application

Published
β€’2 min readβ€’View as Markdown

we can create a Spring Boot app in 3 main ways:

  1. Spring Initializr (Web Client)

Official website:
πŸ‘‰ https://start.spring.io

You choose:

  • Project: Maven / Gradle

  • Language: Java

  • Spring Boot version

  • Group

  • Artifact

  • Dependencies (Web, JPA, etc.)

Then download a ready-made project ZIP.

  1. STS (Spring Tool Suite IDE)

STS is Eclipse + Spring plugins.

Inside STS:

File β†’ New β†’ Spring Starter Project

It internally connects to Spring Initializr and generates the project.

  1. Spring Boot CLI

Command line tool.

Example:

spring init --dependencies=web myproject

Used less frequently today, mostly for quick prototyping.


When creating a Spring Boot project, you see fields like:

  • Group

  • Artifact

  • Name

  • Package

Artifact = Project Name

In Maven terminology:

Artifact is the name of the project’s build output (JAR file).

Example:

If Artifact = student-app

Your final build file will be:

student-app-0.0.1-SNAPSHOT.jar

So artifact represents:

  • Project name

  • JAR file name

  • Unique identifier inside group

Full Maven Identity Structure

Every Maven project is identified by:

GroupId + ArtifactId + Version

Example:

GroupId: com.practice
ArtifactId: student-app
Version: 1.0

Final JAR:

student-app-1.0.jar

What is Group?

Group usually represents:

  • Company

  • Organization

  • Domain name reversed

Example:

com.google
com.amazon
com.practice

What is Version?

Defines:

  • Application version

  • Release stage

Example:

1.0.0
0.0.1-SNAPSHOT

How It Connects to pom.xml

Inside pom.xml:

<groupId>com.neha</groupId>
<artifactId>foodapp</artifactId>
<version>0.0.1-SNAPSHOT</version>

Maven uses this to:

  • Build project

  • Name jar

  • Manage dependencies

When you:

  1. Create project using Spring Initializr

  2. It generates pom.xml

  3. Maven reads group + artifact

  4. Builds jar file

  5. You run it using:

java -jar foodapp-0.0.1-SNAPSHOT.jar