原问题为:
Is there any difference between using the @PostConstruct annotation and declaring the same method as init-method in Spring XML configuration?
原网址
节选最简单的答案:
@postconstruct is not part of the spring. It is part of javax package. Both are the same. using init-method we need to added in xml file.If you use @postconstruct adding in xml is not required. Check out the below article .
@postconstruct注解的使用 Demo
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦