struts2知识
程序员文章站
2022-03-30 13:22:39
...
1、如果使用属性驱动中的private User user; 那么表单的name要改成 user.xxx
如果用模型驱动的话 要把对象new出来private User user = new User();
2、注入service后还需要privet和setservice名
private LoginLogService loginLogService;
public void setLoginLogService(LoginLogService loginLogService) {
this.loginLogService = loginLogService;
}
如果没有会org.springframework.beans.NotWritablePropertyException: Invalid property 'loginLogService' of bean class [my.action.LoginAction]: Bean
property 'loginLogService' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
上一篇: lumafusion怎么添加字幕?lumafusion添加字幕教程
下一篇: Struts2知识回顾