diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 3516379b..769dc18a 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -31,9 +31,9 @@ export default defineConfig({ {text: 'Mybatis-Flex 是什么', link: '/zh/what-is-mybatisflex'}, {text: '快速开始', link: '/zh/getting-started'}, {text: 'Maven 依赖', link: '/zh/maven'}, - {text: '和 Spring 整合', link: '/zh/mybatis-flex-with-spring'}, {text: '和同类框架「功能」对比', link: '/zh/comparison'}, {text: '和同类框架「性能」对比', link: '/zh/benchmark'}, + {text: '和 Spring 整合 常见问题', link: '/zh/mybatis-flex-with-spring'}, {text: 'QQ 交流群', link: '/zh/qq-group'}, ] }, diff --git a/docs/zh/mybatis-flex-with-spring.md b/docs/zh/mybatis-flex-with-spring.md index 14aee86e..2c8e2fd1 100644 --- a/docs/zh/mybatis-flex-with-spring.md +++ b/docs/zh/mybatis-flex-with-spring.md @@ -8,7 +8,9 @@ ## 常见问题 -**问题1:** 使用 Druid 数据源无法启动的问题,主要是因为在数据源的配置中,未添加 `type` 字段的配置: +**问题1: 使用 Druid 数据源无法启动** + +原因是在数据源的配置中,未添加 `type` 字段的配置: ```yaml 3 spring: @@ -24,3 +26,29 @@ spring: > 若使用多数据源,或者把数据源配置到 `mybatis-flex.datasource` 下,使用 mybatis-flex 的数据源发现机制, > 使用 druid 也可以不用配置 type,更多文档参考:[多数据源章节](./multi-datasource.md)。 +**问题2:整合 Springboot 3 出现 ClassNotFoundException: NestedIOException 的错误** + +需要排除 flex 中的 mybatis-spring 的依赖,主动添加最新版本的 mybatis-spring 依赖。 + + +```xml 6,7,8,9 + + com.mybatis-flex + mybatis-flex-spring-boot-starter + ${mybatis-flex.version} + + + org.mybatis + mybatis-spring + + + + + + + org.mybatis + mybatis-spring + 3.0.1 + +``` +