-
大小: 68KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-05-20
- 语言: 数据库
- 标签: SpringCloud Oracle 连接 数据库 SpringBoot
资源简介
初学SpringCloud简单配置Oracle数据库,从Oracle数据库中获取数据
代码片段和文件信息
/*
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
http://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) {
System
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1268 2019-02-18 15:31 .classpath
文件 269 2019-02-18 06:23 .gitignore
目录 0 2019-02-19 09:22 .mvn\
目录 0 2019-02-19 09:22 .mvn\wrapper\
文件 48337 2019-02-18 06:23 .mvn\wrapper\maven-wrapper.jar
文件 116 2019-02-18 06:23 .mvn\wrapper\maven-wrapper.properties
文件 4624 2019-02-18 06:23 .mvn\wrapper\MavenWrapperDownloader.java
目录 0 2019-02-19 09:36 .myeclipse\
目录 0 2019-02-19 09:36 .myeclipse\profiler\
文件 1740 2019-02-19 09:48 .myeclipse\profiler\MySpringCloudProviderUserApplication.xm
文件 1146 2019-02-19 09:31 .project
目录 0 2019-02-19 09:22 .settings\
文件 155 2019-02-18 15:31 .settings\org.eclipse.core.resources.prefs
文件 356 2019-02-18 15:31 .settings\org.eclipse.jdt.core.prefs
文件 90 2019-02-18 15:27 .settings\org.eclipse.m2e.core.prefs
文件 65 2019-02-18 15:34 .settings\org.springfr
目录 0 2019-02-19 09:22 bin\
文件 9113 2019-02-18 06:23 mvnw
文件 5810 2019-02-18 06:23 mvnw.cmd
文件 1601 2019-02-18 15:44 pom.xm
目录 0 2019-02-19 09:22 src\
目录 0 2019-02-19 09:22 src\main\
目录 0 2019-02-19 09:22 src\main\java\
目录 0 2019-02-19 09:22 src\main\java\com\
目录 0 2019-02-19 09:22 src\main\java\com\nxt\
目录 0 2019-02-19 09:22 src\main\java\com\nxt\cloud\
目录 0 2019-02-19 09:22 src\main\java\com\nxt\cloud\mySpringCloudprovideruser\
目录 0 2019-02-19 09:22 src\main\java\com\nxt\cloud\mySpringCloudprovideruser\controller\
文件 703 2019-02-19 09:39 src\main\java\com\nxt\cloud\mySpringCloudprovideruser\controller\UserController.java
目录 0 2019-02-19 09:22 src\main\java\com\nxt\cloud\mySpringCloudprovideruser\entity\
文件 1285 2019-02-19 09:32 src\main\java\com\nxt\cloud\mySpringCloudprovideruser\entity\TestUser.java
............此处省略39个文件信息
相关资源
- Oracle数据库基础教程:入门其实很简
- fastReport连接mysql插件
- 甲骨论相克军老师oracle45集配套文档
- 在用isql连接数据库的时候,比较常见
- oracle小型超市管理系统
- oracle统一社会信用代码校验函数
- REDHAT6.9 kmod-oracleasm rpm包
- oracle ebs系统多应用节点安装手册
- 用myeclipse作的第一个hibernate连接mysq
- Oracle11g数据库基础教程第2版习题答案
- kettle 从oracle数据库导数据到hive 表
- kmod-oracle 所有redhat版本全部支持(6
- Oracle和SQL Server的一些区别(函数和存
- oracle11.2.0.4全套安装包(珍藏版).t
- delphi对oracle数据库增删改查操作
- Oracle数据库DBA面试题50道及答案
- Qt5.4.Oracle11g驱动
- Windows2008 server下安装64位ORACLE 10g
- Oracle 10.2.0.5补丁windows版32位及64位
- oracle 8i for windows&linux; linux81701.tar
- win-oracle10g-10.2.0.5补丁 p8202632_10205_MS
- springcloud+skywalkingdemo
- Oracle 11G DMP导入到10G
- 6个实验参考答案-大型数据库系统.d
- 数据库文件酒店预定系统
- instantclient-sqlplus-nt-12.2.0.1.0
- Qt5.9.1+OCI驱动
- Redhat Linux 6.8 Kmod for oracle ASM
- 直接用oracle存储过程完成基于socket的
- Oracle PL/SQL常用47个工具包
评论
共有 条评论