-
Notifications
You must be signed in to change notification settings - Fork 33
Force GuiceServiceLocatorGenerator to be the only ServiceLocatorGenerator #39
Conversation
…n boot before any Jersey code has time to run.
…n boot before any Jersey code has time to run.
@rkapsi have you ever checked this pull request? |
@@ -57,6 +57,10 @@ public static void main(String[] args) { | |||
|
|||
``` | |||
|
|||
#### META-INF | |||
|
|||
To ensure Jersey/HK2 SPIs will use the proper ServiceLocationGenerator, simply copy the META-INF folder into your root project's resources folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this is fair enough but how is it different from adding jersey2-guice-spi
to the classpath. Both are subject to classpath ordering.
@@ -0,0 +1,50 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pom file contains some (possibly) private information.
Any chance of getting a release with these changes soon? The change I'm mainly looking for is here. Without this change, an |
Even if it wasn't initialized with install, it should create a GuiceServiceLocatorGenerator, which solves the race condition mentioned in the README.md.
Also made it optional to bind things on to GuiceServlet scopes so that even if you are not using GuiceServlets and only want to link Guice to HK2 it still works.