springboot和mybatis整合1(传统dao和SqlSessionTemplate)

目录结构:

第一种方式(dao daoImpl  有mapper.xml)

1-启动类

@SpringBootApplication
public class Applications {
public static void main(String[] args) {
SpringApplication.run(Applications.class, args);
}
}

2-controller类

 3-.service层(接口+实现==这里只有实现,接口就是普通接口无注解)

4-dao层(接口+实现==这里只有实现,接口就是普通接口无注解)

5-mapper.xml

6-application.properties

猜你喜欢

转载自www.cnblogs.com/flz-0429/p/9863259.html
今日推荐