Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

application.yml配置文件resources属性static-locations #27

Open
daberber opened this issue Oct 18, 2018 · 1 comment
Open

application.yml配置文件resources属性static-locations #27

daberber opened this issue Oct 18, 2018 · 1 comment

Comments

@daberber
Copy link

application.yml是配置文件。
那么resources: static-locations: 是配置静态源。
我把前台放到新的文件夹下。
static-locations: file:./web-ui/,file:./static/,/,classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/, classpath:/public/

开发模式下,run Application是可以访问到前台的。
但是mvn打包后,用java -jar 部署运行后。
无法访问前台。一直被拦截到http://localhost:8089/admin/index.html

请问是还需要配置什么?
application-dev.yml 和 application.yml是什么关系呀?

@zhou-hao
Copy link
Member

web-ui 这个目录复制到 和jar的同目录。

application-dev.yml参照 spring-boot的 多环境配置,就是用来切换环境的。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants