Why am I getting resourceInfo as null in this. Is there any other way to get resource class and resource method?
@Provider
@Authenticate
@Transactional
public class TestFilter2 implements ContainerRequestFilter {
private final SessionRepository sessionRepository;
@Context
public ResourceInfo resourceInfo;
@Inject
public TestFilter2(SessionRepository sessionRepository) {
this.sessionRepository = sessionRepository;
}
@Override
public void filter(ContainerRequestContext requestContext) throws IOException {
check();
}
private void check() {
sessionRepository.getActiveSessionBySessionId("dsfsdf");
}
}