报错是这个(粗体的为冲突部分)

org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotationspecified bean name 'c3P0PooledDataSourceMBean' for bean class [com.mchange.v2.c3p0.mbean.C3P0PooledDataSourceMBean] conflicts with existing, noncompatible bean definition of same name and class [com.mchange.v2.c3p0.jboss.C3P0PooledDataSourceMBean]at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:348)

他说名字冲突了,主要是扫描的时候多扫描了一部分

在spring的xml配置文件中,扫描的地方必须只能为持久层的包,不能包含全部的包。如果扫描全部的包就会报错。

Spring整合Mybatis+C3p0报错

Spring整合Mybatis+C3p0报错

 

 

相关文章:

  • 2021-08-17
  • 2021-07-30
  • 2021-04-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
  • 2021-12-17
猜你喜欢
  • 2021-05-19
  • 2022-01-11
  • 2022-01-22
  • 2021-05-27
  • 2021-04-15
  • 2022-12-23
相关资源
相似解决方案