Spring MVC底层的简单实现(二)

2014-11-24 01:43:05 · 作者: · 浏览: 5
StackTrace();
}
}


写一个简单的方法:
public class DepartService {
public void getDepartById(){
System.out.println("我通过id得到部门");
}
}


写一个学生类测试一下:
public class StudentTest {

public static void main(String[] args) {
//传统的调用方法
Student student=new Student();
student.setUsername("afei");
student.test();
System.out.println();
InvokeHandle.callMethod("service.DepartService","getDepartById");
}
}


有写的不好的地方请多交流。
希望对你们有帮助!!!



相关阅读: