/*
* 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) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
基于springboot的图书管理系统源码+数据库.zip
共151个文件
xml:84个
jpg:18个
java:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 81 浏览量
2022-11-28
15:07:27
上传
评论 3
收藏 3.96MB ZIP 举报
温馨提示
基于springboot的图书管理系统源码+数据库.zip已获导师指导并通过的高分项目。下载即可使用,无需修改,确保可以直接运行! 本项目是一套基于springboot的图书管理系统,主要针对计算机相关专业的正在做毕设的学生和需要项目实战的Java学习者。也可作为课程设计、期末大作业 包含:项目源码、数据库脚本、软件目实战练习的工具、项目说明等,该项目可以直接作为毕设使用。 项目都经过严格调试,确保可以运行! 技术实现 后台框架:SpringBoot 数据库:MySQL 开发环境:JDK、IDEA 该系统功能完善、界面美观、操作简单、功能齐全、管理便捷,具有很高的实际应用价值。基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管理系统基于springboot的图书管
资源推荐
资源详情
资源评论
收起资源包目录
基于springboot的图书管理系统源码+数据库.zip (151个子文件)
Books.class 7KB
BooksController.class 6KB
Student.class 5KB
ApplicationConfig.class 3KB
Result.class 2KB
StudentController.class 2KB
BooksApplicationTests.class 2KB
ResultCode.class 1KB
BooksApplication.class 738B
StudentServiceImpl.class 717B
BooksServiceImpl.class 703B
StudentMapper.class 394B
BooksMapper.class 388B
StudentService.class 324B
BooksService.class 318B
box.css 675B
box.css 675B
index.html 16KB
index.html 16KB
index.html 11KB
index.html 11KB
books.iml 10KB
maven-wrapper.jar 50KB
MavenWrapperDownloader.java 5KB
BooksController.java 4KB
Result.java 1KB
ApplicationConfig.java 1KB
StudentController.java 1KB
Books.java 1KB
Student.java 1KB
BooksApplicationTests.java 816B
StudentServiceImpl.java 543B
BooksServiceImpl.java 527B
ResultCode.java 376B
StudentMapper.java 373B
BooksMapper.java 365B
StudentService.java 324B
BooksService.java 317B
BooksApplication.java 308B
1638669310634hlm.jpg 520KB
1638669351561sgyy.jpg 193KB
1638669122186wallpaper3.jpg 177KB
wallpaper3.jpg 177KB
1638619397424wallpaper3.jpg 177KB
1638669205875xyj.jpg 93KB
1638623050155wallpaper1.jpg 80KB
book1_cover.jpg 80KB
1638623906335wallpaper1.jpg 80KB
1638619096295wallpaper4.jpg 61KB
wallpaper4.jpg 61KB
1638669142367wallpaper4.jpg 61KB
1638668189207wallpaper2.jpg 51KB
wallpaper2.jpg 51KB
1638619751629wallpaper2.jpg 51KB
1638669172848cx.jpg 40KB
1638623371289code-wallpaper-22.jpg 36KB
1638669187725jw.jpg 19KB
front.PNG 1014KB
2.PNG 666KB
default.PNG 180KB
back.PNG 125KB
top.png 501B
top.png 501B
maven-wrapper.properties 218B
books.sql 6KB
workspace.xml 12KB
uiDesigner.xml 9KB
pom.xml 2KB
compiler.xml 849B
Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_13_0.xml 763B
Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_6_1.xml 740B
Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml 727B
Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_13_0.xml 722B
Maven__org_springframework_boot_spring_boot_starter_logging_2_6_1.xml 719B
Maven__org_springframework_boot_spring_boot_starter_tomcat_2_6_1.xml 712B
Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_13_0.xml 708B
Maven__org_springframework_boot_spring_boot_autoconfigure_2_6_1.xml 705B
Maven__org_springframework_boot_spring_boot_starter_json_2_6_1.xml 698B
Maven__org_springframework_boot_spring_boot_starter_jdbc_2_6_1.xml 698B
Maven__org_springframework_boot_spring_boot_starter_test_2_6_1.xml 698B
Maven__org_springframework_boot_spring_boot_starter_web_2_6_1.xml 691B
Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_55.xml 687B
Maven__com_fasterxml_jackson_core_jackson_annotations_2_13_0.xml 678B
Maven__com_baomidou_mybatis_plus_boot_starter_3_4_3_3.xml 671B
Maven__org_springframework_boot_spring_boot_starter_2_6_1.xml 663B
Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml 660B
Maven__org_junit_platform_junit_platform_commons_1_8_1.xml 660B
Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml 660B
Maven__com_baomidou_mybatis_plus_annotation_3_4_3_3.xml 657B
Maven__com_fasterxml_jackson_core_jackson_databind_2_13_0.xml 657B
Maven__org_junit_platform_junit_platform_engine_1_8_1.xml 653B
Maven__com_alibaba_druid_spring_boot_starter_1_2_8.xml 653B
Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_55.xml 652B
Maven__com_baomidou_mybatis_plus_extension_3_4_3_3.xml 650B
Maven__org_springframework_boot_spring_boot_test_2_6_1.xml 642B
Maven__org_junit_jupiter_junit_jupiter_params_5_8_1.xml 642B
Maven__org_junit_jupiter_junit_jupiter_engine_5_8_1.xml 642B
Maven__javax_annotation_javax_annotation_api_1_3_2.xml 638B
Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_55.xml 638B
Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml 638B
共 151 条
- 1
- 2
资源评论
- weixin_448473902023-05-12超赞的资源,感谢资源主分享,大家一起进步!
程序员张小妍
- 粉丝: 1w+
- 资源: 2599
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功