2021
11-05
11-05
基于Spring depends-on的使用详解
Springdepends-on的使用通过在XML中的<bean>里配置depends-on属性或者在一个类上使用注解@DependsOn,可以使一个Bean的产生依赖于其他几个Bean。请看如下代码:<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.spri...
继续阅读 >