-
大小: 68KB文件类型: .zip金币: 2下载: 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个文件信息
相关资源
- SQLTOOLS2.0汉化版(1433连接工具)
- mysql 数据库连接池
- 实现Oracle数据库每天异地自动备份
- windows下oracle数据库备份压缩删除历史
- 用Linux命令完成Oracle自动物理备份
- 破解oracle密码的工具orabf-v0[1].7.6.zip
-
Oracle向Syba
se ASE迁移指南 - 用NetBackup恢复Oracle数据库到异机
- 认识NBU备份Oracle时Code 29错误的解答
- Backup_Exec_ORACLE_RAC_数据库备份恢复指导
- 通过Backup Exec实施Oracle来灾难恢复
- 通过Backup Exec实施Oracle灾难恢复
- Oracle中空间管理对系统性能的影响
- Oracle 10g数据库的安全性和身份管理
- Oracle RAC恢复到单机方案-仅有一个全备
- oracle数据库比对工具
- Oracle非常好的入门、深入PPT
- Oracle数据库基础知识(华为内部培训
- 非常好的Oracle课件
- Oracle产品助力青岛啤酒发展
- Sun/Oracle9i RAC方案在英国BACS公司的应用
- Oracle Linux 6.8 x86_64
- oracle 到mysql转换工具
- 利用Oracle复制技术的灾备解决方案
- Oracle中的优化器如何进行评估优化
- 如何选择Oracle优化器使你事半功倍
- Oracle中文API
- oraclesql高级编程 随书脚本
- 三方法解决SQL Server与云端数据库连接
- oci.dll of Oracle11g
评论
共有 条评论