方法汇总1

1.SF_MENUService sf_menuService = IocFactory.instance(SF_MENUService.class) ;  //使用SF_MENUServiceImp来实例化对象

2.根据指定的实现类名称生成出相应的接口对象。

String className = SellerServiceImp.class.getName();
SF_USERSService service = IocFactory.instance( className ); //使用SellerServiceImp来实例化对象

3.根据指定的接口类型和实现类的别名生成出相应的接口对象。

Class<?> interfaceType = SF_USERSService.class;
String alia = "Seller" ;
SF_USERSService service = IocFactory.instance( interfaceType, alia ); //使用SellerServiceImp来实例化对象

将请求对象内各个元素的值保存至实体对象(默认情况下,空字符串为无效值)

SF_ROLE sf_role = this.bean(request, SF_ROLE.class, false);

SF_ROLEService handler = (SF_ROLEService)service ;


sf_role = service.bean(sf_role); 查询信息,绑定到页面

  List<?> menus = sf_menuService.beans(new SF_MENU());   /查询所有SF_MENU信息

-------------------------------------------------------------------------
## 极客时间全网最便宜最优惠购买方式,优惠券返现 百度网盘 微信关注公众号“选门好课”
扫描下方二维码关注我的公众号"选门好课",与我一起交流知识
原文地址:https://www.cnblogs.com/singworld/p/9717497.html