This is the supporting example application for the db2-dev-env project. Showing how simple it could be talking back to our legacy DB2 instance running on a mainframe using a lite weight framework like Java spark.
I'm on a Mac using Homebrew goodness...
• Java 1.8
brew cask install java
• Gradle
brew install gradle
• vagrant trigger plugin
vagrant plugin install vagrant-triggers
• A running DB2 instance
Follow the instructions here... db2-dev-env
or
This can be run with your own instance of DB2, just update the params in the build.gradle file or run the jar with manual arguments
Create a libs folder and download the IBM JDBC driver from IBM db2jcc4.jar and place it in the lib folder.
If outside the db2-dev-env on your OS
gradle runJar
or
If inside the db2-dev-env
gradle runDevJar
or
Update the runJar task in the build.gradle file to suit your environment.
If running the API outside the db2-dev-env
http://localhost:7654/staff?name=Sanders
Look here for example data in the IBM sample database
As this is using log4j you can watch the print out in the console.