- Build and deploy the function
fn deploy --app javafn --local
Note: Requires mvn
CLI installed.
- Call the function
curl -d 'Leonardo' https://localhost:8080/r/javafn/native
-
Create a new Java function with
fn init --runtime java8
. -
Add
reflection.json
file (see reflection.json example and GraalVM docs). -
Copy Dockerfile and change
CMD
to your entrypoint. -
Change your func.yaml to use
docker
runtime and add build commands.
Note: More advanced use cases using fnproject/fdk-java are also working.