This is Spring Boot service that allows to call SQL commands against multiple data sources over HTTP.
- Multiple data-sources inside a single running application.
- Dynamic HTTP url and body based on Spring Application properties.
- Setup properties using the samples from tests
- Build an HTTP request using the samples
The url pattern is: /procedures/{datasource}/{procedureName}
Where:
- datasource - a value from the
operations.dataSource
keys of application properties - procedureName - a value from
operations.procedures
keys of application properties
The request body is JSON and each field will be mapped by the JSON field name with operations.procedures.your-procedure.parameters[keys]
For example:
#property
lastName:
key: last_name
type: VARCHAR
Requires in the body:
{
"lastName": "The Great"
}
The value of JSON field will be used as SQL named query parameters:
insert into cat (last_name) values (:last_name)
./gradlew clean build
Terminal:
./gradlew bootRun --args='--spring.profiles.active=dev'
Or use Intellij Idea Run configurations from the run directory for Idea 2019.3+
- javadoc - generate Spring Boot Configuration properties metadata to the build directory
- Would be interesting to see SQL execution check mechanism, i.e. put something to the properties and check it after the execution.
- Spring Cloud Config Server and Spring Cloud eureka configurable integration
- Documentation on application properties
- Logging of database queries
- Kubernetes setup
- integration test sourceSet refactor
- Write test for multiple database: blocked by the issue with same bean names in auto configurations
datasourceDependencyPostProcessor