I'm currently porting a large Rest Service app from WebSphere to a Springboot app running in Docker. In the original implementation, I had an AspectJ aspect wrapping around the invocations of all the methods in my JaxRS services. Using the runtime weaver, this worked just fine.
Now, I've moved all of those services and the aspect over to Spring boot, using Spring AOP to load the aspects. The problem I'm having is that the Spring AOP code only appears to apply the aspects to objects that are created/managed by Spring. Unfortunately, the JaxRS objects are being created by Jersey directly, and Spring never gets involved, so the resulting objects are not proxied by the AOP subsystem and as a result none of my aspects get called.
Does anyone know how I can get Spring AOP to manage the JaxRS services (or somehow tell Jersey to allow Spring to create the service instances)?
You cannot with Spring AOP. Spring AOP is a proxy-based "AOP lite" framework which only applies to Spring-managed beans, as explained in the Spring manual. If you need to apply aspects to other classes, it is pretty easy to switch from Spring AOP to native AspectJ via LTW (load-time weaving).