我正在使用 spring-xd-1.0.0.M6。
我尝试将 mysql DB 配置为 Spring-xd 的接收器
我关注 - http://theblasfrompas.blogspot.in/2014/01/springxd-filetail-input-ingestion-jdbc.html
我把我的 jdbc.properties 文件 - 在
1)spring-xd-1.0.0.M6/xd/modules/sink/jdbc/config
位置
2)我把mysql连接器罐子放在
spring-xd-1.0.0.M6/xd/lib
我创建一个文件 - input.txt 并将其放在文件夹中 -/<some path>/temp/input.txt
该文件包含
{"id":"1","name":"pas"}
{"id":"2","name":"lucia"}
{"id":"3","name":"lucas"}
{"id":"4","name":"siena"}
jdbc 文件包含以下信息。
driverClass=com.mysql.jdbc.Driver
url=jdbc:mysql://127.0.0.1:3306/spring_xd
username=root
password=root
现在在 XD shell 我执行以下
stream create --name filetest --definition "tail --name='/<some path>/temp/input.txt' | jdbc --columns='id,name'" --deploy
我的 my-sql 数据库表名是 - file_test,它有 2 列 id 和 name - 与中提到的相同Example Link
但我明白了
Command failed org.springframework.xd.rest.client.impl.SpringXDException: Error with option(s) for module jdbc of type sink:
columns: option named 'columns' is not supported
如果我指定 tableName 参数,我也会得到 ..
tableName: option named 'tableName' is not supported
我也参考 - https://github.com/spring-projects/spring-xd/pull/621
但线索少了....最新的 Spring-xd 版本