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
Fill in the project name...
Modify pom.xml, add parent dependency
Add web launcher, write startup class, application.yml file
Method 2: Use Spring Initializr
Create a project, select Spring Initializr
Fill in the project settings
Select the launcher to initialize
Project name and location
Manually modify the version to your own commonly used
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)