Detailed steps to create a SpringBoot project

new Create a new project and select Spring Initializr, and then configure the address. You can use Alibaba Cloud as shown in the figure below. (Because the Spring official website abroad may be unstable)
the following three addresses (choose one) can be used.

  • https://start.spring.io (default)

  • https://start.springboot.io

  • https://start.aliyun.com
    insert image description here
    and then
    insert image description here
    insert image description here
    click Finish
    and wait for the download to load, check whether the project is successfully created, and see if there is an error in the Build, as shown in the figure below, if it is successful,
    insert image description hereif the above figure shows red instead of a green tick If the error message is reported, follow the steps below to solve it:

  • Refresh maven if there is an error,

  • If refreshing the maven error cannot be resolved, delete the repository folder under the .m2 folder and then refresh maven

  • If it still doesn't work, check whether the maven configuration is correct, and if there is no problem, recreate the project again (the new project cannot have the same name as the previous project, even if the previous project has been deleted)

Test whether the project was created successfully

Create index.html in the static folder of the springBoot project, then start the project, visit localhost:8080 in the browser to see if it can be accessed, if it is accessed, it means success

Guess you like

Origin blog.csdn.net/mfysss/article/details/129256696