I am new to Spring Cloud Data Flow. Just trying to follow the official demo HTTP to MySQL I created a MySQL database (ds_dev) and a table (names) with:
create table names
(
name varchar(255) null
);
I followed the instructions to create a stream with:
stream create --name mysqlstream --definition "http --server.port=9010 | jdbc --tableName=names --columns=name --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver --spring.datasource.url='jdbc:mysql://host.docker.internal:3306/ds_dev' --spring.datasource.username=root --spring.datasource.password='rootpw'" --deploy
Then I tried to post some requests with :
http post --contentType 'application/json' --target http://172.18.0.5:9010 --data "{\"name\": \"Foo\"}"
However, instead of having a new entry "Foo" inserted into the table, I got a Null value inserted instead. The jdbc log is like this:
2019-08-06 19:10:10.838 INFO 598 --- [container-0-C-1] o.s.c.s.a.j.sink.JdbcSinkConfiguration : Could not find value for column 'name': EL1008E: Property or field 'name' cannot be found on object of type 'byte[]' - maybe not public or not valid?
Any suggestions? Thanks in advance!