public abstract class BaseModel implements Serializable {
private static final long serialVersionUID = 1L;
@Column
@Comment("操作人")
@Prev(els = @EL("$me.uid()"))
@ColDefine(type = ColType.VARCHAR, width = 32)
protected String opBy;
@Column
@Comment("操作时间")
@Prev(els = @EL("$me.now()"))
@ColDefine(type = ColType.INT)
protected Integer opAt;
@Column
@Comment("删除标记")
@Prev(els = @EL("$me.flag()"))
@ColDefine(type = ColType.BOOLEAN)
protected Boolean delFlag;
public String getOpBy() {
return opBy;
}
public void setOpBy(String opBy) {
this.opBy = opBy;
}
@Table("sys_log")
public class Sys_log extends BaseModel implements Serializable {
private static final long serialVersionUID = 1L;
@Column
@Id
private long id;
@Column
@Comment("创建昵称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String username;
@Column// aop.before aop.after aop.error
@Comment("日志类型")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String type;
@Column("xxx")
@Comment("日志标识")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String tag;
@Column
@Comment("执行类")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String src;
@Column
@Comment("来源IP")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String ip;
@Column
@Comment("日志内容")
@ColDefine(type = ColType.TEXT)
private String msg;
Sys_log sysLog = new Sys_log();
sysLog.setType("info");
sysLog.setTag("用户登陆");
sysLog.setSrc(this.getClass().getName()+"#doLogin");
sysLog.setMsg("成功登录系统!");
sysLog.setIp(StringUtil.getRemoteAddr());
sysLog.setOpBy(user.getId());
sysLog.setOpAt((int) (System.currentTimeMillis() / 1000));
sysLog.setUsername(user.getUsername());
在这个登录逻辑,设置 OpBy的时候,tomcat 报找不到 setOpBy方法,jetty,正常执行。
其他同学有遇到这样的问题吗?