application.properties文件
注意后缀是 .properties的
配置格式是这样的
#设置上传文件大小 spring.servlet.multipart.max-file-size=10Mb spring.servlet.multipart.max-request-size=100Mb #设置编码方式 spring.http.encoding.force=true spring.http.encoding.charset=utf-8 spring.http.encoding.enabled=true server.tomcat.uri-encoding=UTF-8
注意后缀是 .yml的
配置格式是这样的,注意 attention:*** .yml文件是有格式要求的***
server:
port: 80
context-path: /
spring:
#数据源配置
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/test
username: root
password: root