标签:ons pos tco name resource res demo control component
@Component
@Controller
public class Demo {
@Resource(name="userService")
private UserService userServiceTemp;
public UserService getUserServiceTemp() {
return userServiceTemp;
}
public void setUserServiceTemp(UserService userServiceTemp) {
this.userServiceTemp = userServiceTemp;
}
public static UserService userService;
@PostConstruct
public void init() {
userService = this.userServiceTemp;
}
}
原理
标签:ons pos tco name resource res demo control component
原文地址:http://www.cnblogs.com/cdquzhen/p/7850816.html