Error in springboot2 Integration Universal mapper

springboot2.x integrates generic mapper tk.mybatis

tk.mybatis.spring.annotation.MapperScan @ MapperScan ("thinkme.demo.mapper") is used in the startup class

all settings are normal, so it"s okay to change to the original mybatis.

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name "indexController": Unsatisfied dependency expressed through field" itemMapper"; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type "thinkme.demo.mapper.ItemMapper" available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@ org.springframework.beans.factory.annotation.Autowired (required=true)}
Dec.20,2021

got it. The defined mapper interface name conflicts repeatedly

Menu