/**
     * 使用sql语句进行查询操作
     * @param sql
     * @return
     */
    public List queryWithSql(final String sql){
        List list = hibernateTemplate.executeFind(new HibernateCallback() {
            public Object doInHibernate(Session session) throws HibernateException,
                    SQLException {
                Query query = session.createSQLQuery(sql);  
                List list = query.list();
                return list;
            }
        });
        return list;
    }

相关文章:

  • 2022-12-23
  • 2021-10-31
  • 2021-07-02
  • 2021-06-05
  • 2021-05-17
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
相关资源
相似解决方案