Exception encountered during context initialization - cancelling refresh attempt: org.springframewor

报错提示:

2023-07-30 23:03:30.929  WARN 1128 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'productController': Unsatisfied dependency expressed through field 'iProductService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'productService': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'productMapper' defined in file [C:\Users\张治\IdeaProjects\java_shop\target\classes\com\java_shop\mall\mapper\productMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: com/java_shop/mall/mapper/ProductMapper (wrong name: com/java_shop/mall/mapper/productMapper)
2023-07-30 23:03:30.929  INFO 1128 --- [  restartedMain] com.alibaba.druid.pool.DruidDataSource   : {dataSource-0} closing ...
2023-07-30 23:03:30.934  INFO 1128 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-07-30 23:03:30.976  INFO 1128 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

拖到最右边发现是文件的大小写出了问题,导致mapper没有映射成功。

你可能感兴趣的:(bug,java,java)