-
Notifications
You must be signed in to change notification settings - Fork 4
Dropwizard App
devlibx edited this page Aug 12, 2024
·
2 revisions
This provides the base application for your application:
- Support virtual thread
- Dropwizard 4
<dependency>
<groupId>io.github.devlibx.easy</groupId>
<artifactId>dropwizard-app-v2</artifactId>
<version>0.0.143</version>
</dependency>Dropwizard 4 need migration from javax.ws.rs to jakarta.ws.rs. You can do find and replace to change imports. Without this your resource will not be registered and you will not expose the rest apis from your application.
- Use new
io.dropwizard.coreimport Use new package path -io.dropwizard.core.Configurationandio.dropwizard.core.setup.Environment - Add
enableVirtualThreads=trueto enable dropwizard to use Virtual Threads
server:
type: simple
applicationContextPath: /your-path
adminContextPath: /admin
connector:
port: 8080
type: http
enableVirtualThreads: true