How to create a SpringBoot project (idea version)

chatting part

The springboot project, whether it is a java project or a web project, can run directly as a jar, so it is recommended to create a jar project. Here is an example of creating a jar project.

Pre-environment:

maven3.6.0, if not installed, please refer to the article: maven installation and configuration in windows environment

idea version: 2020.3 (the version Xiaobai has been using)

Closer to home

There are two ways to create a SpringBoot project in idea

Method 1: First create a maven project and configure it manually

Create a new project, select the maven project, do not use any template, and go directly to the next step

image-20230509145139351

Fill in the project name...

image-20230509145431234

Modify pom.xml, add parent dependency

image-20230509145624897

Add web launcher, write startup class, application.yml file

image-20230509145908559

Method 2: Use Spring Initializr

Create a project, select Spring Initializr

image-20230509150059865

Fill in the project settings

image-20230509150320329

Select the launcher to initialize

image-20230509150435476

Project name and location

image-20230509150521827

Manually modify the version to your own commonly used

image-20230509150705094

Wait for the dependencies to be downloaded and finish Sahua

epilogue

1. The project created in method 2 will automatically create startup classes and application core configuration files, but the files are very complicated and there are many useless files.

2. Method 1 is relatively simple, and the file is clean. Xiaobai often uses this method.

3. Method 2 Depending on the network environment, sometimes it cannot be loaded.

4. It's not easy to make, let's go with one click and three consecutive times. Your support will always be my biggest motivation!

5. Java full-stack technology exchange, Q group: 941095490, welcome to come! (Future masters like clouds)

Guess you like

Origin blog.csdn.net/admin_2022/article/details/130614539