@IocBean
public class CommonFollowsDataService {
@Inject
protected UserAvatarService userAvatarService;
@Inject
protected RsService rsService;
}
@IocBean
public class CommonUserDataService extends CommonFollowsDataService {
public List<Object> commonAllVtypeData(HeaderModel model, Map fSetMap) {
userAvatarMap = userAvatarService.getCoAvatarByUids(oemid, uids, 1);
}
}
子类调用调用父类中的 报错 userAvatarService 为空
6 回复
ioc js 中的代码
commonUserDataService : {
type : "cn.guagua.mobile.my.provide.CommonUserDataService"
},
commonFollowsDataService : {
type : "cn.guagua.mobile.my.provide.CommonFollowsDataService",
fields : {
userAvatarService : {refer : "userAvatarService"},
rsService : {refer : "rsService"},
}
},
userProvideService : {
type : "cn.guagua.mobile.user.provide.UserProvideService",
fields : {
commonFollowsDataService: {refer : "commonFollowsDataService"},
commonUserDataService: {refer : "commonUserDataService"}
}
},
感谢 @wendal 还真是这个问题, js 里多余写了
添加回复
请先登陆