Title: [xxx] 关于混合持久化,多数据源的问题,同时使用MySQL和SQL Server,出现一些不兼容的情况 · Issue #840 · APIJSON/APIJSON · GitHub
Open Graph Title: [xxx] 关于混合持久化,多数据源的问题,同时使用MySQL和SQL Server,出现一些不兼容的情况 · Issue #840 · APIJSON/APIJSON
X Title: [xxx] 关于混合持久化,多数据源的问题,同时使用MySQL和SQL Server,出现一些不兼容的情况 · Issue #840 · APIJSON/APIJSON
Description: Description 基于apijson-demo-druid,想实现通过前端控制切换不同数据库类型。实现如下:编写MySQL以及SQLServer配置,通过DemoDataSourceConfig注入MySQL和SQLServer的DruidDataSource,DemoSQLConfig配置的是SQLServer的,并改了一下DemoSQLExecutor的getConnection方法,根据apijson-boot-multi-datasource中对应的方法来...
Open Graph Description: Description 基于apijson-demo-druid,想实现通过前端控制切换不同数据库类型。实现如下:编写MySQL以及SQLServer配置,通过DemoDataSourceConfig注入MySQL和SQLServer的DruidDataSource,DemoSQLConfig配置的是SQLServer的,并改了一下DemoSQLExecutor的getConnection方...
X Description: Description 基于apijson-demo-druid,想实现通过前端控制切换不同数据库类型。实现如下:编写MySQL以及SQLServer配置,通过DemoDataSourceConfig注入MySQL和SQLServer的DruidDataSource,DemoSQLConfig配置的是SQLServer的,并改了一下DemoSQLExecutor的getConnection方...
Opengraph URL: https://github.com/APIJSON/APIJSON/issues/840
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[xxx] 关于混合持久化,多数据源的问题,同时使用MySQL和SQL Server,出现一些不兼容的情况","articleBody":"### Description\n\n基于apijson-demo-druid,想实现通过前端控制切换不同数据库类型。实现如下:编写MySQL以及SQLServer配置,通过DemoDataSourceConfig注入MySQL和SQLServer的DruidDataSource,DemoSQLConfig配置的是SQLServer的,并改了一下DemoSQLExecutor的getConnection方法,根据apijson-boot-multi-datasource中对应的方法来改的。在请求时通过@datasource指定不同数据源,请求SQLServer的没问题,切换到MySQL时,控制台提示SQL异常,虽然确实是通过MYSQL执行的,但是语句格式还是使用的SQLServer的,请问这是我哪里编写的问题吗?\n\napiJson版本:7.1.5\nMySQL:8.0.24\nSQLServer:2022\nJDK:21\nwindows 10\n\n下面是配置\n\u003cimg width=\"1283\" height=\"623\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/af457643-614f-4f10-bbe2-a5ed25311d66\" />\n\n下面是DemoDataSourceConfig\n\u003cimg width=\"914\" height=\"459\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4699d095-c1f2-4dd7-9c8d-2a01b7afde1c\" />\n\n下面是DemoSQLConfig\n\u003cimg width=\"969\" height=\"486\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e4734e83-cb84-4d54-a500-3e93f76f36fb\" />\n\n下面是DemoSQLExecutor\n\u003cimg width=\"1438\" height=\"1237\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/363f0d20-c389-4053-8b4d-74e6c52c340a\" />\n\n控制台异常信息:\n\u003cimg width=\"1750\" height=\"779\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/fcda34bf-7f83-478a-94c2-a2479c4a87a0\" />\n\n请求截图:\n\u003cimg width=\"777\" height=\"275\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/72f15f95-ab2d-4f4c-9a1b-b33bf8557959\" />","author":{"url":"https://github.com/AFatFox","@type":"Person","name":"AFatFox"},"datePublished":"2025-08-29T10:10:12Z","url":"https://github.com/APIJSON/APIJSON/issues/840"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b05fa56a-701c-9adb-6798-81b74cfa86d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A70E:1FA3C2:190E23:22A20A:6AFCA9AD |
| html-safe-nonce | a08a8e071107a7fa81277b554cc867483b7dc0c338137d2f0cd0a8a3d60e23b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzBFOjFGQTNDMjoxOTBFMjM6MjJBMjBBOjZBRkNBOUFEIiwidmlzaXRvcl9pZCI6Ijg5NDcxNDgwNDYwMDU0Nzk4NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5505206b13dfde7e102ec0f5b87f87dd5f6dcce2e3520147908a5e05dbcd355e |
| hovercard-subject-tag | issue:3366297137 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/APIJSON/APIJSON/840/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e63428e9f232735661625f2fcd7706de07485e36ace88553f0bb9bcad5a45471/APIJSON/APIJSON/issues/840 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e63428e9f232735661625f2fcd7706de07485e36ace88553f0bb9bcad5a45471/APIJSON/APIJSON/issues/840 |
| og:image:alt | Description 基于apijson-demo-druid,想实现通过前端控制切换不同数据库类型。实现如下:编写MySQL以及SQLServer配置,通过DemoDataSourceConfig注入MySQL和SQLServer的DruidDataSource,DemoSQLConfig配置的是SQLServer的,并改了一下DemoSQLExecutor的getConnection方... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AFatFox |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3084aead77cbcb4f4904fba53851fa1a0546b0dec3619bd250815e72588dc6d |
| turbo-cache-control | no-preview |
| go-import | github.com/APIJSON/APIJSON git https://github.com/APIJSON/APIJSON.git |
| octolytics-dimension-user_id | 41146037 |
| octolytics-dimension-user_login | APIJSON |
| octolytics-dimension-repository_id | 74359442 |
| octolytics-dimension-repository_nwo | APIJSON/APIJSON |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 74359442 |
| octolytics-dimension-repository_network_root_nwo | APIJSON/APIJSON |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5410e4bebd3e45b138c853ecef3992279d86d5af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width