This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cn.it.shop.util; | |
import org.hibernate.HibernateException; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.cfg.Configuration; | |
/*Hibernate:辅助工具类,既负责Hibernate的启动,也负责完成存储和访问SessionFactory的工作。 | |
* 使用Hibernate类来处理java应用程序中的Hibernate的启动是一种常见的模式 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
/** | |
* Created by fishLite on 2017/8/29. | |
*/ | |
public class DBConn { | |
private String url; // 存储SQLSever连接路径 |