我试图扫描放在Spring MVC Project会话中的项目
@RequestMapping(value="/",method=RequestMethod.GET)
public String welcome(HttpServletRequest request){
HttpSession session=request.getSession();
Enumeration<String> list=session.getAttributeNames();
while(list.hasMoreElements())
System.out.println(list.nextElement());
return "index";
}//welcome
我有输出:
scopedTarget.carrello
org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget.carrello
org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget.cliente
scopedTarget.cliente
num_articoli
totale_carrello
carrello和utente是两个bean,其范围为= session;而num_articoli和totale_carrello是用@SessionAttributes编写的两个属性。
我的问题是:
由于