An example of project that uses Chemistry Development Kit (CDK) and provides a REST API.
To start it in IDE, run Starter and open your browser at http://localhost:8080/api/mw/CCC
To compile and start from the command line, run mvn clean package
followed by java -jar target/cdk-rest-template-1.0-SNAPSHOT-shaded.jar
.
Project structure:
- CdkApi is where the actual API is
- web-app-context.xml is the main app context where the beans can be defined
- CdkApiTest to test your API
If you want to package the resulting jar file as a Docker Image:
cp target/cdk-rest-template-1.0-SNAPSHOT-shaded.jar infra/dockerbuild/cdk-rest-template.jar
cd infra/dockerbuild
docker build . -t cdk-rest-template
Running the container:
docker run -p 8080:8080 cdk-rest-template