===============Springboot2整合mycat动态数据源,实现数据源读写分离============ 1、pom依赖 2、配置文件 3、数据源切换注解类 4、数据源读取配置文件类 5、数据源切换工具类 6、动态数据源路由类 7、aop拦截器 8、service层--动态数据源注解使用 9、启动类 10、访问效果: 读库:http://localhost:8081/user/select 写库:http://localhost:8081/user/update?id=17&mobile=180 日志: