A simple Kotlin Dropwizard microservice with a hello world GET API.
- Minimal Kotlin Dropwizard application
- Hello World REST endpoint at
/hello
- Returns JSON response:
{"message": "Hello, World!"}
- Build the application:
mvn clean package
- Run the application:
java -jar target/kotlin-dropwizard-1.0.0.jar server config.yml
- Test the API:
curl http://localhost:8080/hello
Expected response:
{"message": "Hello, World!"}
- Application: http://localhost:8080
- Admin: http://localhost:8081
- Hello API: http://localhost:8080/hello
src/main/kotlin/com/example/HelloWorldApplication.kt
- Main application classsrc/main/kotlin/com/example/HelloWorldResource.kt
- REST resource with GET endpointsrc/main/kotlin/com/example/HelloWorldConfiguration.kt
- Configuration classconfig.yml
- Application configurationpom.xml
- Maven build configuration