SpringBoot|其他常用注解

  1. Componment:声明为springboot的bean

  2. Repository:用于dao层的bean

  3. Autowired:用于向一个bean注入其他的bean

  4. Service:用于service层的bean

  5. Configuration:用于声明springboot的配置文件类

  6. Value("${key}"):获取springboot配置文件中的值

  7. Bean:声明其为bean实例,常和Configuration配合使用

posted @ 2021-07-26 23:11  未来可期_Durant  阅读(33)  评论(0编辑  收藏  举报