SSH框架中action层注入的bean实体对象为null,无法设置属性值
问题:
SSH框架中action层注入的bean实体对象为null,无法设置属性值
解决方案:
分析:action层注入bean不能使用@Autowired注入,应该使用new对象方式。
修改前:
@Autowired private Customer c;
修改后:
//对象驱动保存对象 private final Customer c = new Customer(); @Autowired public Customer getC() { return c; }

浙公网安备 33010602011771号