1.@Component为通用注解。

  2.@Repository为持久层组件注解。

  3.@Service为业务层组件注解。

  4.@Scope为Bean的作用域注解。

  5.@Autowired,@Inject为指定Bean之间依赖关系的注解。

  6.@Value为注入Spring表达式值的注解。

描述下@Component,@Repository,@Service,@Scope,@Autowired,@Inject,@Value标记的作用的更多相关文章

  1. 【转载】@Component, @Repository, @Service的区别

    @Component, @Repository, @Service的区别 官网引用 引用spring的官方文档中的一段描述: 在Spring2.0之前的版本中,@Repository注解可以标记在任何 ...

  2. [转]what’s the difference between @Component ,@Repository & @Service annotations in Spring

    原文地址:https://www.cnblogs.com/softidea/p/6070314.html @Component is equivalent to <bean> @Servi ...

  3. What's the difference between @Component, @Repository & @Service annotations in Spring?

    @Component is equivalent to <bean> @Service, @Controller , @Repository = {@Component + some mo ...

  4. SpringAnnotation注解之@Component,@Repository,@Service,@Controller

    @Component:组件,表示此写上了此注解的bean,作为一个组件存在于容器中.这样的话别的地方就可以使用@Resource这个注解来把这个组件作为一个资源来使用了.初始化bean的名字为类名首字 ...

  5. @Component @Repository @Service @Controller

    Spring 2.5 中除了提供 @Component 注释外,还定义了几个拥有特殊语义的注释,它们分别是:@Repository.@Service 和 @Controller.在目前的 Spring ...

  6. @Component, @Repository, @Service,@Controller的区别

    @Component, @Service, @Controller, @Repository是spring注解,注解后可以被spring框架所扫描并注入到spring容器来进行管理 @Componen ...

  7. @Component, @Repository, @Service的区别

    注解 含义 @Component 最普通的组件,可以被注入到spring容器进行管理 @Repository 作用于持久层 @Service 作用于业务逻辑层 @Controller 作用于表现层(s ...

  8. @Repository @Service 和@Autowired 的使用

    解释: @Controller 声明Action组件 @Service   声明Service组件    @Service("myMovieLister")  @Repositor ...

  9. 从头认识Spring-2.7 自己主动检測Bean(1)-@Component @Repository @Service @Controller

    这一章节我们来讨论一下自己主动检測Bean. 1.domain 厨师类: package com.raylee.my_new_spring.my_new_spring.ch02.topic_1_19; ...

随机推荐

  1. [Python Study Notes] Python的安装

    Windows: 1.下载安装包: 转到Python官网https://www.python.org/downloads/  ,下载最新版本的Python. 2.安装 安装到自定义的安装路径下. 3. ...

  2. 一个很好的MySQL在线学习平台

    一个很好的MySQL在线学习平台 https://www.techonthenet.com/sql/

  3. ★Linux桌面系统技巧(作为客户端)

    [安装chrome浏览器]* 下载(已下载完成):32位:wget https://dl.google.com/linux/direct/google-chrome-stable_current_i3 ...

  4. .NET 设计模式的六大原则理论知识

    1. 单一职责原则(SRP)(Single Responsibility Principle)2. 里氏替换原则(LSP)(Liskov Substitution Principle)3. 依赖倒置原 ...

  5. 阿里云ECS服务器上搭建keepalived+mha+mysql5.6+gtid+一主两从+脚本判断架构踩的坑

    最近,公司项目搭建了一套后端数据库架构,不是在RDS,是在阿里云的ECS服务器上搭建keepalived.mha.mysql5.6.gtid.一主两从架构,目前还没有实现读写分离,以后架构升级,可能代 ...

  6. Python:main函数

    什么是函数? 一个程序可以包含多个模块,程序越复杂,包含的模块和功能就越多,模块细分里面包含多个类,类这个概念在任何一门面向对象语言里面都很重要,在类里面最主要的就是包含的函数,函数式实现某一个功能的 ...

  7. C++ 值类型和引用类型传递示例

    // win32test.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" void swap_point(int * &a , in ...

  8. pycharm的用法

    Ctrl / 注释(取消注释)选择的行 Shift + Enter开始新行Ctrl + Enter智能换行TAB Shift+TAB缩进/取消缩进所选择的行Ctrl + Alt + I自动缩进行Ctr ...

  9. 微信开发系列——微信订阅号前端开发利器:WeUI

    前言:年前的两个星期,学习了下微信公众号的开发.后端基本能够基于盛派的第三方sdk能搞定大部分事宜.剩下的就是前端了,关于手机端的浏览器的兼容性,一直是博主的一块心病,因为博主一直专注于bootstr ...

  10. java-redis初探

    一.Redis 简介 Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. Redis 与其他 key - value 缓存产品有以下三个特点: Redis支持数据的 ...