SpringBoot配置两个一样的Bean,区分两个配置类——@Primary
摘要:1、@Primary 作用: 指定默认bean。 当没有根据名字显示要注入哪个bean的时候,默认使用打了@Primary标签的bean 2、配置两个一样的bean @Configuration public class MyThymeLeafConfig { @Resource private A
阅读全文
posted @ 2023-05-17 14:10
posted @ 2023-05-17 14:10
posted @ 2023-05-17 14:00
posted @ 2023-05-04 15:16
posted @ 2023-04-21 16:51