⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testservice.java

📁 webwork+spring+ibatis组合应用编程
💻 JAVA
字号:
package net.reumann.demo.service;
import org.springframework.context.ApplicationContext;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.util.List;
import net.reumann.demo.webwork.employee.EmployeeAction;
import com.opensymphony.webwork.dispatcher.ActionContextCleanUp;
public class testService {
  public static void main(String[] args)
  {
    ApplicationContext ctx=new ClassPathXmlApplicationContext("net/reumann/demo/spring.xml");
    DepartmentService ds=(DepartmentService)ctx.getBean("departmentService");
    List lst=ds.getAllDepartments();
    System.out.println(lst.size());
    EmployeeAction ea=(EmployeeAction)ctx.getBean("employeeAction");
   try{
    System.out.println(ea.execute());
    System.out.println(ea.getEmployeeList());
   }
   catch(Exception e)
   {
     e.printStackTrace();
   }
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -