@Configuration注解 1 注解 1.1 @Configuration注解说明 @Configuration注解是从Spring 3.0版本开始加入的一个使Spring能够支持注解驱动开发的标注型注解,主要用于标注在类上。当某个类标注了@Configuration注解时,表示这个类是Spring的一个配置类。@Configuration注解能够替代Spring的applicationContext.xml文件,并且被@Configuration注解标注的类,能够自动注册到IOC容器并进行实例化。 1.2 注解源码 源码详见:org.springframework.context.annotation.Configuration。 @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented @Component public @interface Configuration { @AliasFor( annotation = Component.class ) String...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Class
Contact Class, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack