springboot同名启动失败问题!

springboot中,不同库生成不同路径下相同的类名,启动报错!再查后,在启动类加入
@ComponentScan(nameGenerator = CustomNameGenerator.class)
后,service同名得到解决,但是mapper却还是报错!请问怎么解决!

你是mybatis,mybatis自己有自己的实现,

img


springboot直接指定就行了

img

img


这样设置service同名没问题,mapper同名出问题?

img

那就同时设置呗
@MapperScan(nameGenerator = CustomNameGenerator.class)
@SpringBootApplication(nameGenerator = CustomNameGenerator.class)