文章列表
这是我的applicationContext.xml的配置;
<bean id="themeDao" class="com.sc.dao.imp.ThemeDAO"></bean>
<bean id="themeService" class="com.sc.service.ThemeService">
<property name="themeDao" ref="themeDao"></property>
&l ...
测试类主要如下:
开用的junit,后来直接用的main函数
public class TuserDAOTest {
private static SessionFactory sf;
private static Session session;
@BeforeClass
public static void beforeClass() {
try {
sf = new Configuration().configure().buildSessionFactory();
session = sf.getCurrentSession();
} catch (Exception e) {
/ ...