📄 test.java
字号:
/**
*
*/
package org.dfbz.springhibernate.test;
import org.dfbz.springhibernate.dao.UserDao;
import org.dfbz.springhibernate.domain.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author maboli
* @date Dec 13, 2008
*
*/
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
Test test = new Test();
test.testSave();
}
private void testSave(){
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
UserDao userDao = (UserDao)context.getBean("UserDao");
userDao.save(new User("spring","hibernate"));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -