Skip to content

Commit 68b1af0

Browse files
author
litongjava
committed
update to app.env
1 parent 85830b7 commit 68b1af0

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

docs/.vuepress/config/sidebar-zh.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
{
7474
"title": "08_认证和授权",
7575
"collapsable": false,
76-
"children": ["08_token/01.md", "08_token/02.md"]
76+
"children": ["08_认证和授权/01.md", "08_认证和授权/02.md"]
7777
},
7878
{
7979
"title": "09_缓存",

docs/zh/02_部署/03.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ java -jar target\tio-boot-web-hello-0.0.1-SNAPSHOT.jar
1616
linux 启动
1717

1818
```java
19-
java -jar tio-boot-web-hello-0.0.1-SNAPSHOT.jar --mode=prod
19+
java -jar tio-boot-web-hello-0.0.1-SNAPSHOT.jar --app.env=prod
2020
```
2121

22+
指定 app.env 为 pord 后会自动读取 app-prod.properties 中的配置,如果不指定默认是 app.properties
2223
测试请求
2324

2425
```
2526
curl http://localhost/
2627
```
2728

28-
打包后文件 tio-boot-web-hello-0.0.1-SNAPSHOT.jar 只有 8.28M,启动时间只用了不到 1s,windows 占用的内存 70M
29+
打包后文件 tio-boot-web-hello-0.0.1-SNAPSHOT.jar 只有 8.28M,启动时间只用了不到 1s,windows 占用的内存 70M

docs/zh/02_部署/04.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ mvn package -DskipTests -Pnative
6767
启动
6868

6969
```shell
70-
./target/web-hello --mode=prod
70+
./target/web-hello --app.env=prod
7171
```

docs/zh/02_部署/05.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ docker run --name web-hello \
1515
-dit -v $(pwd)/target:/app \
1616
-p 8080:80 -w /app \
1717
litongjava/jdk:8u211 \
18-
/usr/java/jdk1.8.0_211/bin/java -jar tio-boot-web-hello-0.0.1-SNAPSHOT.jar --mode=prod
18+
/usr/java/jdk1.8.0_211/bin/java -jar tio-boot-web-hello-0.0.1-SNAPSHOT.jar --app.env=prod
1919
```
2020

2121
注意$(pwd)/target 替换为你的目录
@@ -37,7 +37,7 @@ WORKDIR /app
3737
COPY target/tio-boot-web-hello-0.0.1-SNAPSHOT.jar /app/
3838

3939
# Command to run the jar file
40-
CMD ["/usr/java/jdk1.8.0_211/bin/java", "-jar", "tio-boot-web-hello-0.0.1-SNAPSHOT.jar", "--mode=prod"]
40+
CMD ["/usr/java/jdk1.8.0_211/bin/java", "-jar", "tio-boot-web-hello-0.0.1-SNAPSHOT.jar", "--app.env=prod"]
4141
```
4242

4343
```

0 commit comments

Comments
 (0)