/**
* Indicates one or more {@link Configuration @Configuration} classes to import.
* 表示import 一个或多个class
* <p>Provides functionality equivalent to the {@code <import/>} element in Spring XML.
* 等同于Spring XML 中的 <import/>的作用
* Allows for importing {@code @Configuration} classes, {@link ImportSelector} and
* {@link ImportBeanDefinitionRegistrar} implementations, as well as regular component
* classes (as of 4.2; analogous to {@link AnnotationConfigApplicationContext#register}).
* 运行的值类型 @Configuration注解的类,@ImportSelector 和 ImportBeanDefinitionRegistrar的实现类
*
* <p>{@code @Bean} definitions declared in imported {@code @Configuration} classes should be
* accessed by using {@link org.springframework.beans.factory.annotation.Autowired @Autowired}
* injection. Either the bean itself can be autowired, or the configuration class instance
* declaring the bean can be autowired. The latter approach allows for explicit, IDE-friendly
* navigation between {@code @Configuration} class methods.
* @Bean声明定义的 @Configuration实现类 通过@Autowired注入的方式访问; 不管是通过autowired 实例化还是通过
* 配置配置类 实例化声明bean. 后一种方法显示通过IDEA友好在各个方法之间导航
* <p>May be declared at the class level or as a meta-annotation.
* 可以在类级别声明,也可以作为元注释
* <p>If XML or other non-{@code @Configuration} bean definition resources need to be
* imported, use the {@link ImportResource @ImportResource} annotation instead.
*
* @author Chris Beams
* @author Juergen Hoeller
* @since 3.0
* @see Configuration
* @see ImportSelector
* @see ImportResource
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Import { /**
* {@link Configuration}, {@link ImportSelector}, {@link ImportBeanDefinitionRegistrar}
* or regular component classes to import.
*/
Class<?>[] value(); }

Spring注解之@Import的更多相关文章

  1. 三、Spring注解之@Import

    spring注解之@Import [1]@Import ​ 参数value接收一个Class数组,将你传入的类以全类名作为id加入IOC容器中 ​ 比较简单,此处不做详细解释 [2]ImportSel ...

  2. spring注解之@Import注解的三种使用方式

    目录 1.@Import注解须知 2.@Import的三种用法 3.@Import注解的三种使用方式总结 @ 1.@Import注解须知 1.@Import只能用在类上 ,@Import通过快速导入的 ...

  3. 【Spring注解驱动开发】使用@Import注解给容器中快速导入一个组件

    写在前面 我们可以将一些bean组件交由Spring管理,并且Spring支持单实例bean和多实例bean.我们自己写的类,可以通过包扫描+标注注解(@Controller.@Servcie.@Re ...

  4. 【Spring注解驱动开发】在@Import注解中使用ImportSelector接口导入bean

    写在前面 在上一篇关于Spring的@Import注解的文章<[Spring注解驱动开发]使用@Import注解给容器中快速导入一个组件>中,我们简单介绍了如何使用@Import注解给容器 ...

  5. 【Spring注解驱动开发】在@Import注解中使用ImportBeanDefinitionRegistrar向容器中注册bean

    写在前面 在前面的文章中,我们学习了如何使用@Import注解向Spring容器中导入bean,可以使用@Import注解快速向容器中导入bean,小伙伴们可以参见<[Spring注解驱动开发] ...

  6. Spring注解

    AccountController .java Java代码   1.        /** 2.         * 2010-1-23 3.         */ 4.        packag ...

  7. [转]Spring 注解总结

    原文地址:http://blog.csdn.net/wangshfa/article/details/9712379 一 注解优点?注解解决了什么问题,为什么要使用注解? 二 注解的来龙去脉(历史) ...

  8. spring 注解简单使用

    一.通用注解 1.项目结构: 2.新建Person类,注解@Component未指明id,则后期使用spring获取实例对象时使用默认id="person"方式获取或使用类方式获取 ...

  9. Spring 注解总结

    声明:这是转载的.内容根据网上资料整理.相关链接:http://www.360doc.com/content/10/1118/16/2371584_70449913.shtmlhttp://www.i ...

随机推荐

  1. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ppcloud-common: Compilation failure

    本文为博主原创,未经允许不得转载: [INFO] Finished at: 2018-09-19T20:26:05+08:00[INFO] ------------------------------ ...

  2. 清除浏览器CSS样式

    /* YUI 3.18.1 (build f7e7bcb) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD ...

  3. 4、My Scripts

    脚本目录列表 1.在windows编写的shell脚本利用dos2unix命令格式化一下(P308) 2.bash命令参数调试(P309) 3.使用set命令调试部分脚本内容(P312) 4.开发脚本 ...

  4. Java 基础功底

    Java 基础语法特性: 首先了解并做好Java Web 开发环境配置(包含 JDK 的配置)是非常必要的.其中 CLASSPATH 的值开始必须包含 ".",否则用 javac ...

  5. node.js基本概念简单解释

    1:什么是回调函数? 2:什么是同步异步 3:什么是I/O 4:什么是单线程/多线程 5:什么是阻塞/非阻塞 6:什么是事件 7:什么是事件驱动 8:什么是事件驱动的回调 9:什么是事件循环 解释: ...

  6. Pandas 基础(3) - 生成 Dataframe 的几种方式

    这一节想总结一下 生成 Dataframe 的几种方式: CSV Excel python dictionary List of tuples List of dictionary 下面分别一一介绍具 ...

  7. sticky-footer的三种解决方案

    在网页设计中,Sticky footers设计是最古老和最常见的效果之一,大多数人都曾经经历过.它可以概括如下:如果页面内容不够长的时候,页脚块粘贴在视窗底部:如果内容足够长时,页脚块会被内容向下推送 ...

  8. Cannot find a valid baseurl for repo: base/7/x86_6 解决方法

    安装centos7后发现不能上网, sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33 将ONBOOT=no改为ONBOOT=yes 然后重启网络服务 ...

  9. SpringBoot中加密com.github.ulisesbocchio

    Jasypt Spring Boot 为 Spring Boot 项目中的属性源(property sources)提供加密支持. 有三种方法可以在项目中集成 jasypt-spring-boot: ...

  10. Hadoop 学习路线

    大数据实时计算工程师/Hadoop工程师/数据分析师职业路线图 描述 本路线图是一个专门针对大数据实时处理.Hadoop工程师和数据分析师所设计的课程体系介绍,在实时计算方向主要包括了从数据收集框架. ...