This project is a fork of https://github.com/lightbend/config, its mainly purpose is to solve these problems :
* [Keep config item order in ConfigObject](https://github.com/lightbend/config/issues/365)
* Change path token separator from `"."` to `"->""`.
* Added `parseObjectForseatunnel()` to parse config objects in `input`, `filter`, `output` for seatunnel.
* Change package name to avoid implementation conflict when using this code with the official typesafe config used by Apache Flink.
If you want to do some test, please see:
* Test Main Class: seatunnel-config/src/test/java/org/apache/seatunnel/config/CompleteTests.java
* Config File Example: seatunnel-config/src/test/resources/seatunnel/variables.conf
If you want to Package the jar:
```
git checkout garyelephant.fea.changed_package_name
rm -rf ./target
rm -rf ./config/target
sbt package
```
then you can find `config-1.3.3.jar` in `./config/target/`
---
Configuration library for JVM languages.
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.typesafe/config/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.typesafe/config)
[![Build Status](https://travis-ci.org/lightbend/config.svg?branch=master)](https://travis-ci.org/lightbend/config)
If you have questions or are working on a pull request or just
curious, please feel welcome to join the chat room:
[![Join chat https://gitter.im/lightbend/config](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lightbend/config?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Overview
- implemented in plain Java with no dependencies
- supports files in three formats: Java properties, JSON, and a
human-friendly JSON superset
- merges multiple files across all formats
- can load from files, URLs, or classpath
- good support for "nesting" (treat any subtree of the config the
same as the whole config)
- users can override the config with Java system properties,
`java -Dmyapp.foo.bar=10`
- supports configuring an app, with its framework and libraries,
all from a single file such as `application.conf`
- parses duration and size settings, "512k" or "10 seconds"
- converts types, so if you ask for a boolean and the value
is the string "yes", or you ask for a float and the value is
an int, it will figure it out.
- JSON superset features:
- comments
- includes
- substitutions (`"foo" : ${bar}`, `"foo" : Hello ${who}`)
- properties-like notation (`a.b=c`)
- less noisy, more lenient syntax
- substitute environment variables (`logdir=${HOME}/logs`)
- API based on immutable `Config` instances, for thread safety
and easy reasoning about config transformations
- extensive test coverage
This library limits itself to config files. If you want to load
config from a database or something, you would need to write some
custom code. The library has nice support for merging
configurations so if you build one from a custom source it's easy
to merge it in.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Essential Information](#essential-information)
- [License](#license)
- [Binary Releases](#binary-releases)
- [Release Notes](#release-notes)
- [API docs](#api-docs)
- [Bugs and Patches](#bugs-and-patches)
- [Build](#build)
- [Using the Library](#using-the-library)
- [API Example](#api-example)
- [Longer Examples](#longer-examples)
- [Immutability](#immutability)
- [Schemas and Validation](#schemas-and-validation)
- [Standard behavior](#standard-behavior)
- [Note about resolving substitutions in `reference.conf` and `application.conf`](#note-about-resolving-substitutions-in-referenceconf-and-applicationconf)
- [Merging config trees](#merging-config-trees)
- [How to handle defaults](#how-to-handle-defaults)
- [Understanding `Config` and `ConfigObject`](#understanding-config-and-configobject)
- [ConfigBeanFactory](#configbeanfactory)
- [Using HOCON, the JSON Superset](#using-hocon-the-json-superset)
- [Features of HOCON](#features-of-hocon)
- [Examples of HOCON](#examples-of-hocon)
- [Uses of Substitutions](#uses-of-substitutions)
- [Factor out common values](#factor-out-common-values)
- [Inheritance](#inheritance)
- [Optional system or env variable overrides](#optional-system-or-env-variable-overrides)
- [Concatenation](#concatenation)
- [`reference.conf` can't refer to `application.conf`](#referenceconf-cant-refer-to-applicationconf)
- [Miscellaneous Notes](#miscellaneous-notes)
- [Debugging Your Configuration](#debugging-your-configuration)
- [Supports Java 8 and Later](#supports-java-8-and-later)
- [Rationale for Supported File Formats](#rationale-for-supported-file-formats)
- [Other APIs (Wrappers, Ports and Utilities)](#other-apis-wrappers-ports-and-utilities)
- [Guice integration](#guice-integration)
- [Java (yep!) wrappers for the Java library](#java-yep-wrappers-for-the-java-library)
- [Scala wrappers for the Java library](#scala-wrappers-for-the-java-library)
- [Clojure wrappers for the Java library](#clojure-wrappers-for-the-java-library)
- [Kotlin wrappers for the Java library](#kotlin-wrappers-for-the-java-library)
- [Scala port](#scala-port)
- [Ruby port](#ruby-port)
- [Puppet module](#puppet-module)
- [Python port](#python-port)
- [C++ port](#c-port)
- [JavaScript port](#javascript-port)
- [C# port](#c-port-1)
- [Linting tool](#linting-tool)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Essential Information
### Binary Releases
Version 1.2.1 and earlier were built for Java 6, while newer
versions (1.3.0 and above) will be built for Java 8.
You can find published releases on Maven Central.
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.3.2</version>
</dependency>
sbt dependency:
libraryDependencies += "com.typesafe" % "config" % "1.3.2"
Link for direct download if you don't use a dependency manager:
- https://mvnrepository.com/artifact/com.typesafe/config
### Release Notes
Please see NEWS.md in this directory,
https://github.com/lightbend/config/blob/master/NEWS.md
### API docs
- Online: https://lightbend.github.io/config/latest/api/
- also published in jar form
- consider reading this README first for an intro
- for questions about the `.conf` file format, read
[HOCON.md](https://github.com/lightbend/config/blob/master/HOCON.md)
in this directory
### Bugs and Patches
Report bugs to the GitHub issue tracker. Send patches as pull
requests on GitHub.
Before we can accept pull requests, you will need to agree to the
Typesafe Contributor License Agreement online, using your GitHub
account - it takes 30 seconds. You can do this at
https://www.lightbend.com/contribute/cla
Please see
[CONTRIBUTING](https://github.com/lightbend/config/blob/master/CONTRIBUTING.md)
for more including how to make a release.
### Build
The build uses sbt and the tests are written in Scala; however,
the library itself is plain Java and the published jar has no
Scala dependency.
## Using the Library
### API Example
import com.typesafe.config.ConfigFactory
Config conf = ConfigFactory.load();
int bar1 = conf.getInt("foo.bar");
Config foo = conf.getConfig("foo");
int bar2 = foo.getInt("bar");
### Longer Examples
See the examples in the `examples/` [directory](https://github.com/lightbend/config/tree/master/examples).
You can run these from the sbt console with the commands `project
config-simple-app-java` and then `run`.
In brief, as shown in the examples:
- libraries should use a `Config` instance provided by the app,
if any, and use `ConfigFactory.load()` if no special `Config`
is
没有合适的资源?快使用搜索试试~ 我知道了~
SeaTunnel 是一个非常易用的支持海量数据实时同步的超高性能分布式数据集成平台
共475个文件
java:194个
scala:63个
xml:52个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 65 浏览量
2023-11-11
08:50:32
上传
评论
收藏 831KB ZIP 举报
温馨提示
SeaTunnel 是一个非常易用的支持海量数据实时同步的超高性能分布式数据集成平台,每天可以稳定高效同步万亿级数据,已在数百家公司生产上使用。简单易用,灵活配置,无需开发,实时流式处理,离线多源数据分析,高性能、海量数据处理能力,模块化和插件化,易于扩展,支持利用 SQL 做数据处理和聚合,支持 Spark Structured Streaming,支持 Spark 2.x
资源推荐
资源详情
资源评论
收起资源包目录
SeaTunnel 是一个非常易用的支持海量数据实时同步的超高性能分布式数据集成平台 (475个子文件)
org.apache.seatunnel.flink.BaseFlinkSink 46B
org.apache.seatunnel.flink.BaseFlinkSink 44B
org.apache.seatunnel.flink.BaseFlinkSink 42B
org.apache.seatunnel.flink.BaseFlinkSink 41B
org.apache.seatunnel.flink.BaseFlinkSink 40B
org.apache.seatunnel.flink.BaseFlinkSink 40B
org.apache.seatunnel.flink.BaseFlinkSource 51B
org.apache.seatunnel.flink.BaseFlinkSource 50B
org.apache.seatunnel.flink.BaseFlinkSource 47B
org.apache.seatunnel.flink.BaseFlinkSource 46B
org.apache.seatunnel.flink.BaseFlinkSource 45B
org.apache.seatunnel.flink.BaseFlinkSource 45B
org.apache.seatunnel.flink.BaseFlinkTransform 54B
org.apache.seatunnel.flink.BaseFlinkTransform 54B
org.apache.seatunnel.flink.BaseFlinkTransform 42B
org.apache.seatunnel.flink.BaseFlinkTransform 40B
org.apache.seatunnel.spark.BaseSparkSink 73B
org.apache.seatunnel.spark.BaseSparkSink 46B
org.apache.seatunnel.spark.BaseSparkSink 42B
org.apache.seatunnel.spark.BaseSparkSink 40B
org.apache.seatunnel.spark.BaseSparkSink 39B
org.apache.seatunnel.spark.BaseSparkSink 37B
org.apache.seatunnel.spark.BaseSparkSink 37B
org.apache.seatunnel.spark.BaseSparkSink 37B
org.apache.seatunnel.spark.BaseSparkSink 37B
org.apache.seatunnel.spark.BaseSparkSink 37B
org.apache.seatunnel.spark.BaseSparkSink 37B
org.apache.seatunnel.spark.BaseSparkSink 36B
org.apache.seatunnel.spark.BaseSparkSink 36B
org.apache.seatunnel.spark.BaseSparkSource 84B
org.apache.seatunnel.spark.BaseSparkSource 48B
org.apache.seatunnel.spark.BaseSparkSource 46B
org.apache.seatunnel.spark.BaseSparkSource 46B
org.apache.seatunnel.spark.BaseSparkSource 42B
org.apache.seatunnel.spark.BaseSparkSource 41B
org.apache.seatunnel.spark.BaseSparkSource 40B
org.apache.seatunnel.spark.BaseSparkSource 38B
org.apache.seatunnel.spark.BaseSparkSource 38B
org.apache.seatunnel.spark.BaseSparkSource 38B
org.apache.seatunnel.spark.BaseSparkSource 38B
org.apache.seatunnel.spark.BaseSparkSource 38B
org.apache.seatunnel.spark.BaseSparkTransform 42B
org.apache.seatunnel.spark.BaseSparkTransform 41B
org.apache.seatunnel.spark.BaseSparkTransform 40B
mvnw.cmd 6KB
test04.conf 18KB
test05.conf 5KB
beanconfig01.conf 4KB
test01.conf 3KB
properties-style.conf 2KB
comments.conf 2KB
substitutions.conf 2KB
test03.conf 2KB
no-commas.conf 2KB
variables.conf 2KB
omit-colons.conf 2KB
equals.conf 2KB
.scalafmt.conf 1KB
unquoted.conf 1KB
path-keys.conf 1KB
no-root-braces.conf 1KB
validate-invalid.conf 1KB
validate-reference.conf 1KB
application.conf 1KB
triple-quotes.conf 1KB
application.conf 1KB
test02.conf 1KB
test03-included.conf 1022B
test09.conf 1017B
test08.conf 1008B
test06.conf 1006B
path-keys-weird-whitespace.conf 1002B
path-keys.conf 964B
test10.conf 938B
include-from-list.conf 930B
test11.conf 924B
file-include.conf 922B
test07.conf 908B
includes.conf 898B
foo.conf 888B
onclasspath.conf 863B
missing-substitutions.conf 850B
a.conf 849B
foo.conf 820B
cycle.conf 803B
c.conf 797B
bom.conf 795B
bar-file.conf 794B
bar.conf 789B
baz.conf 789B
1.conf 788B
b_2.conf 786B
a_1.conf 786B
DISCLAIMER 552B
Dockerfile 1KB
Dockerfile 1KB
.env 836B
.gitignore 374B
.gitkeep 0B
package.html 4KB
共 475 条
- 1
- 2
- 3
- 4
- 5
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6735
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功