weylanshi / blogtalk

博客评论
0 stars 0 forks source link

细说SpringBootBean定义覆盖机制 | 小石头记 #79

Open weylanshi opened 2 years ago

weylanshi commented 2 years ago

https://www.weypage.com/2022/09/21/Java%E6%A1%86%E6%9E%B6/spring/%E7%BB%86%E8%AF%B4SpringBootBean%E5%AE%9A%E4%B9%89%E8%A6%86%E7%9B%96%E6%9C%BA%E5%88%B6/index.html

印象中Spring Boot 2.x中的bean定义是不能重复的,如下demo: 12345678910111213141516171819202122232425@SpringBootApplicationpublic class BeanDemoApplication { public static void main(String[] args) {