Problems encountered when creating a SpringBoot project

Problems encountered when creating a SpringBoot project:

Scenario: When I used idea2018 to create a SpringBoot project through Https://start.aliyun.com, there was a problem of project package import error, so I went to the Internet to find related articles, and finally solved this problem, and recorded the article as Follow-up study review.


Download maven3.6.0

When creating a SpringBoot project, the version requirement of jdk is 1.8, but the requirements for maven are not so strict. For the convenience of the picture, I used maven3.5 which was modified by the company before. When I entered the download package after creating the project, it came out. Wrong, I suspected it was a problem with the maven file, so I re-downloaded a maven3.6.0 and placed it in the CSDN download resources for download.
After the download is complete, first modify the maven settings file, the modifications are as follows:
1. Add the following code under the Settings node, here is the configuration of the local maven warehouse:

<localRepository >F:\repository</localRepository >

2. Add the following code under the mirrors node:

<mirror>
	  <id>maven-aliyun</id>
	  <mirrorOf>central</mirrorOf>
	  <name>aliyun</name>
	  <url>http://maven.aliyun.com/nexus/content/groups/public</url>
	</mirror>

3. Configure the following code under the profiles node:

<profile>  
    <id>jdk-1.8</id>  
    <activation>  
        <activeByDefault>true</activeByDefault>  
        <jdk>1.8</jdk>  
    </activation>  
	<properties>  
        <maven.compiler.source>1.8</maven.compiler.source>  
        <maven.compiler.target>1.8</maven.compiler.target>  
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>  
        </properties>  
    </profile>

After saving, create a new warehouse folder at the corresponding address, and configure the maven warehouse in idea.


Error solution:

Checked a lot of methods, the only successful method is to restart the idea.


Guess you like

Origin blog.csdn.net/fzt12138/article/details/123680165