
Spring
icanhaha
这个作者很懒,什么都没留下…
展开
-
Spring之五 事务管理
1 事务之HelloWorld 1)在applicationContext中配置事务管理器,及启用声明式事务 2)在方法上添加事务注解 @Transactional(propagation= Propagation.REQUIRES_NEW) public void batchUpd原创 2015-07-22 16:05:26 · 447 阅读 · 0 评论 -
Spring之 集成Junit测试
1. 加入依赖包 junit4 spring-test 2.转载 2015-10-29 10:06:30 · 709 阅读 · 0 评论 -
Spring 之八 整合Mybatis
web.xml <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun原创 2015-08-03 17:16:01 · 778 阅读 · 0 评论 -
Spring之 整合Log4j
log4j.properties ### 配置根logger ### log4j.rootLogger = debug , stdout , D , E ### 输出到控制台 ### log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target = System.out log原创 2015-08-26 17:00:42 · 588 阅读 · 0 评论 -
Spring之 国际化
一、基于浏览器语言的国际化配置 使用Spring的MVC,并且配置中有配置Resource文件 Xml代码 [html] view plaincopy bean id="messageSource"class="org.springframework.context.support.ResourceBundleMessageSourc转载 2015-08-20 11:27:21 · 551 阅读 · 0 评论 -
Spring之十三 线程池
线程池 ThreadPoolTaskExecutor 1.applicationContext.xml中配置 2.使用 TaskExecu原创 2016-04-01 14:48:34 · 453 阅读 · 0 评论 -
Spring之十二 整合memcache
1.安装缓存系统 d:\memcached-win32-1.4.4-14\memcached.exe -d install d:\memcached-win32-1.4.4-14\memcached.exe -d start 2.加入jar包 xmemcached-2.0.0.jar 3.添加配置文件xmemcached.xml <beans xmlns="http:原创 2016-03-31 17:00:18 · 1441 阅读 · 0 评论 -
Spring之十一 整合quartz触发器
1.加入jar包 quartz-1.8.5.jar 2.在service中定义定时执行的事件 @Override public void execute(){ System.out.println("execute ******************* "); } 3.添加配置文件 <beans xmlns="http:/原创 2016-03-30 18:12:01 · 395 阅读 · 0 评论 -
Spring之七 整合SSH2
1. 加入 Spring 1) 加入 jar 包 commons-logging-1.1.3.jar spring-aop.4.0.0.REALESE.jar spring-aspects-4.0.0.REALESE.jar spring-beans-4.0.0.REALESE.jar spring-context-4.0.0.REALESE.jar spring-core-原创 2015-07-22 16:13:55 · 689 阅读 · 0 评论 -
Spring之六 在Web环境中使用Spring
方法一:实现ServletContextListener 1 web.xml contextConfigLocation applicationContext.xml com.ithings.listensers.SpringServletContextListener TestServlet com.ithings.se原创 2015-07-22 16:11:41 · 1108 阅读 · 0 评论 -
Spring之十 整合Sqlite
1.加入jar包 sqlite-jdbc-3.8.11.2.jar 2.applicationContext.xml配置文件中配置原创 2016-03-30 16:31:24 · 9422 阅读 · 0 评论 -
Spring之三 AOP
1.引入jar包 aopalliance.jar aspectj.weaver.jar spring-aspects.jar 2.配置文件 1)在配置文件中加入aop的命名空间 xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/sche原创 2015-07-22 16:03:03 · 391 阅读 · 0 评论 -
Spring 之九 整合Spring MVC
1.加入jar包 commons-logging-1.1.3.jar spring-aop-4.0.0.RELEASE.jar spring-beans-4.0.0.RELEASE.jar spring-context-4.0.0.RELEASE.jar spring-core-4.0.0.RELEASE.jar spring-exp原创 2016-03-18 18:00:26 · 465 阅读 · 0 评论 -
Spring之四 Spring对JDBC的支持
测试文件: public class JdbcTest { private ApplicationContext applicationContext; private EmployeeDao employeeDao; { //初始化IOC applicationContext = new ClassPathXmlApplication原创 2015-07-22 16:03:45 · 400 阅读 · 0 评论 -
Spring之二 Bean
1、IOC实例化 BeanFactory: IOC 容器的基本实现. ApplicationContext: 提供了更多的高级特性. 是 BeanFactory 的子接口. BeanFactory 是 Spring 框架的基础设施,面向 Spring 本身; ApplicationContext 面向使用 Spring 框架的开发者,几乎所有的应用场合都直接使用 Application原创 2015-07-22 16:02:17 · 417 阅读 · 0 评论 -
Spring之一 HelloWorld
1、导入jar包 c3p0-0.9.1.2.jar mysql-connector-java-5.1.7-bin.jar commons-logging-1.1.3.jar spring-aop.4.0.0.REALESE.jar spring-aspects-4.0.0.REALESE.jar spring-beans-4.0.0.REALESE.jar spring-cont原创 2015-07-22 16:01:33 · 348 阅读 · 0 评论