HIBENATE UNIT

public class HibernateUtil {

    private static final SessionFactory sessionFactory;



    static {

        try {

            sessionFactory = new Configuration().configure()

                                                .buildSessionFactory();

        } catch (HibernateException ex) {

            throw new RuntimeException("Exception building SessionFactory: " +

                ex.getMessage(), ex);

        }

    }

你可能感兴趣的:(NAT)