Get the App
SLTechnology News&Howtos  ›  Development  › 

What if the mybatis interceptor fails after springboot configures multiple data sources

Shulou Source: shulou.com Published: 2022-06-03 10:43:14 11月01日 Update

This article is about what to do when the mybatis interceptor fails after springboot configures multiple data sources. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The configuration file is configured remotely and distributed through springcloudconfig. Uses the Ali Druid data source. And support the read and write separation of one master and multiple slaves. The paging component dynamically sets the total number of total by intercepting method names with the page suffix.

1. Parsing configuration file initialization data source @ Configurationpublic class DataSourceConfiguration {/ * data source type * / @ Value ("${spring.datasource.type}") private Class

Tags: Data data source interceptor configuration code type parameter database file method target agent allocation what to do transaction transaction management content aspect multiple object Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Linux Huawei Apple