主页 > 后台易尔灵网络科技

spring怎么后台注入数据?

240 2024-01-07 20:38

3种方法 1。构造器注入 public class xx { private Manager manage; public xx(Manager manage){ this.manage= manage; } } 2.setter 方法注入 public class xx { private Manager manage; public void setManager(Manager manage){ this.manage= manage; } } 3.接口注入 public interface Manager{ public void manage(Business business); } public class xx { private Business business; public void manage(Business business){ this.business = business; } }

顶一下
(0)
0%
踩一下
(0)
0%
相关评论
我要评论
点击我更换图片

热点提要

网站地图 (共14个专题29062篇文章)

返回首页