[Spring Cloud] Dark Horse Headlines Initial Project Construction

1. Download the initial project project provided by Dark Horse

1. Search for dark horse programmers in WeChat

2. Enter the Black Horse Programmer applet

The first method: directly enter the Black Horse Programmer applet /

The second method: click on the information download in the dark horse resources in the service in the public account /

The third method: After following the public account, enter the chat interface and click on the data download in the dark horse resources below.

3. Click on the learning route at the bottom

4. Scroll down to find the dark horse headlines in the actual project

5. Click to enter, then click to download the resource

6. Click “Enter Netdisk” to enter the Baidu Netdisk applet

7. Enter the “Heima Programmer Java Microservice Project “Heima Toutiao”/day01-Environment Construction, SpringCloud Microservice/Code” directory, long press “heima-leadnews.zip” and save it to the cloud disk. Download in

8. Click the icon on the right side of the downloaded “heima-leadnews.zip” file to enter the Baidu Cloud download directory, and unzip the file to the directory where the Java project is stored locally

9. Use IDEA to open the project

The first method: right-click the folder and select “Open Folder as IntelliJ IDEA Project” to open /

Second method: In IDEA, choose to open a project and find the decompressed heima-leadnews import

2. Modify the project maven configuration

1. Use your own local maven’s setting.xml and repository

2. Click the reload icon “Reload All Maven Projects” in maven to import project dependencies

3. If “Cannot resolve XXX” or “Cannot resolve XXXX” problems appear in Build, they are generally source problems. We can solve them by modifying maven’s settings.xml file

Configure settings.xml in maven

1. Find the mirrors tag in the file

2. Replace the mirror tag with the source I provided (it has been tested and works normally)

 <mirror>
        <id>aliyun-public</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun public</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror>

    <mirror>
        <id>aliyun-central</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun central</name>
        <url>https://maven.aliyun.com/repository/central</url>
    </mirror>

    <mirror>
        <id>aliyun-spring</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun spring</name>
        <url>https://maven.aliyun.com/repository/spring</url>
    </mirror>

    <mirror>
        <id>aliyun-spring-plugin</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun spring-plugin</name>
        <url>https://maven.aliyun.com/repository/spring-plugin</url>
    </mirror>

    <mirror>
        <id>aliyun-apache-snapshots</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun apache-snapshots</name>
        <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>

    <mirror>
        <id>aliyun-google</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun google</name>
        <url>https://maven.aliyun.com/repository/google</url>
    </mirror>

    <mirror>
        <id>aliyun-gradle-plugin</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun gradle-plugin</name>
        <url>https://maven.aliyun.com/repository/gradle-plugin</url>
    </mirror>

    <mirror>
        <id>aliyun-jcenter</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun jcenter</name>
        <url>https://maven.aliyun.com/repository/jcenter</url>
    </mirror>

    <mirror>
        <id>aliyun-releases</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun releases</name>
        <url>https://maven.aliyun.com/repository/releases</url>
    </mirror>

    <mirror>
        <id>aliyun-snapshots</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun snapshots</name>
        <url>https://maven.aliyun.com/repository/snapshots</url>
    </mirror>

    <mirror>
        <id>aliyun-grails-core</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun grails-core</name>
        <url>https://maven.aliyun.com/repository/grails-core</url>
    </mirror>

    <mirror>
        <id>aliyun-mapr-public</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun mapr-public</name>
        <url>https://maven.aliyun.com/repository/mapr-public</url>
    </mirror>

3. Click the reload icon “Reload All Maven Projects” in maven again to import project dependencies

3. Initial project construction completed

When the leaf icon appears in the yml configuration file and there is a switch icon in the lower right corner of the startup class (the UI may be a little different), it means that the project is built successfully.