-
Notifications
You must be signed in to change notification settings - Fork 0
Home
devlibx edited this page Jan 17, 2023
·
3 revisions
Use the following link to create a Java 19 rest project
These are changes required in your dropwizard project to enable Virtual Thread (Loom support)
- This requires the latest dropwizard version 3.0+
- This requires the Jetty 10.0+ version - Jetty added virtual thread support in these versions
- Use of
jakarta.ws.rs-api
->javax
package is replaced withjakarta
so all Jetty resources must userjakarta
packages - Enhanced server factory
io.github.devlibx.easy.app.dropwizard.SimpleServerFactoryWithVirtualThread
. This uses virtual thread instead of a native thread- To enable it, you must add the following file in META-INF in your project
resources
META-INF
services
io.dropwizard.core.server.ServerFactory
# COntent of this file
io.github.devlibx.easy.app.dropwizard.SimpleServerFactoryWithVirtualThread
- Use service type as
simplewithvt
server:
type: simplewithvt
applicationContextPath: "/"
adminContextPath: "/admin"
connector:
port: 8090
type: HTTP