①ComponentScan和ComponentScan有重复的部分
@SpringBootApplication
@ComponentScan(basePackages = {"com.ild.market.service.impl","com.ild.market.app"})
@MapperScan(basePackages={"com.ild.market.app.mapper"})
public class AppApplication {
public static void main(String[] args) {
SpringApplication.run(AppApplication.class, args);
}
}
去掉@MapperScan的重复部分即可
因为 ComponentScan 里已经扫描了 Mapper
②Scan扫描和@Mapper重复
去掉@Mapper即可