- 浏览: 1183 次
最新评论
文章列表
在spring应用层扩展DataSourceTransactionManager ,判读事务属性readOnly实现读写分离
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction. ...
Spring自定义的注解扫描实现Demo
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry ...