## 类的使用
org.springframework.stereotype.Component

- 使用Component的程序包
  程序包 | 说明
  --- | ---
  org.springframework.context.annotation | Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.
  org.springframework.stereotype | Annotations denoting the roles of types or methods in the overall architecture (at a conceptual, rather than implementation, level).

- - ### org.springframework.context.annotation中Component的使用

    注释类型为Component的org.springframework.context.annotation中的类
    限定符和类型 | 类和说明
    --- | ---
    `interface` | `Configuration` Indicates that a class declares one or more `@Bean` methods and may be processed by the Spring container to generate bean definitions and service requests for those beans at runtime, for example:
         @Configuration
         public class AppConfig {

             @Bean
             public MyBean myBean() {
                 // instantiate, configure and return bean ...
             }
         }

         Bootstrapping @Configuration classes

         Via AnnotationConfigApplicationContext

         @Configuration classes are typically bootstrapped using either
         AnnotationConfigApplicationContext or its web-capable variant,
         AnnotationConfigWebApplicationContext.

  - ### org.springframework.stereotype中Component的使用

    注释类型为Component的org.springframework.stereotype中的类
    限定符和类型 | 类和说明
    --- | ---
    `interface` | `Controller` Indicates that an annotated class is a "Controller" (e.g. a web controller).
    `interface` | `Repository` Indicates that an annotated class is a "Repository", originally defined by Domain-Driven Design (Evans, 2003) as "a mechanism for encapsulating storage, retrieval, and search behavior which emulates a collection of objects".
    `interface` | `Service` Indicates that an annotated class is a "Service", originally defined by Domain-Driven Design (Evans, 2003) as "an operation offered as an interface that stands alone in the model, with no encapsulated state."