protected XsqlBuilder getXsqlBuilder() {
SessionFactoryImpl sf = (SessionFactoryImpl)(getSessionFactory());
Dialect dialect = sf.getDialect();
//or SafeSqlProcesserFactory.getMysql();
SafeSqlProcesser safeSqlProcesser = SafeSqlProcesserFactory.getFromCacheByHibernateDialect(dialect);
XsqlBuilder builder = new XsqlBuilder(safeSqlProcesser);
if(builder.getSafeSqlProcesser().getClass() == DirectReturnSafeSqlProcesser.class) {
System.err.println(BaseHibernateDao.class.getSimpleName()+".getXsqlBuilder(): 故意报错,你未开启Sql安全过滤,单引号等转义字符在拼接sql时需要转义,不然会导致Sql注入攻击的安全问题,请修改源码使用new XsqlBuilder(SafeSqlProcesserFactory.getDataBaseName())开启安全过滤");
}