maven+springboot整合mybatis(十二)

<dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>${mybatis-spring-boot-starter}</version>
</dependency>

application.yml里面添加 

mybatis.typeAliasesPackage=com.shxseer.watch.dao
mybatis.mapperLocations=classpath:mapper/*.xml

mapper的xml文件: 

 

dao和service文件:

 这个配置就比较简单,只需要的配置文件里面添加上面俩句话,就可以正常的编写sql的xml了。

猜你喜欢

转载自blog.csdn.net/chehec2010/article/details/89852708