上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 25 下一页

2015年6月24日

23Spring使用JdbcTemplate和JdbcDaoSupport

摘要: 首先需要添加c3p0包和jdbc包数据库:CREATE DATABASE IF NOT EXISTS `spring` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `spring`;-- MySQL dump 10.13 Distrib 5.6.13, ... 阅读全文

posted @ 2015-06-24 23:15 jec 阅读(272) 评论(0) 推荐(0) 编辑

2015年6月23日

22Spring基于配置文件的方式配置AOP

摘要: 直接看代码:package com.cn.spring.aop.impl;//加减乘除的接口类public interface ArithmeticCalculator { int add(int i, int j); int sub(int i, int j); int mul(... 阅读全文

posted @ 2015-06-23 21:12 jec 阅读(367) 评论(0) 推荐(0) 编辑

21Spring重用切点表达式

摘要: 直接看代码:package com.cn.spring.aop.impl;//加减乘除的接口类public interface ArithmeticCalculator { int add(int i, int j); int sub(int i, int j); int mul(... 阅读全文

posted @ 2015-06-23 19:12 jec 阅读(313) 评论(1) 推荐(0) 编辑

20Spring切面的优先级

摘要: 通过使用@order注解指定切面的优先级,值越小,优先级越高代码:package com.cn.spring.aop.impl;//加减乘除的接口类public interface ArithmeticCalculator { int add(int i, int j); int sub... 阅读全文

posted @ 2015-06-23 15:15 jec 阅读(346) 评论(0) 推荐(0) 编辑

2015年6月21日

19Spring返回通知&异常通知&环绕通知

摘要: 在前置通知和后置通知的基础上加上返回通知&异常通知&环绕通知代码:package com.cn.spring.aop.impl;//加减乘除的接口类public interface ArithmeticCalculator { int add(int i, int j); int sub... 阅读全文

posted @ 2015-06-21 11:10 jec 阅读(287) 评论(0) 推荐(0) 编辑

2015年6月20日

18Spring后置通知

摘要: Spring后置通知,和前置通知类似,直接看代码:package com.cn.spring.aop.impl;//加减乘除的接口类public interface ArithmeticCalculator { int add(int i, int j); int sub(int i, ... 阅读全文

posted @ 2015-06-20 21:34 jec 阅读(175) 评论(0) 推荐(0) 编辑

17Spring前置通知

摘要: 1).加入jar包:下载地址 spring-beans-4.1.6.RELEASE.jar commons-logging-1.1.3.jar spring-context-4.1.6.RELEASE.jar spring-core-4.1.6.RELEASE.jar spring-exp... 阅读全文

posted @ 2015-06-20 21:27 jec 阅读(447) 评论(0) 推荐(0) 编辑

15Spring AOP基础

摘要: 为什么需要AOP?先来看一段代码:package com.cn.spring.aop.helloworld;//加减乘除的接口类public interface ArithmeticCalculator { int add(int i, int j); int sub(int i, in... 阅读全文

posted @ 2015-06-20 12:53 jec 阅读(162) 评论(0) 推荐(0) 编辑

15Spring泛型依赖注入

摘要: Spring 4.x中可以为子类注入子类对应的泛型类型的成员变量的引用BaseService:有RoleService和UserService两的子类BaseRepepositry:有UserRepository和RoleRepositry两个子类由于 BaseService和 BaseRepepo... 阅读全文

posted @ 2015-06-20 00:09 jec 阅读(189) 评论(0) 推荐(0) 编辑

2015年6月19日

14Spring通过注解配置Bean(2)

摘要: 下面将对13Spring通过注解配置Bean(1)的中Repository、Service、Controller通过注解方式来建立关联。元素还会自动注册AutowiredAnnotationBeanPostProcessor后置处理器实例,该实例可以自动装配具有@Autowired属性。@Autow... 阅读全文

posted @ 2015-06-19 23:07 jec 阅读(410) 评论(0) 推荐(0) 编辑

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 25 下一页

导航