@Name
@Prev(els = @EL("idGen()"))
@Column("id")
@JSONField(serializeUsing = LongToStringSerializer.class)
private String id;
@IocBean
public class DeanIdGenerator implements RunMethod {
private Snowflake snowflake;
public Snowflake getSnowflake() {
return snowflake;
}
public void setSnowflake(Snowflake snowflake) {
this.snowflake = snowflake;
}
@Override
public Object run(List<Object> fetchParam) {
return String.valueOf(snowflake.next());
}
@Override
public String fetchSelf() {
return "idGen";
}
}
// 初始化redis实现的id生成器
CustomMake.me().register("ig", ioc.get(RedisIdGenerator.class));
CustomMake.me().register("idGen", ioc.get(DeanIdGenerator.class));
[DEBUG] 2017-07-28 11:33:27,288 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) - Get 'gfTagController'<class cn.wizzer.app.web.modules.controllers.platform.gf.GfTagController>
[DEBUG] 2017-07-28 11:33:27,292 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - // NOT SQL // ElFieldMacro=idGen()
[DEBUG] 2017-07-28 11:33:27,292 org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:110) - Exception when parser SQL sql, skip cache detect!! SQL=RUN
是什么原因 造成的呢?