SpringBoot动态切换数据源和数据库
在SpringBoot项目中动态切换数据源和数据库的详细步骤
目录前言步骤一:引入依赖步骤二:配置多个数据源application.properties 示例:步骤三:自定义动态数据源1. 自定义 DynamicDataSource 类2. 定义 DataSourceContextHolder 类3. 配置动态数据源步骤四:切换数据源1.[详细]
2025-08-06 10:32 分类:开发Junit : add handling logic when exception is not expected
I am trying to print the stack trace of the exception. However, for negative test case, only the unexpected exception is printed.[详细]
2022-12-29 05:58 分类:问答