I am using Jersey 1.4 ea along with Spring 3.0 and integration jersey-spring. Jersey and Spring integration is great for resource classes, as described here . Be that as it may, I want to add the Spring component to the ContainerRequestFilter in order to do some preprocessing of the requests.
@Component
public class SecurityFilter implements ContainerRequestFilter {
@Autowired
private UserManager userManager;
@Override
public ContainerRequest filter(ContainerRequest request) {
System.out.println(userManager);
}
}
Both the filter and the bean user manager are registered when the application is deployed to Glassfish. I wonder what I'm doing wrong. Is there a way to insert a Spring managed bean into a ContainerRequestFilter?
UPDATE
. , Spring beans, beans - Java ( -). Spring - Java-, proxy-target-class="true" Spring. <tx:annotation-driven proxy-target-class="true" />.
.