IDEA project using a mirror to quickly create SpringBoot

First, the use of official IDEA default maven repository, then, for some reason unable to download will depend on the relevant slow or download, here we use Ali cloud image.

1, IDEA enter Settings> Build, Execution, Deployment> Build Tools> Maven Maven version of view. Usually the default is Maven3, corresponding to the second point maven3 directory.

2, is mounted into the path of the IDEA, ******* \ IntelliJ IDEA 2019.1 \ plugins \ maven \ lib \ maven3 \ conf \ settings.xml, copy settings.xml to the C disk file .m2 user folder

 

 

 3, will be copied into the open settings.xml .m2 the editing modifications, additions follows <mirrors> </ mirrors>.

<mirror>
  <id>aliyunmaven</id>
  <mirrorOf>*</mirrorOf>
  <name>阿里云公共仓库</name>
  <url>https://maven.aliyun.com/repository/public</url>
</mirror>

4, enter Settings> Build, Execution, Deployment> Build Tools> Maven, check back User settings file tick.

 

 

 5, click "Apply", "OK", Ali cloud repository configuration is complete.

 

Second, the new project SpringBoot

1, the project file -new-

 

 

 2, fill in the project information

 

 

 3, according to project needs to be downloaded by checking dependencies, may be introduced in a subsequent file pom

 

 

 4. Select the path to save the project

 

 

 5, depending on the download, Ali cloud images quickly using good load-dependent

 

 

 

 6, the project has been created

 

 

 

Third, integration mybatis

1, adding a dependency in pom.xml

<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.1.1</version>
</dependency>

 

Fourth, the project to build a framework

This is the code structure of my project, for reference purposes only.

 

Guess you like

Origin www.cnblogs.com/liuliang1999/p/12635282.html