springboot 集成mybatis

首先创建springboot项目

 

 

 

 

 

 

 

 

 

 

 yml配置

server:
port: 8080
connectionTimeout: 1800000 连接时间
spring:
 profiles: dev 启动环境
datasource:
url: jdbc:mysql://192.168.3.50:3306/314?useSSL=false&characterEncoding=utf8&autoReconnect=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver

mybatis:
mapper-locations: classpath*:mapper/*Mapper.xml
configuration:
database-id: MySQL
fdfs:
soTimeout: 1500
connectTimeout: 600
thumbImage:
width: 150
height: 150
trackerList: 192.168.3.51:22122
logging:
level:
com.example.mapper: debug

然后就写自己的controller,service,mapper,等了,最后postman测试一下就好了(localhost:8080/你自己的controller)
posted @ 2019-11-13 16:50  历尽千帆归来任是少年  阅读(201)  评论(0编辑  收藏  举报