Home > Back-end >  About mybatis mapper. The problem of XML, a great god answers
About mybatis mapper. The problem of XML, a great god answers

Time:05-04

Today I made a small springboot and mybatis project, the entity class is generated by reverse engineering, mapper, and mapper XML, I use annotations to write common query is normal use, automatically generated inside when I use mapper mapper to add and delete method would be to find XML mistakes when, so I in the yml file configured the mapper - locations: the classpath: mybatis mapper/*. XML this way, the results appeared a new error, strives for the great god answer ah
The first line complete Error like this: org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'adminController: Unsatisfied dependency expressed through the field' iCarDetail '; Nested exception is org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'carDetailImpl: Unsatisfied dependency expressed through the field' carDetailMapper '; Nested exception is org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'carDetailMapper defined in the file (C: \ Users \ do not leave time, Desktop, dragon - f \ target \ classes \ called \ aistar \ mapper \ carDetailMapper class] : Unsatisfied dependency expressed through the bean property' sqlSessionFactory '; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'sqlSessionFactory defined in the class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration class] : bean instantiation via the factory method failed; Nested exception is org. Springframework. Beans. BeanInstantiationException: Failed to instantiate [org. Apache. Ibatis. Session. SqlSessionFactory] : the Factory method 'SqlSessionFactory threw the exception. Nested exception is org. Springframework. Core. NestedIOException: Failed to parse mapping resource: 'file [C: \ Users \ do not leave time, Desktop, dragon - f \ target \ classes \ mybatis \ mapper \ CarBrandsMapper XML]'. Nested exception is org. Apache. Ibatis. Builder. BuilderException: Error parsing XML Mapper. The location of The XML is' file [C: \ Users \ do not leave time, Desktop, dragon - f \ target \ classes \ mybatis \ Mapper \ CarBrandsMapper XML] '. The Cause: Java. Lang. IllegalArgumentException: Result Maps collection already contains The value for called. Aistar. Mapper. CarBrandsMapper. BaseResultMap

CodePudding user response:

The Result Maps collection already contains the value for called. Aistar. Mapper. CarBrandsMapper. BaseResultMap
  • Related