Spring注解方式会出现找不到dao的bean的情况

[解决方案]

在mybatis配置文件中加入以下绑定dao的方式:

<!-- mapper接口namepspace绑定方式 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.namespace.**.dao" /><!-- 多个使用逗号分隔 -->
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
</bean>

相关文章:

  • 2021-10-22
  • 2021-10-01
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2021-09-20
猜你喜欢
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-09-29
  • 2021-06-02
相关资源
相似解决方案