可以使用官方提供的starter:https://github.com/mybatis/mybatis-spring-boot/tree/master/mybatis-spring-boot-samples 如果采用注解的方式就简单了,可参考这个:https://github.com/hoserdude/spring-boot-mybatis-profile-sandbox
可以使用官方提供的starter:https://github.com/mybatis/mybatis-spring-boot/tree/master/mybatis-spring-boot-samples