-
大小: 75KB文件类型: .rar金币: 1下载: 0 次发布日期: 2021-05-10
- 语言: 数据库
- 标签: SpringBoot2+
资源简介
采用最新版本SpringBoot2+MyBatis+Mysql+Apollo+Redis+Rabbitmq集成例子
代码片段和文件信息
/*
* 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) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1742 2020-03-12 18:16 SpringBootProject\.classpath
文件 333 2020-03-12 18:05 SpringBootProject\.gitignore
文件 50710 2020-03-12 18:05 SpringBootProject\.mvn\wrapper\maven-wrapper.jar
文件 218 2020-03-12 18:05 SpringBootProject\.mvn\wrapper\maven-wrapper.properties
文件 4942 2020-03-12 18:05 SpringBootProject\.mvn\wrapper\MavenWrapperDownloader.java
文件 722 2020-03-12 18:14 SpringBootProject\.project
文件 124 2020-03-12 18:16 SpringBootProject\.settings\org.eclipse.core.resources.prefs
文件 69 2020-03-12 18:13 SpringBootProject\.settings\org.eclipse.jdt.apt.core.prefs
文件 553 2020-03-12 18:13 SpringBootProject\.settings\org.eclipse.jdt.core.prefs
文件 97 2020-03-12 18:05 SpringBootProject\.settings\org.eclipse.m2e.core.prefs
文件 65 2020-03-12 18:13 SpringBootProject\.settings\org.springfr
文件 3542 2020-03-13 16:32 SpringBootProject\pom.xm
文件 2253 2020-03-12 19:05 SpringBootProject\src\main\java\com\yl\config\DataSourceConfig.java
文件 3869 2020-03-13 11:46 SpringBootProject\src\main\java\com\yl\config\RabbitmqConfig.java
文件 2292 2020-03-13 16:35 SpringBootProject\src\main\java\com\yl\config\XxlJobConfig.java
文件 978 2020-03-13 11:40 SpringBootProject\src\main\java\com\yl\controller\StudentController.java
文件 155 2020-03-12 19:08 SpringBootProject\src\main\java\com\yl\dao\StudentDao.java
文件 310 2020-03-12 19:08 SpringBootProject\src\main\java\com\yl\entity\Student.java
文件 1306 2020-03-13 16:41 SpringBootProject\src\main\java\com\yl\job\SampleXxlJob.java
文件 491 2020-03-12 19:22 SpringBootProject\src\main\java\com\yl\service\impl\StudentServiceImpl.java
文件 163 2020-03-12 19:20 SpringBootProject\src\main\java\com\yl\service\StudentService.java
文件 572 2020-03-13 11:08 SpringBootProject\src\main\java\com\yl\SpringBootProjectApplication.java
文件 1411 2020-03-12 19:04 SpringBootProject\src\main\java\com\yl\vfs\SpringBootVFS.java
文件 1534 2020-03-13 16:50 SpringBootProject\src\main\resources\application.properties
文件 5330 2020-03-12 18:37 SpringBootProject\src\main\resources\log4j2-spring.xm
文件 298 2020-03-12 19:25 SpringBootProject\src\main\resources\mapper\student.xm
文件 1534 2020-03-13 18:43 SpringBootProject\target\classes\application.properties
文件 2754 2020-03-13 16:32 SpringBootProject\target\classes\com\yl\config\DataSourceConfig.class
文件 1033 2020-03-13 16:32 SpringBootProject\target\classes\com\yl\config\RabbitmqConfig$1.class
文件 5054 2020-03-13 16:32 SpringBootProject\target\classes\com\yl\config\RabbitmqConfig.class
............此处省略58个文件信息
评论
共有 条评论