欢迎光临
感受代码之美

Spring Boot中@MapperScan注解多个包

单个:

@SpringBootApplication
@MapperScan("org.4spaces.**.dao")
public class Application {
    public static void main(String[] args) {
        // ...
    }
}

多个:

@SpringBootApplication
@MapperScan({"org.4spaces.**.dao","com.v2ray.**.dao"})
public class Application {
    public static void main(String[] args) {
        // ...
    }
}
转载请注明来源:四个空格 » Spring Boot中@MapperScan注解多个包