资源简介

此项目是一个完整的springboot+springcloud分布式项目,还整合了soul第三方网关服务,里面有详细的项目操作说明,可以下载参考

资源截图

代码片段和文件信息

/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License Version 2.0 (the
“License“); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing
software distributed under the License is distributed on an
“AS IS“ BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
*/

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.util.Properties;

public class MavenWrapperDownloader {

    /**
     * Default URL to download the maven-wrapper.jar from if no ‘downloadUrl‘ is provided.
     */
    private static final String DEFAULT_DOWNLOAD_URL =
            “https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar“;

    /**
     * Path to the maven-wrapper.properties file which might contain a downloadUrl property to
     * use instead of the default one.
     */
    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
            “.mvn/wrapper/maven-wrapper.properties“;

    /**
     * Path where the maven-wrapper.jar will be saved to.
     */
    private static final String MAVEN_WRAPPER_JAR_PATH =
            “.mvn/wrapper/maven-wrapper.jar“;

    /**
     * Name of the property which should be used to override the default download url for the wrapper.
     */
    private static final String PROPERTY_NAME_WRAPPER_URL = “wrapperUrl“;

    public static void main(String args[]) {
        System.out.println(“- Downloader started“);
        File baseDirectory = new File(args[0]);
        System.out.println(“- Using base directory: “ + baseDirectory.getAbsolutePath());

        // If the maven-wrapper.properties exists read it and check if it contains a custom
        // wrapperUrl parameter.
        File mavenWrapperPropertyFile = new File(baseDirectory MAVEN_WRAPPER_PROPERTIES_PATH);
        String url = DEFAULT_DOWNLOAD_URL;
        if(mavenWrapperPropertyFile.exists()) {
            FileInputStream mavenWrapperPropertyFileInputStream = null;
            try {
                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
                Properties mavenWrapperProperties = new Properties();
                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL url);
            } catch (IOException e) {
                Syste

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-05-29 14:48  hucheng-master\
     目录           0  2019-06-11 11:58  hucheng-master\.idea\
     文件          18  2019-04-19 10:33  hucheng-master\.idea\.name
     文件        2644  2019-04-29 11:44  hucheng-master\.idea\compiler.xml
     文件        2050  2019-04-29 11:44  hucheng-master\.idea\encodings.xml
     目录           0  2019-04-19 10:34  hucheng-master\.idea\inspectionProfiles\
     文件        1444  2019-04-19 10:34  hucheng-master\.idea\inspectionProfiles\Project_Default.xml
     目录           0  2019-05-06 11:27  hucheng-master\.idea\libraries\
     文件         489  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__antlr_antlr_2_7_7.xml
     文件         541  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml
     文件         610  2019-04-23 10:00  hucheng-master\.idea\libraries\Maven__avalon_framework_avalon_framework_4_1_3.xml
     文件         595  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__ch_qos_logback_logback_classic_1_2_3.xml
     文件         574  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__ch_qos_logback_logback_core_1_2_3.xml
     文件         523  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_101tec_zkclient_0_10.xml
     文件         715  2019-04-28 16:55  hucheng-master\.idea\libraries\Maven__com_alibaba_boot_dubbo_spring_boot_autoconfigure_0_2_0.xml
     文件         673  2019-04-28 16:55  hucheng-master\.idea\libraries\Maven__com_alibaba_boot_dubbo_spring_boot_starter_0_2_0.xml
     文件         520  2019-04-29 11:48  hucheng-master\.idea\libraries\Maven__com_alibaba_druid_1_1_10.xml
     文件         660  2019-04-29 11:48  hucheng-master\.idea\libraries\Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml
     文件         513  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_alibaba_dubbo_2_6_0.xml
     文件         513  2019-04-28 16:55  hucheng-master\.idea\libraries\Maven__com_alibaba_dubbo_2_6_2.xml
     文件         541  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_alibaba_fastjson_1_2_40.xml
     文件         541  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_alibaba_fastjson_1_2_49.xml
     文件         541  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_alibaba_fastjson_1_2_56.xml
     文件         534  2019-04-28 16:55  hucheng-master\.idea\libraries\Maven__com_alibaba_fastjson_1_2_6.xml
     文件         533  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_beust_jcommander_1_72.xml
     文件         530  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_caucho_hessian_4_0_38.xml
     文件         629  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_ctrip_framework_apollo_apollo_client_1_0_0.xml
     文件         615  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_ctrip_framework_apollo_apollo_core_1_0_0.xml
     文件         632  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_dyuproject_protostuff_protostuff_api_1_0_8.xml
     文件         723  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_dyuproject_protostuff_protostuff_collectionschema_1_0_8.xml
     文件         639  2019-04-19 12:44  hucheng-master\.idea\libraries\Maven__com_dyuproject_protostuff_protostuff_core_1_0_8.xml
............此处省略949个文件信息

评论

共有 条评论