yml 自定义配置提示

引入依赖后重新编译即可

  1. <!-- springboot 配置文件自定义配置 -->
  2. <dependency>
  3. <groupId>org.springframework.boot</groupId>
  4. <artifactId>spring-boot-configuration-processor</artifactId>
  5. <optional>true</optional>
  6. </dependency>

配置文件加密

https://www.cnblogs.com/kexianting/p/11689289.html

依赖注入

  1. @Resource 默认通过名称注入,如名称无法找到则通过类型注入;
  2. @Autowired 默认通过类型注入,如存在多个类型则通过名称注入,也可以配合 @Qualifier 注解,在 @Qualifier 中指定 bean 的名字来注入你想要的那个 bean;