描述bug现象
应用启动报错
提供问题复现步骤
每次启动都会报错
提供完整堆栈日志(可选)
Error creating bean with name 'testController' defined in file [/Users/fa/dev/projects/IdeaProjects/me/iuin-main/iuin-mall/commodity-service/build/classes/java/main/com/iuin/commodity/controller/TestController.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'comUserServiceImpl' defined in file [/Users/fa/dev/projects/IdeaProjects/me/iuin-main/iuin-mall/commodity-service/build/classes/java/main/com/iuin/commodity/service/impl/ComUserServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'comUserDao': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'comUserMapper' defined in file [/Users/fa/dev/projects/IdeaProjects/me/iuin-main/iuin-mall/commodity-service/build/classes/java/main/com/iuin/commodity/repostory/mapper/ComUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception with message: 'void org.apache.ibatis.session.Configuration.parsePendingResultMaps(boolean)'
提供问题复现工程(可选)
请尽量提供复现工程,减少大家排错的时间.
当前使用版本
当前环境信息 Java17 + pgsql gradle的依赖版本都放截图上了
描述bug现象 应用启动报错 提供问题复现步骤 每次启动都会报错 提供完整堆栈日志(可选) Error creating bean with name 'testController' defined in file [/Users/fa/dev/projects/IdeaProjects/me/iuin-main/iuin-mall/commodity-service/build/classes/java/main/com/iuin/commodity/controller/TestController.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'comUserServiceImpl' defined in file [/Users/fa/dev/projects/IdeaProjects/me/iuin-main/iuin-mall/commodity-service/build/classes/java/main/com/iuin/commodity/service/impl/ComUserServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'comUserDao': Unsatisfied dependency expressed through field 'baseMapper': Error creating bean with name 'comUserMapper' defined in file [/Users/fa/dev/projects/IdeaProjects/me/iuin-main/iuin-mall/commodity-service/build/classes/java/main/com/iuin/commodity/repostory/mapper/ComUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception with message: 'void org.apache.ibatis.session.Configuration.parsePendingResultMaps(boolean)' 提供问题复现工程(可选) 请尽量提供复现工程,减少大家排错的时间.
从报错和截图上看, 貌似是需要个Configuration.parsePendingResultMaps(boolean), 有参的方法, 但mybatis-3.5.16才有这个方法, 在下面有提供对应的截图和链接
https://github.com/mybatis/mybatis-3/commit/fba61d2b752a84cb439eb03ae56776da4a1d4af7?diff=split&w=0
我试着手动添加了这个依赖到[mybatis-3.5.16]就正常了