configurationpropertiesscan 用法
    configurationpropertiesscan是一个Spring框架中的注解,用于扫描指定的包路径,到标有 @ConfigurationProperties 注解的类,并将其实例化为 Bean。
    使用该注解,我们可以方便地将配置文件中的属性值注入到我们定义的 Bean 中,从而避免了手动编写读取配置文件的代码。
    具体使用方法如下:
    1. 在 Spring Boot 应用的主配置类中添加 @EnableConfigurationProperties 注解,将需要注入属性的 Bean 类作为参数传入。
    2. 在需要注入属性的 Bean 类中添加 @ConfigurationProperties 注解,并指定属性的前缀。
    3. 在配置文件中添加对应前缀的属性,并赋予其值。
    例如,我们有一个配置文件 l,其中有以下属性:
    ```yaml
    server:
    port: 8080
    context-path: /example
    example:
    message: Hello, World!
    ```
    我们定义一个需要使用这些属性的 Bean 类,如下:
    ```java
    @Component
    @ConfigurationProperties(prefix = 'example')
    public class ExampleBean {
    private String message;
    // getters and setters
    }
    ```
    在主配置类中添加 @EnableConfigurationProperties 注解,并将 ExampleBean 类作为参数传入:
    ```java
    @SpringBootApplication
    @EnableConfigurationProperties(ExampleBean.class)
    public class Application {
    public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
    }
    }
实例化bean的三种方式
    ```
    这样,ExampleBean 类的 message 属性就会被注入为配置文件中 ssage 的值。
    需要注意的是,如果配置文件中的属性名与 Java 类中的属性名不一致,我们可以使用 @Value 注解进行映射,或者在 Java 类中使用 @PropertyName 注解指定属性名。