动态数据源

This commit is contained in:
cdf
2026-01-19 20:48:25 +08:00
parent f6c4d050da
commit cb688ad7ad
3 changed files with 8 additions and 6 deletions

View File

@@ -74,6 +74,12 @@
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
<!--数据库相关********end--> <!--数据库相关********end-->
</dependencies> </dependencies>

View File

@@ -60,11 +60,7 @@
<artifactId>pqs-influx</artifactId> <artifactId>pqs-influx</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -81,7 +81,7 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
private final AuditMapper auditMapper; private final AuditMapper auditMapper;
@Value("${spring.datasource.druid.url}") @Value("${spring.datasource.dynamic.datasource.sjzx.url}")
private String urls; private String urls;
private final GeneralInfo generalInfo; private final GeneralInfo generalInfo;