A simple Spring Webflux application & custom c++ to play with JNI.
The app exposes two endpoints:
POST
/api/v1/encode/native
- REQUEST BODY: form-data, looks for a file part with the key
file
- WHAT IT DOES: Uses native c++ to BASE64 encode the given file
- RESPONSE: Json with
request-id
andencoded-bytes
fields
- REQUEST BODY: form-data, looks for a file part with the key
POST
/api/v1/encode/java
- REQUEST BODY: form-data, looks for a file part with the key
file
- WHAT IT DOES: Uses java facilities to BASE64 encode the given file
- RESPONSE: Json with
request-id
andencoded-bytes
fields
- REQUEST BODY: form-data, looks for a file part with the key
The c++ side of things. Builds to a .dll
/ .so
file which is loaded by the Spring app.
A pre-built .dll
/ .so
file of the native code for convenience.