📄 test.java
字号:
/**
*
*/
package test.test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import dao.BookingDao;
/**
* @author zhangzhigang
*
* Nov 1, 2008
*/
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Test test = new Test();
test.select();
}
public void select(){
ApplicationContext ctx = new FileSystemXmlApplicationContext("WebRoot/WEB-INF/applicationContext.xml");
BookingDao bookingDao = (BookingDao) ctx.getBean("bookingDao");
System.out.println(bookingDao.finalAll("from Users").size());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -