Spring《四-一》解决自动装配的问题

自动化装配使得研发减少了响应的指配工作,但是使得响应的检查难以完成。

解决方法:

simple模式: <bean autowire="autodetect" dependency-check="simple">

1、基本类型、字符串和集合进行依赖检查。

object模式:<bean autowire="autodetect" dependency-check="object">

1、指定的是对依赖的对象进行依赖检查。

all模式:<bean autowire="autodetect" dependency-check="all">

1、对所有属性进行依赖检查。相当于simple和object的组合。

none模式::<bean autowire="autodetect" dependency-check="all">

1、使用none表示不进行依赖检查。

原文地址:https://www.cnblogs.com/swordyt/p/7001959.html