快速搭建spring boot2.0 项目

快速搭建spring boot2.0+mybatis+thymeleaf 项目

使用工具STS 3.9.7(eclipse)

首先创建一个spring boot2.0项目(具体创建方法就不写了)

然后再pom文件里加入这些依赖

application.properties配置文件 这里用的是sqlserver数据库  mysql8的是注释掉的

数据库配置文件

实体类

加上getters and setters

Controller

Service

ServiceImpl

Dao

UserMapper

html页面

效果图

html页面引入静态资源

好了 一个简单的springboot+mybatis的项目就搭建完了

原文地址:https://www.cnblogs.com/0000cjw/p/11661466.html