Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HibernateUtil {
- private static final SessionFactory sessionFactory;
- static {
- try {
- System.out.println("Фабрика создана");
- sessionFactory = new Configuration()
- .configure("hibernate.cfg.xml")
- .addAnnotatedClass(ProfField.class)
- .buildSessionFactory();
- } catch (HibernateException ex) {
- System.err.println("Initial SessionFactory creation failed." + ex);
- throw new ExceptionInInitializerError(ex);
- }
- }
- public static SessionFactory getSessionFactory() {
- return sessionFactory;
- }
- }
- Info: Loading application [ChessmanWork] at [/ChessmanWork]
- Info: ChessmanWork was successfully deployed in 10 850 milliseconds.
- Info: Фабрика создана
- Info: HHH000412: Hibernate Core {5.3.7.Final}
- Info: HHH000206: hibernate.properties not found
- WARN: HHH90000012: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/hibernate-configuration. Use namespace http://www.hibernate.org/dtd/hibernate-configuration instead. Support for obsolete DTD/XSD namespaces may be removed at any time.
- Info: HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
- WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
- Info: HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/chessman_work?useSSL=FALSE&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC]
- Info: HHH10001001: Connection properties: {user=root, password=****}
- Info: HHH10001003: Autocommit mode: false
- Info: HHH000115: Hibernate connection pool size: 30 (min=1)
- Info: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
- Info: HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
- Info: HHH000397: Using ASTQueryTranslatorFactory
- Info: Hibernate: select proffield0_.id_prof_field as id_prof_1_0_, proffield0_.prof_field as prof_fie2_0_ from prof_fields proffield0_
Add Comment
Please, Sign In to add comment