1.@Component 创建类对象,相当于配置<bean/>
2.@Service 与@Component 功能相同.
  2.1都写在ServiceImpl 类上.
3.@Repository 与@Component 功能相同.
  3.1写在数据访问层类上.
4.@Controller 与@Component 功能相同.
  4.1写在控制器类上.
5.@Resource(不需要写对象的get/set)
  5.1java 中的注解
  5.2默认按照byName 注入,如果没有名称对象,按照byType 注入
  5.2.1建议把对象名称和spring 容器中对象名相同
6.@Autowired(不需要写对象的get/set)
6.1spring 的注解
6.2默认按照byType 注入.
7.@Value() 获取properties 文件中内容
8.@Pointcut() 定义切点
9.@Aspect() 定义切面类
10.@Before() 前置通知
11.@After() 后置通知
12.@AfterReturning 后置通知,必须切点正确执行
13.@AfterThrowing 异常通知
14.@Arround 环绕通知

Spring -13 -Spring 中常用注解总结的更多相关文章

  1. Spring Data JPA 中常用注解

    一.java对象与数据库字段转化 1.@Entity:标识实体类是JPA实体,告诉JPA在程序运行时生成实体类对应表 2.@Table:设置实体类在数据库所对应的表名 3.@Id:标识类里所在变量为主 ...

  2. Spring 中常用注解原理剖析

    前言 Spring 框架核心组件之一是 IOC,IOC 则管理 Bean 的创建和 Bean 之间的依赖注入,对于 Bean 的创建可以通过在 XML 里面使用 <bean/> 标签来配置 ...

  3. spring注解开发中常用注解以及简单配置

    一.spring注解开发中常用注解以及简单配置 1.为什么要用注解开发:spring的核心是Ioc容器和Aop,对于传统的Ioc编程来说我们需要在spring的配置文件中邪大量的bean来向sprin ...

  4. spring 以及 spring mvc 中常用注解整理

    spring 以及 spring mvc 中常用注解整理 @RequestMapping(映射路径) @Autowired(注入 bean 对象) 例如: @Autowired private Bas ...

  5. spring boot的一些常用注解

    spring boot的一些常用注解: 使用@SpringBootApplication注释: 许多Spring Boot开发人员喜欢他们的应用程序使用自动配置,组件扫描,并能够在其“应用程序类”上定 ...

  6. Spring同一个类中的注解方法调用AOP失效问题总结

    public interface XxxService { // a -> b void a(); void b(); } @Slf4j public class XxxServiceImpl ...

  7. Solon Web 开发,十四、与Spring、Jsr330的常用注解对比

    Solon Web 开发 一.开始 二.开发知识准备 三.打包与运行 四.请求上下文 五.数据访问.事务与缓存应用 六.过滤器.处理.拦截器 七.视图模板与Mvc注解 八.校验.及定制与扩展 九.跨域 ...

  8. SpringBoot 中常用注解@Controller/@RestController/@RequestMapping的区别

    SpringBoot中常用注解@Controller/@RestController/@RequestMapping的区别 @Controller 处理http请求 @Controller //@Re ...

  9. SpringBoot 中常用注解@Controller/@RestController/@RequestMapping介绍

    原文 SpringBoot 中常用注解 @Controller/@RestController/@RequestMapping介绍 @Controller 处理http请求 @Controller / ...

  10. SpringBoot 中常用注解

    本篇博文将介绍几种SpringBoot 中常用注解 其中,各注解的作用为: @PathVaribale 获取url中的数据 @RequestParam 获取请求参数的值 @GetMapping 组合注 ...

随机推荐

  1. Github-Dorks与辅助工具

    前言 Github搜索功能非常强大且有用,可用于在开源出来的Github仓库中搜索敏感数据.可以找到敏感的个人和/或组织信息(例如私钥,凭据,身份验证令牌等). 文中的github dork列表可以在 ...

  2. LeetCode的一道题引申的python实现的对字符串进行分词,提取词频的方法

    在LeetCode上刷一道题,题目如下: 3. 无重复字符的最长子串 给定一个字符串,请你找出其中不含有重复字符的?最长子串?的长度. 示例?1: 输入: "abcabcbb"输出 ...

  3. 在 Mac 系统下安装 PyCharm 的方法

    首先,进入 PyCharm 的官网,PyCharm: Python IDE for Professional Developers by JetBrains. 如上图所示,直接点击DOWNLOAD N ...

  4. [转载]机器学习&深度学习经典资料汇总,全到让人震惊

    自学成才秘籍!机器学习&深度学习经典资料汇总 转自:中国大数据: http://www.thebigdata.cn/JiShuBoKe/13299.html [日期:2015-01-27] 来 ...

  5. vue中$router以及$route的使用

    路由基本概念 route,它是一条路由. { path: '/home', component: Home } routes,是一组路由. const routes = [ { path: '/hom ...

  6. el-input 标签中密码的显示和隐藏

    效果展示: 密码隐藏: 密码显示: 代码展示: 一:<el-input>标签代码 <el-form-item label="密码" prop="pass ...

  7. Fedora30 install VS Code

    We currently ship the stable 64-bit VS Code in a yum repository, the following script will install t ...

  8. [LOJ2002] [SDOI2017] 序列计数

    题目链接 LOJ:https://loj.ac/problem/2002 洛谷:https://www.luogu.org/problemnew/show/P3702 Solution 考虑补集转换, ...

  9. React 了解学习

    1.nodejs安装程序https://nodejs.org/en/download/ create-react-app 类似 vs2017开发工具,集成了webpack 打包发布,loader和默认 ...

  10. java之struts2之ajax

    1.Ajax 技术在现有开发中使用非常多,大多是做管理类型系统.在servlet中可以使用ajax.在struts2中共还可以使用servlet的方式来实现ajax. 2.案例:用户名检查 publi ...