That's right, that's fine.
Your MyAspectmust be registered as a bean in any case.
It doesn't matter if it's AOP Aspect or not: the dependency injection infrastructure is the same.
HttpSession.
bean, Spring - WebApplicationContextUtils.SessionObjectFactory.
beanFactory.registerResolvableDependency(HttpSession.class, new SessionObjectFactory());
, SessionObjectFactory Proxy ThreadLocal<RequestAttributes>. , MyAspect.myMethod HttpSession, - -, .
, : , .