Out of the box Spring Cloud Data Flow offers an embedded instance of the H2 database. The H2 is good for development purposes but is not recommended for production use.
To add a driver for the database that will store the Task Execution information, a dependency for the driver will need to be added to a maven pom file and the Spring Cloud Data Flow will need to be rebuilt. Since Spring Cloud Data Flow is comprised of an SPI for each environment it supports, please review the SPI’s documentation on which POM should be updated to add the dependency and how to build. This document will cover how to setup the dependency for local SPI.
dependencies
section add the dependency for the database driver required. In
the sample below postgresql has been chosen.<dependencies> ... <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> </dependency> ... </dependencies>
To configure the datasource Add the following properties to the dataflow-server.yml or via environment variables:
For example adding postgres would look something like this:
export spring_datasource_url=jdbc:postgresql://localhost:5432/mydb export spring_datasource_username=myuser export spring_datasource_password=mypass export spring_datasource_driver-class-name="org.postgresql.Driver"
spring: datasource: url: jdbc:postgresql://localhost:5432/mydb username: myuser password: mypass driver-class-name:org.postgresql.Driver