pom文件
4.0.0 org.springframework.boot spring-boot-starter-parent2.1.3.RELEASE com.example demo0.0.1-SNAPSHOT demo Demo project for Spring Boot 1.8 org.springframework.boot spring-boot-starterorg.springframework.boot spring-boot-starter-weborg.springframework.boot spring-boot-starter-thymeleaforg.springframework.boot spring-boot-starter-testtest org.mybatis.spring.boot mybatis-spring-boot-starter2.1.1 mysql mysql-connector-javaruntime com.github.pagehelper pagehelper-spring-boot-starter1.3.0 org.projectlombok lomboktrue com.baomidou mybatis-plus-boot-starter3.4.2 org.springframework.boot spring-boot-maven-plugin
application.yaml文件
spring:
datasource:
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf-8&serverTimezone=CTT
username: root
password: 2020
driver-class-name: com.mysql.cj.jdbc.Driver
pagehelper:
helperDialect: mysql
reasonable: true # 修改默认值
# mybatis-plus配置
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
typeAliasesPackage: com.qcby.entity
mapperLocations: classpath:mapper
public List
结果展示



