Controller该类为Controller
RequestMapping配置方法路径等信息
ResponseBody返回值,例如JSON,XML
PathVariable获取RESTFUL路径中的值如/company/{corpId}/dept/{deptId}
RequestParam获取Request参数值如xxx?from=index_nav
Component,Repository,Service
一般dao用Repository,service用Service,需要多个service时,一般用Componet
@Component
publicclassAComponent{
...
publicvoidxxx(){
serviceA.a();
serviceB.b();
...
serviceN.n();
}
}