Giter Site home page Giter Site logo

configureable-client's Introduction

configureable-client

configureable-client是Databus( https://github.com/linkedin/databus )统一消费端的简易封装,提供配置文件的方式组织消费逻辑。

用法

配置 client.properties 设置relay的相关配置。

配置 db.propeties 数据源,目前客户端只支持单一数据库的导入,只配置一个数据源。

在 configure.xml 文件中定义消费的字段即可,区分Oracle和Mysql两种逻辑(Oracle使用Merge into导入,Mysql使用Replace into导入)。

<source name="com.lefu.boss.goods" id="40" table="goods" db="oracle" logEnable="true">
	<fields>
		<field name="id" alias="key" type="long" primaryKey="true"/>
		<field name="name"/>
		<field name="price" type="double"/>
	</fields>
</source>

id:对应到relay配置文件中的数据源ID

table:目标表名称

db:oracle/mysql

logEnable:是否输出SQL更新日志

field中必须指定一个主键,并且唯一

field中的type是java中的对象,基础类型/class,默认是java.lang.String

field中alias是对源表中导出的字段名称与目标表不一致时的映射,alias的值代表源表导出的字段名称

客户端只会执行与field定义相关的字段多余的字段会被忽略

configureable-client's People

Contributors

leo27lijiang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.