不多BB,直接上代码: public class DataSourceKey { /** * 用户数据源 */ public final static String USER = "userDataSource"; /** * 报表数据源 */ public final static String REPORT = "reportDataSource"; /** * 所有数据源的集合 */ final static List<String> SOURCE
今天遇到了一个奇怪的问题 在没添加事务之前 所有的代码都是好的 , 当我添加了事务之后, 代码报错 org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type available ApplicationContext: <!-- 配置事务 --> <bean id="transactionManager" class="org.s
1. mybatis (SqlSessionTemplate)的动态代理 a) sqlSession的结构 b)SqlSession 结构 public class SqlSessionTemplate implements SqlSession { //代理对象 ------1 private final SqlSession sqlSessionProxy; /** *//构造方法 --------2 */ public SqlSessionTemplate(SqlSessionFactor
介绍下spring数据源连接的源码类:| 1 spring动态切换连接池需要类AbstractRoutingDataSource的源码 2 /* 3 * Copyright 2002-2017 the original author or authors. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in comp