我正在尝试在我的方面类中注入一个 portletrequest
@Autowired(required = true)
private PortletRequest request;
@Before("execution(* de.ac.mis.dao.*.getSessionFactory())")
public void setUsername() {
System.out.println("Now I'm setting the username " + this.request);
}
只给我一个
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No matching bean of type [javax.portlet.PortletRequest] found for dependency:
expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
例外
但我可以自动接线HttpServletRequest
- 我错过了什么吗?