使用new创建对象,会增加程序耦合度,不利于程序代码修改。使用springcontext的getbean()方法采用依赖注入的方式创建对象,降低程序耦合度
new 和SpringContext创建对象的区别
猜你喜欢
转载自blog.csdn.net/weixin_42648692/article/details/84786089
今日推荐
周排行