-
大小: 197KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-06-18
- 语言: 其他
- 标签: Springcloud eureka
资源简介
该项目为一个简单的SpringCloud项目demo,开发工具为Idea,项目结构如下:
springcloud_demo:项目名称
eureka-server:服务注册与发现子模块
provider:服务提供子模块
consumer:服务消费子模块
代码片段和文件信息
/*
* Copyright 2007-present the original author or authors.
*
* Licensed 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.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = “0.5.6“;
/**
* 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/“
+ WRAPPER_VERSION + “/maven-wrapper-“ + WRAPPER_VERSION + “.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) {
System.out.println(“- ERROR loading ‘“ + MAVEN_WRAPPER_PROPERTIES_PATH + “‘“);
} finally {
try {
if (mavenWrapperPropertyFileInputStream != null) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-09-11 09:05 springcloud_demo\
目录 0 2020-09-11 09:16 springcloud_demo\.idea\
文件 951 2020-08-28 10:06 springcloud_demo\.idea\compiler.xm
文件 673 2020-09-11 09:09 springcloud_demo\.idea\encodings.xm
文件 814 2020-09-11 09:09 springcloud_demo\.idea\misc.xm
文件 8757 2020-09-11 09:16 springcloud_demo\.idea\workspace.xm
目录 0 2020-09-11 09:05 springcloud_demo\consumer\
文件 395 2020-08-28 10:06 springcloud_demo\consumer\.gitignore
目录 0 2020-09-11 09:05 springcloud_demo\consumer\.mvn\
目录 0 2020-09-11 09:05 springcloud_demo\consumer\.mvn\wrapper\
文件 4951 2020-08-28 10:06 springcloud_demo\consumer\.mvn\wrapper\MavenWrapperDownloader.java
文件 50710 2020-08-28 10:06 springcloud_demo\consumer\.mvn\wrapper\maven-wrapper.jar
文件 218 2020-08-28 10:06 springcloud_demo\consumer\.mvn\wrapper\maven-wrapper.properties
文件 631 2020-08-28 10:06 springcloud_demo\consumer\HELP.md
文件 10070 2020-08-28 10:06 springcloud_demo\consumer\mvnw
文件 6608 2020-08-28 10:06 springcloud_demo\consumer\mvnw.cmd
文件 2426 2020-08-28 11:01 springcloud_demo\consumer\pom.xm
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\java\
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\java\com\
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\java\com\example\
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\java\com\example\consumer\
文件 1028 2020-08-28 11:44 springcloud_demo\consumer\src\main\java\com\example\consumer\ConsumerApplication.java
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\java\com\example\consumer\controller\
文件 1026 2020-08-27 17:16 springcloud_demo\consumer\src\main\java\com\example\consumer\controller\ConsumerController.java
目录 0 2020-09-11 09:05 springcloud_demo\consumer\src\main\java\com\example\consumer\service\
文件 641 2020-08-28 11:05 springcloud_demo\consumer\src\main\java\com\example\consumer\service\ConsumerService.java
文件 492 2020-08-28 11:09 springcloud_demo\consumer\src\main\java\com\example\consumer\service\ConsumerService1.java
目录 0 2020-09-11 09:10 springcloud_demo\consumer\src\main\resources\
文件 220 2020-09-11 09:10 springcloud_demo\consumer\src\main\resources\application.yml
............此处省略117个文件信息
- 上一篇:excel进销存系统
- 下一篇:sumprepo_duc2004
相关资源
- springboot+springcloud教程视频.txt
- 蚂蚁课堂第四期结业项目SpringCloud构建
- SpringCloudAlibabaDemo02.zip
- 尚硅谷springcloud课程源码,springcloud
- 小马哥微服务实践.txt
- springboot springcloud 构建 微服务
- 尚硅谷最新springcloud高清视频
- 微服务的搭建
- springcloud与docker微服务架构实战配套代
- springcloud+eureka+ribbon多服务负载均衡
- springcloud 一整套,解压就能用
- springcloud+skywalkingdemo.zip
- springcloud例子89789
- SpringCloud与Docker微服务架构实战-[百度
- springcloud微服务项目架构基础demo
- springcloud2.0+版本集成eureka注册中心、
- 深入理解Spring Cloud与微服务构建 方志
- springcloud
- spring-cloud demo
- 尚硅谷SpringCloud视频 + 源码 百度网盘
- springcloud微服务视频大全资料视频代码
- SpringCloud Alibaba使用四 - seata分布式事
- springcloud全套视频学习资源.txt
- springCloud demo
- SpringCloud基于SpringBoot 分布式服务实现
- SpringCloudBook-master.zip
- springCloud微服务实战源码.rar
- SpringCloud教程完整讲义
- 黑马乐优商城19年初最新项目(老师的
- 疯狂Spring Cloud微服务架构实战视频教
评论
共有 条评论