spring的三种注解管理器
1.依赖注入的注解解析器
在配置文件中;
* xsd
xmlns:context="http://www.springframework.org/schema/context"
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
* 注解解析器
<context:annotation-config></context:annotation-config>
* 支持的注解:
@Resource
@Autowired
@Qualifier
@PostConstruct 初始化方法的注解
@PreDestroy 销毁的方法的注解
2.类扫描的注解解析器
在配置文件中:
* xsd
xmlns:context="http://www.springframework.org/schema/context"
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
* 注解解析器:
<context:component-scan base-package="cn.itcast.spring0401.scan"></context:component-scan>
* 支持的注解有
@Compontent @Repository @Service @Controller
3.aop的注解
* 注解解析器:
<aop:aspectj-autoproxy></aop:aspectj-autoproxy>
* 支持的注解:
@Aspect @Before @After @Pointcut @AfterReturning @Around @AfterThrowing
4.事务的注解
* 注解解析器:
<tx:annotation-driven transaction-manager="transactionManager"/>
指向事务管理器
* 支持的注解:
@Transactional
spring的三种注解管理器的更多相关文章
- JavaGUI三种布局管理器FlowLayout,BorderLayout,GridLayout的使用
三种布局管理器 流式布局FlowLayout package GUI; import java.awt.*; import java.awt.event.WindowAdapter; import j ...
- spring的annotation-driven配置事务管理器详解
http://blog.sina.com.cn/s/blog_8f61307b0100ynfb.html ——————————————————————————————————————————————— ...
- spring ioc三种注入方式
spring ioc三种注入方式 IOC ,全称 (Inverse Of Control) ,中文意思为:控制反转 什么是控制反转? 控制反转是一种将组件依赖关系的创建和管理置于程序外部的技术. 由容 ...
- 跟我学Spring3(9.2):Spring的事务之事务管理器
原文出处: 张开涛9.2.1 概述 Spring框架支持事务管理的核心是事务管理器抽象,对于不同的数据访问框架(如Hibernate)通过实现策略接口PlatformTransactionManage ...
- Spring中三种配置Bean的方式
Spring中三种配置Bean的方式分别是: 基于XML的配置方式 基于注解的配置方式 基于Java类的配置方式 一.基于XML的配置 这个很简单,所以如何使用就略掉. 二.基于注解的配置 Sprin ...
- (转)Spring的三种实例化Bean的方式
http://blog.csdn.net/yerenyuan_pku/article/details/52832793 Spring提供了三种实例化Bean的方式. 使用类构造器实例化. <be ...
- Spring的三种通过XML实现DataSource注入方式
Spring的三种通过XML实现DataSource注入方式: 1.使用Spring自带的DriverManagerDataSource 2.使用DBCP连接池 3.使用Tomcat提供的JNDI
- Spring 异常处理三种方式 @ExceptionHandler
异常处理方式一. @ExceptionHandler 异常处理方式二. 实现HandlerExceptionResolver接口 异常处理方式三. @ControllerAdvice+@Excepti ...
- Spring事务-三种实现方式
一.引入JAR文件: 二.开始搭建分层架构---创建账户(Account)和股票(Stock)实体类 Account: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
随机推荐
- 自定义android Dialog
1.自定义Dialog: import android.app.AlertDialog; import android.app.Dialog; import android.content.Conte ...
- C++STL学习笔记_(4)queue
10.2.5Queue容器 Queue简介 ² queue是队列容器,是一种"先进先出"的容器. ² queue是简单地装饰deque容器而成为另外的一种容器. ² #inc ...
- 关于Could not parse configuration: /hibernate.cfg.xml的问题
第一次在eclipse上配置hibernate,问题百出啊,比如下面的org.hibernate.HibernateException: Could not parse configuration: ...
- 【Ionic】---AngularJS扩展基本布局
目录: 标题栏 : ion-header-bar 页脚栏 : ion-footer-bar header/footer : 样式及内容 内容区 : ion-content 滚动框 : ion-scro ...
- C# 使用Code First迁移更新数据库
三步完成迁移: 1. 启用迁移: Enable-Migrations Enable-Migrations -ContextTypeName Mvc4WebSite.Models.MvcGuestboo ...
- 设置Oracle 12C OEM 端口
SQL); 打开OEM: http://DBSIPOrName:8087/em/
- 第六十六篇、OC_Sqlite数据库操作
#import <Foundation/Foundation.h> #import <sqlite3.h> #define kFilename @"data.sqli ...
- iOS开发——开发者官网注册新设备
1.第一步登陆苹果开发者中心官网,进入证书栏后如下图:点击All 或者如果是iPhone设备直接点击iPhone也行. 然后点击右上角的[+]号
- OC8_setter方法展开
// // Person.h // OC8_setter方法展开 // // Created by zhangxueming on 15/6/18. // Copyright (c) 2015年 zh ...
- 页面get请求 中文参数方法乱码问题
对于get方式,请求参数中存在中文,可以使用下面的方法进行处理: 两次使用encodeURI()方法:例如:encodeURI(encodeURI(“中文”)),然后再服务器中使用URLDecoder ...