• 大小: 794KB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2024-01-28
  • 语言: 其他
  • 标签: springmvc  

资源简介

主流的spring4mvc+Mybatis,并整合了axis2实现webservice接口开发。利用quartz注解实现任务作业功能源码。利用spring RoutingDataSource实现动态数据源切换

资源截图

代码片段和文件信息

package com.jffc.pms.modules.syn.common;

import java.lang.reflect.Method;

import org.apache.log4j.Logger;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;

/**
 * 数据源切换Advice(AOP)
 * 
 * @author wdh
 *
 */
public class DataSourceChooseAspect implements MethodBeforeAdvice AfterReturningAdvice {
private Logger log = Logger.getLogger(this.getClass());

@Override
public void afterReturning(object returnValue Method method object[] args object target) throws Throwable {
DynamicDataSource.setDefaultDataSource();
}

@Override
public void before(Method method object[] args object target) throws Throwable {
Class clazz = target.getClass();
boolean flg = clazz.isAnnotationPresent(RoutingDataSource.class);
if (flg) {
RoutingDataSource datasource = clazz.getAnnotation(RoutingDataSource.class);
DynamicDataSource.setDataSource(datasource.value());
log.info(datasource.value());
}

}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1308  2017-09-09 18:41  pms\pms\.classpath

     文件       1079  2017-08-22 17:53  pms\pms\.project

     文件        639  2017-08-22 16:38  pms\pms\.settings\.jsdtscope

     文件        206  2017-09-09 18:43  pms\pms\.settings\org.eclipse.core.resources.prefs

     文件        736  2017-08-23 14:56  pms\pms\.settings\org.eclipse.jdt.core.prefs

     文件         90  2017-08-22 16:35  pms\pms\.settings\org.eclipse.m2e.core.prefs

     文件        570  2017-09-09 18:41  pms\pms\.settings\org.eclipse.wst.common.component

     文件        252  2017-08-23 14:52  pms\pms\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2017-08-22 16:38  pms\pms\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2017-08-22 16:38  pms\pms\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件         50  2017-08-22 16:38  pms\pms\.settings\org.eclipse.wst.validation.prefs

     文件      12096  2017-09-28 17:54  pms\pms\pom.xml

     文件       1023  2017-09-27 10:41  pms\pms\src\main\java\com\jffc\pms\modules\syn\common\DataSourceChooseAspect.java

     文件        978  2017-09-27 10:43  pms\pms\src\main\java\com\jffc\pms\modules\syn\common\DynamicDataSource.java

     文件       9871  2017-09-26 11:51  pms\pms\src\main\java\com\jffc\pms\modules\syn\common\MultipleSqlSessionTemplate.java

     文件        513  2017-09-26 22:23  pms\pms\src\main\java\com\jffc\pms\modules\syn\common\RoutingDataSource.java

     文件       3969  2017-10-08 11:20  pms\pms\src\main\java\com\jffc\pms\modules\syn\controller\baseController.java

     文件       1564  2017-10-08 12:49  pms\pms\src\main\java\com\jffc\pms\modules\syn\controller\JFMainController.java

     文件       7042  2017-10-08 16:01  pms\pms\src\main\java\com\jffc\pms\modules\syn\controller\LoginController.java

     文件       1330  2017-10-08 10:52  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\baseDao.java

     文件       9457  2017-09-29 09:43  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\baseDao.xml

     文件        207  2017-09-26 21:35  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\CallbaseDao.java

     文件        743  2017-09-26 21:36  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\CallbaseDao.xml

     文件       4128  2017-09-19 15:15  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\EsbaseSynInfoDao.java

     文件      19937  2017-10-08 12:05  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\EsbaseSynInfoDao.xml

     文件       3739  2017-09-30 10:09  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\EsDao.java

     文件       2405  2017-09-12 10:49  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\generatorConfig.xml

     文件       1946  2017-08-23 11:34  pms\pms\src\main\java\com\jffc\pms\modules\syn\dao\UserMapper.xml

     文件        784  2017-10-01 10:19  pms\pms\src\main\java\com\jffc\pms\modules\syn\dto\AreaInfoDTO.java

     文件       1128  2017-09-19 17:19  pms\pms\src\main\java\com\jffc\pms\modules\syn\dto\BuildInfoDTO.java

............此处省略587个文件信息

评论

共有 条评论