企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
在one中实现InitializingBean接口呢? ~~~ public class one implements ApplicationContextAware ,InitializingBean { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { System.out.println("setApplicationContext"); } @Override public void afterPropertiesSet() throws Exception { System.out.println("afterPropertiesSet"); } public one(String one) { System.out.println(one); } } ~~~ 结果 ![](https://box.kancloud.cn/83c997dc131fb26b4ad70c6d81412c0b_464x232.png)