String path=System.
getProperty(
"user.dir")
;
ApplicationContext ct=
new FileSystemXmlApplicationContext(path+
"/src/applicationContext.xml")
;
BaseDao ccategoryService= (
BaseDao) ct.getBean(
"baseDao")
;
CategoryService categoryService= (com.service.CategoryService) ct.getBean(
"CategoryService")
;
List<Category> aaa = categoryService.listAll()
;
System.
out.print(aaa.size()+
"")
;