spring中最重要的一些Aware接口

附上关于这节的spring官方文档:

ApplicationContextAware and BeanNameAware

aware接口在spring中无处不在,它是用来感知spring的ioc container

引用spring官方的一句话:

Spring offers a range of Aware callback interfaces that allow beans to indicate to the container that they require a certain infrastructure dependency

这句话真的讲的相当精妙啊!

你所看得到的天才不过是在你看不到的时候还在努力罢了!
原文地址:https://www.cnblogs.com/heliusKing/p/11392463.html