方式一:实现org.springframework.beans.factory.InitializingBean借口,覆盖afterPropertiesSet方法 public class ExampleInitializingBean implements InitialingBean{ @Override public void afterPropertiesSet() throws Exception{ } } 1. 2. 3. 4. 5. 6. 方式二:配置init-method XML文件中的配置: <bean id="exampleIni...