@Component
public class CrmSupCommon {
@Autowired
private CrmSupMapper crmSupMapper;
public static CrmSupCommon crmSupCommon;
@PostConstruct
public void init() {
crmSupCommon = this;
crmSupCommon.crmSupMapper = this.crmSupMapper;
}
public static CrmSupCommon getInstance(){
if(crmSupCommon == null){
return new CrmSupCommon();
}
return crmSupCommon;
}
}
博客聚焦于在Util中使用@Autowired注解注入为null的问题。虽未给出具体内容,但可推测会围绕该问题的成因及解决办法展开,这在后端开发中是常见且需解决的问题。

325

被折叠的 条评论
为什么被折叠?



