mybatis 配置
mybatis:
typeAliasesPackage: com.oukele.myspringbootproject.entity
mapperLocations: classpath:mapper/*.xml
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3306/test
username: oukele
password: oukele
数据源
type: com.mchange.v2.c3p0.ComboPooledDataSource
这里是默认配置
spring.devtools.restart.enabled: true
设置重启的目录
spring.devtools.restart.additional-paths: src/main/java
classpath目录下的WEB-INF文件夹内容修改不重启
server:
port: 8081
pom.xml 文件
==========
View Code
这里,我们启动项目,看下能不能启动。
首先在 templates 文件中 新建一个 index.html 网页
然后
最后,
启动成功