Skip to content

Commit 06c11a2

Browse files
author
litongjava
committed
add server.resources.static-locations = pages
1 parent 7554157 commit 06c11a2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/zh/03_配置/04.md

+17
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,20 @@ String env = EnviormentUtils.get(ConfigKeys.appEnv);
4343

4444
- 确保 `app.properties``app-dev.properties``app-prod.properties` 文件都位于 CLASSPATH 下或者在可访问的文件路径中。
4545
- `tio-boot` 将合并主配置文件和环境特定的配置文件,如果有重复的键,环境特定配置文件中的值将覆盖主配置文件中的值。
46+
47+
## 读取静态文件
48+
49+
tio-boot 支持两种读取静态文件的方式
50+
51+
- 从 classpage 下读取静态文件
52+
53+
```shell
54+
server.resources.static-locations = classpath:/pages
55+
```
56+
57+
- 从文件系统读取静态文件
58+
59+
```shell
60+
#当前目录的的pages目录下读取配置
61+
server.resources.static-locations = pages
62+
```

0 commit comments

Comments
 (0)