Search code examples
javaspring-mvcwebjersey

How to integrate Jersey into spring 5 mvc application without spring boot and springrest


I have a problem with auto wired interface of UserSevice which always returns me a null value, due to (as I think) wrong implementation of jersey into my spring app. So I need a clear reference or example of spring 5 mvc with jersey 2.x Thanks in advice!


Solution

  • So the answer is just to extend my class which gonna be REST api implementation from SpringBeanAutowiringSupport class

    P.S. main point was in configuring Spring 5 with jersey without

    "artifactId" jersey-spring4 "/artifactId"

    dependency, because it caused "java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/BeanDefinitionCustomizer"

    As I understand, my app had some configs which are in conflict with this dependency and tried to get SPRING 4 class from my spring 5 application