How to use springboot and mybatis

1.Create an initial project in https://start.spring.io

 

2.Unzip rar file and open with intellij

 

3.add other dependencies in pom.xml

 

4.Create two new packages : dao, entity

5. Add configuration in application.properties

 

6.add a java Class in entity 

 

 7. add an interface in dao package 

 

 8.Add an annotation in DemoApplication.class

9.Add a Directory in resources named mapper:

 

 10.Add an UserDao.xml in mapper

 

 

 

posted @ 2019-04-08 09:59  Weeeeew  阅读(217)  评论(0编辑  收藏  举报