-
大小: 958KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-05-16
- 语言: 其他
- 标签: springcloud
资源简介
利用springcloud组建的微服务架构demo,所用技术eureka/zuul/feign/ribbon/turbin/config-server等技术
代码片段和文件信息
/*
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) {
Syst
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-05-22 11:09 spring_cloud_demo\
目录 0 2019-07-05 08:42 spring_cloud_demo\.git\
文件 303 2019-05-16 16:30 spring_cloud_demo\.gitignore
文件 29 2019-05-16 23:19 spring_cloud_demo\.git\COMMIT_EDITMSG
文件 314 2019-05-16 18:39 spring_cloud_demo\.git\config
文件 73 2019-05-16 18:39 spring_cloud_demo\.git\desc
文件 109 2019-06-04 14:18 spring_cloud_demo\.git\FETCH_HEAD
文件 23 2019-05-16 18:39 spring_cloud_demo\.git\HEAD
目录 0 2019-05-16 18:39 spring_cloud_demo\.git\hooks\
文件 478 2019-05-16 18:39 spring_cloud_demo\.git\hooks\applypatch-msg.sample
文件 896 2019-05-16 18:39 spring_cloud_demo\.git\hooks\commit-msg.sample
文件 3327 2019-05-16 18:39 spring_cloud_demo\.git\hooks\fsmonitor-watchman.sample
文件 189 2019-05-16 18:39 spring_cloud_demo\.git\hooks\post-update.sample
文件 424 2019-05-16 18:39 spring_cloud_demo\.git\hooks\pre-applypatch.sample
文件 1638 2019-05-16 18:39 spring_cloud_demo\.git\hooks\pre-commit.sample
文件 1348 2019-05-16 18:39 spring_cloud_demo\.git\hooks\pre-push.sample
文件 4898 2019-05-16 18:39 spring_cloud_demo\.git\hooks\pre-reba
文件 544 2019-05-16 18:39 spring_cloud_demo\.git\hooks\pre-receive.sample
文件 1492 2019-05-16 18:39 spring_cloud_demo\.git\hooks\prepare-commit-msg.sample
文件 3610 2019-05-16 18:39 spring_cloud_demo\.git\hooks\update.sample
文件 15568 2019-06-10 13:47 spring_cloud_demo\.git\index
目录 0 2019-05-16 18:39 spring_cloud_demo\.git\info\
文件 240 2019-05-16 18:39 spring_cloud_demo\.git\info\exclude
目录 0 2019-05-16 18:39 spring_cloud_demo\.git\logs\
文件 1285 2019-05-31 22:33 spring_cloud_demo\.git\logs\HEAD
目录 0 2019-05-16 18:39 spring_cloud_demo\.git\logs\refs\
目录 0 2019-05-16 18:39 spring_cloud_demo\.git\logs\refs\heads\
文件 1285 2019-05-31 22:33 spring_cloud_demo\.git\logs\refs\heads\master
目录 0 2019-05-16 18:39 spring_cloud_demo\.git\logs\refs\remotes\
目录 0 2019-05-16 18:45 spring_cloud_demo\.git\logs\refs\remotes\origin\
文件 189 2019-05-16 18:39 spring_cloud_demo\.git\logs\refs\remotes\origin\HEAD
............此处省略1082个文件信息
- 上一篇:VHDL8位全加器
- 下一篇:at24c1024 读写函数,已经过测试
相关资源
- springcloud2.0+版本集成eureka注册中心、
- 深入理解Spring Cloud与微服务构建 方志
- springcloud
- 尚硅谷SpringCloud视频 + 源码 百度网盘
- springcloud微服务视频大全资料视频代码
- SpringCloud Alibaba使用四 - seata分布式事
- springcloud全套视频学习资源.txt
- springCloud demo
- SpringCloud基于SpringBoot 分布式服务实现
- SpringCloudBook-master.zip
- springCloud微服务实战源码.rar
- SpringCloud教程完整讲义
- 黑马乐优商城19年初最新项目(老师的
- 疯狂Spring Cloud微服务架构实战视频教
- 某蚂蚁课堂-第四期-基于SpringCloud构建
- SpringCloud构建电商项目 .txt
- SpringCloud基本框架+完整工程.rar
- Jenkins+Svn+Docker+SpringCloud实现可持续自
- SpringCloud乐优商城项目19天实战
- 阿里云OSS使用demo,阿里云OSS+springCl
- 史上最全SpringCloud微服务视频教程教程
- 想学习的看过来了spring4.0、springboot、
- paascloud数据库脚本
- 尚硅谷SpringCloud周阳大神笔记,我花钱
- 尚硅谷SpringCloud思维导图
- 尚硅谷SpringCloud视频,百度网盘链接,
- spring-cloud-starter-netflix-zuul-2.0.0.RELEAS
- springcloud电商项目
- SpringCloud微服务架构培训.pptx
- 微服务架构与SpringCloud.pptx
评论
共有 条评论