public List listUsers() {
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        List result = session.createQuery("from User u where u.username = :username and u.id = :id").setParameter("username","lisi").setParameter("id",2L).list();
        session.getTransaction().commit();

        if (null != result && result.size() > 0) {
            for (Object obj : result) {
                User u = (User) obj;
                System.out.println(u.getUsername() + "-------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&----"+u.getId());
            }
        }

        return result;
    }