摘要:
1、类中某方法加注解@PostConstruct 2、实现InitializingBean接口,实现afterPropertiesSet方法 3、xml方式,bean标签里配置init-mothod属性,指向类中的方法。 他们的执行顺序是 1-@PostConstruct 2-实现Initializ 阅读全文
摘要:
创建两个类 package com.hkdpp.springdemo.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Compo 阅读全文