1. 技术目标
2. 技术介绍
3. 环境配置
3.1 基础环境配置
4. 技术详解
4.1 项目搭建
4.2 项目配置文件
4.2.1 添加主配置文件application.yml
spring:
profiles:
active: dev
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
http:
multipart:
max-file-size: 100MB
max-request-size: 100MB
enabled: true
server:
tomcat:
uri-encoding: UTF-8
max-threads: 1000
min-spare-threads: 30
port: 8080
context-path: /Learning-03-04
logging:
level: debug
4.2.2 添加开发配置文件application-dev.properties
server.port=8081
spring.datasource.username=root
spring.datasource.password=123654
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/test?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
4.2.3 添加测试配置文件application-test.properties
server.port=8082
spring.datasource.username=root
spring.datasource.password=123654
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/test?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
4.2.4 添加生产配置文件application-prod.yml
server:
port: 8080
spring:
datasource:
url: jdbc:mysql://localhost:3306/invoice?useOldAliasMetadataBehavior=true&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
username: root
password: 123654
4.3 项目环境切换

4.4 项目同时启动多个环境
4.1.1 项目打包
4.1.1 项目不同环境运行



5. 技术总结
6. 重点强调