@Configuration
作用:
用于指定当前类是一个 spring 配置类,当创建容器时会从该类上加载注解。获取容器时需要使用AnnotationApplicationContext
(有@Configuration 注解的类.class
)。
属性:value:
用于指定配置类的字节码
@Configuration
作用:
用于指定当前类是一个 spring 配置类,当创建容器时会从该类上加载注解。获取容器时需要使用AnnotationApplicationContext
(有@Configuration 注解的类.class
)。
属性:value:
用于指定配置类的字节码
Comment here is closed