1

We are trying to upgrade jersey version to 2.26 from 2.21 The application uses Guice for DI.

In version 2.26 I dont see ServiceLocatorProvider.getServiceLocator(featuredContext)

I tried adding hk2 dependencies separately but no success. Can someone guide me to the correct dependencies to use here?

kedarme
  • 83
  • 1
  • 8
  • 1
    You could probably just inject the ServiceLocator. If that doesn't work, then use InjectionManagerProvider to get the InjectionManager. Then [get the ServiceLocator through the InjectionManager](https://stackoverflow.com/a/46840247/2587435). Or just use the InjectionManager directly just like you would the ServiceLocator. The do pretty much the same thing. – Paul Samsotha Mar 07 '18 at 07:44
  • That worked thanks! – kedarme Apr 03 '18 at 13:05

0 Answers0