Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

philips-labs/java-cfenv-boot-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-cfenv-boot demo

Example Kotlin project that uses java-cfenv-boot to to autoconfigure datasources from HSDP RDS service broker

The example is geared towards PostgreSQL. Other databases should be trivial to configure.

details

The HSDPPostgresEnvProcessor class demonstrates how to implement CfEnvProcessor in order to discover and use the service broker properties.

It's crucial to add your custom class to spring.factories. In this example the entry looks like:

io.pivotal.cfenv.spring.boot.CfEnvProcessor=com.terrakube.cfdemo.HSDPPostgresEnvProcessor

compiling

./mvnw package -DskipTests=true

deployment

Use the manifest.example.yml as template. The template assumes you have compiled with Java 11.

Once deployed you can navigate to the app and it will show a string with the result of the PostgreSQL now() method, confirming the app is connected to your PostgreSQL database.

hello world: 11 Aug 2020 02:01:09PM

license

License is MIT

About

Example project implementing CfEnvProcessor to work with NIH RDS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages