The maven-simplest example used something like the following code to setup the Jersey Server.
val locator = ServiceLocatorUtilities.bind(HK2JerseyBinder(), HK2VertxBinder(vertx),
AutowiredBinder(appCtx))
val server = locator.getService(JerseyServer::class.java)`
Since HK2VertxBinder is not in the vert-jersey artifact I had to add a bunch of dependencies and do some debugging in order to get it. I was thinking setup would be easier if there was a static factory method for DefaultJerseyServer. That way a JerseyServer could be instantiated with one line. I really like the flexibility of dependency injection so I think the method should have Binder... as a parameter.
I also think that there should be documentation of how we can directly access the ResourceConfig.
The maven-simplest example used something like the following code to setup the Jersey Server.
Since HK2VertxBinder is not in the vert-jersey artifact I had to add a bunch of dependencies and do some debugging in order to get it. I was thinking setup would be easier if there was a static factory method for DefaultJerseyServer. That way a JerseyServer could be instantiated with one line. I really like the flexibility of dependency injection so I think the method should have
Binder...
as a parameter.I also think that there should be documentation of how we can directly access the ResourceConfig.