控制台打印了插入sql 但数据库中没有数据
[05:46:54:989] [DEBUG] - org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:110) - Exception when parser SQL sql, skip cache detect!! SQL=RUN
[05:46:54:989] [DEBUG] - org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - // NOT SQL // ElFieldMacro=$me.date()
[05:46:54:989] [DEBUG] - org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:110) - Exception when parser SQL sql, skip cache detect!! SQL=RUN
[05:46:54:990] [DEBUG] - org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - // NOT SQL // ElFieldMacro=$me.now()
[05:46:54:990] [DEBUG] - org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:147) - sql = INSERT INTO set_meal(wx_id,createTime,ct,is_del,is_complete) VALUES(?,?,?,?,?) , tables = [set_meal]
[05:46:54:990] [DEBUG] - org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - INSERT INTO set_meal(wx_id,createTime,ct,is_del,is_complete) VALUES(?,?,?,?,?)
| 1 | 2 | 3 | 4 | 5 |
|------------------------------|---------------------|---------------------|-------|-------|
| oqqXTjqUSKScwbaBRulNWtqq-UOI | 2017-05-18 05:46:54 | 2017-05-18 00:00:00 | false | false |
For example:> "INSERT INTO set_meal(wx_id,createTime,ct,is_del,is_complete) VALUES('oqqXTjqUSKScwbaBRulNWtqq-UOI','2017-05-18 05:46:54','2017-05-18 00:00:00',false,false) "
[05:46:54:994] [DEBUG] - org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:194) - Clear Cache=set_meal
单查询控制台后
mysql> SELECT * FROM set_meal WHERE wx_id='oqqXTjqUSKScwbaBRulNWtqq-UOI' AND ct='2017-05-18 00:00:00' AND is_del=false;
Empty set (0.00 sec)
还有个问题 我没有配置 set_meal缓存 却提示清理了这个表的缓存
ioc 配置
var ioc = {
conf : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : [ "custom/" ]
}
},
dataSource : {
factory : "$conf#make",
args : [ "com.alibaba.druid.pool.DruidDataSource", "db." ],
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
}
},
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [ {
refer : "dataSource"
} ],
fields : {
interceptors : [ {
refer : "cacheExecutor"
}, "log" ]
}
},
cacheExecutor : {
type : "org.nutz.plugins.cache.dao.DaoCacheInterceptor",
fields : {
cacheProvider : {
refer : "cacheProvider"
},
cachedTableNames : [ "t_user", "wx_user" ],
enableWhenTrans : false,
db : "MYSQL"
}
},
cacheProvider : {
type : "org.nutz.plugins.cache.dao.impl.provider.EhcacheDaoCacheProvider",
fields : {
cacheManager : {
refer : "cacheManager"
}
},
events : {
create : "init"
}
},
dataSourceDetail : {
factory : "$conf#make",
args : [ "com.alibaba.druid.pool.DruidDataSource", "detail." ],
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
}
},
daoDetail : {
type : "org.nutz.dao.impl.NutDao",
args : [ {
refer : "dataSourceDetail"
} ],
fields : {
interceptors : [ {
refer : "cacheExecutor"
}, "log" ]
}
}
};