Spring注释令人困惑,让我无法理解它背后的全部想法

时间:2021-07-31 20:15:09

Basically @Autowire and @Configurable do the same. What is the difference between these two annotation?

基本上@Autowire和@Configurable都是这样做的。这两个注释有什么区别?

Please pardon me.

请原谅我

1 个解决方案

#1


2  

@Configurable allows you to inject dependencies without explicit bean definition while @Autowire used to inject the explicitly defined beans.

@Configurable允许您在没有显式bean定义的情况下注入依赖项,而@Autowire用于注入显式定义的bean。

#1


2  

@Configurable allows you to inject dependencies without explicit bean definition while @Autowire used to inject the explicitly defined beans.

@Configurable允许您在没有显式bean定义的情况下注入依赖项,而@Autowire用于注入显式定义的bean。