java代码:
@Controller
public class TestController {
@RequestMapping("test")
public String test(HttpServletRequest request,
HttpSession session,
HttpServletResponse response, Model model){
// System.out.println("11111111111111111");
System.out.println("22222222222222222");
Customer customer = (Customer) request.getAttribute(
"customer");
return "tml/common/voucher";
}
}
断点打在Customer customer = (Customer) request.getAttribute("customer");,
但是打印信息只打印了一次!
求解释啊
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你这句有问题吧
Customer customer = (Customer) request.getAttribute("customer");request.getAttribute("customer")获得一个String 类型的值,你直接强转成Customer对象
我觉的应该
或者直接
/