摘要:
1、类中某方法加注解@PostConstruct 2、实现InitializingBean接口,实现afterPropertiesSet方法 3、xml方式,bean标签里配置init-mothod属性,指向类中的方法。 他们的执行顺序是 1-@PostConstruct 2-实现Initializ 阅读全文
posted @ 2019-11-16 17:53
土豆Z120553
阅读(1596)
评论(0)
推荐(1)
摘要:
创建两个类 package com.hkdpp.springdemo.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Compo 阅读全文
posted @ 2019-11-16 17:01
土豆Z120553
阅读(415)
评论(0)
推荐(0)