ad5081d3
孙向锦
初始化项目
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package com.fh.util;
import com.fh.service.system.menu.impl.MenuService;
import com.fh.service.system.role.impl.RoleService;
import com.fh.service.system.user.UserManager;
/**
* @author Administrator
* 获取Spring容器中的service bean
*/
public final class ServiceHelper {
public static Object getService(String serviceName){
//WebApplicationContextUtils.
return Const.WEB_APP_CONTEXT.getBean(serviceName);
}
public static UserManager getUserService(){
return (UserManager) getService("userService");
}
public static RoleService getRoleService(){
return (RoleService) getService("roleService");
}
public static MenuService getMenuService(){
return (MenuService) getService("menuService");
}
}
|