根pom
-
-
-
-
-
org.springframework.boot -
spring-boot-maven-plugin -
3.1.3 -
-
-
如何生成jar包?
执行package命令即可
如何运行jar包?
Java –jar jar包位置
Jar包部署对服务器有什么要求?
必须有jre环境





多环境开发-Profiles
---
spring:
config:
activate:
on-profile: 环境名称
如何指定哪个环境的配置生效?
pring:
profiles:
active: 环境名称
-
- spring:
- profiles:
- active: dev
- server:
- servlet:
- context-path: /aaa
- ---
-
- spring:
- config:
- activate:
- on-profile: dev
- server:
- port: 8081
- servlet:
- context-path: /bbb
- ---
-
-
- spring:
- config:
- activate:
- on-profile: test
- server:
- port: 8082
- ---
-
- spring:
- config:
- activate:
- on-profile: pro
-
- server:
- port: 8083
如何是公用和环境中的配置冲突,优先用环境中的配置
