Took over the project up to now, have been about half a year, within six months, their own for SpringBoot from the strange to start getting to know, through a lot of ups and downs, he has been doing to SSM for the framework of the project, but not for their knowledge of conduct carding system, the last night of 2019, I thought, learned things still need to tidy up from zero, so it had a bigger harvest. Then we begin to configure maven now!
Before using SpringBoot, we must first configure maven, maven is a tool to build one of the most powerful. For starters white, the knowledge is often not a lot of people really want to get started school, it fell on a variety of configurations, then, for the need to build Spring project for us, how to configure our maven it? Here we do a detailed introduction ...
First, download the official maven
maven's official website: maven
but it is worth noting that maven version of choice, under normal circumstances, is not recommended to download the latest version, which will meet a lot of unnecessary trouble! As I use the latest version of the apache-maven-3.6.3
time I met BUG: 2019 last year BUG: Unable to import maven project
simply because IDEA version compatibility MAVEN version!
So here each version of development tools I use are as follows:
IntelliJ IDEA 2019.1 x64、apache-maven-3.6.0、java 1.8
As for 3.6.0 or earlier maven download site: the Parent Directory
Second, configure the environment variables
This should be very easy, but in order to avoid you wasting too much time on it, so I have a brief introduction to:
the configuration in the PATH variable as follows:
Then we check whether cmd success
here Insert Picture Description
Third, Ali mirroring configuration and jdk
First, we unpacked in local maven create a new folder responsitory
(you can name your own), as we rely on memory to download from the official website of Spring warehouse
and then we open the setting.xml
file, configured
to maven's settings.xml
profile profiles
label and mirrors
add the configuration
Configurationjdk1.8
<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>
</profiles>
Configure mirror source Ali
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
Fourth, the configuration of the maven adaptation to IDEA
After I configured, open the IDEA
our configured maven added IDEA which
so far we have configured! Here we can be happy to learn of Spring!
I have used Spring deployed a Hello World
welcome View Bowen: build and package the HelloWorld project with SpringBoot
2020 is coming! I wish you all a Happy New Year ah!
I hope I can have a new beginning! Come together ~