Controller->Service
以下哪个方法比较推荐,从代码整洁与性能来考量的话?
//非静态方法
.....Controller {
Service service = new Service()
public void path() {
...
service.call();
...
}
}//静态方法
.....Controller {
public void path() {
...
Service.call();
...
}
}
项目:JFinal
下载首页的 jfinal demo,里面有例子可以参考