如何使用spring boot / maven更改不同配置文件中index.html的位置?

时间:2015-12-15 20:15:32

标签: java gruntjs spring-boot

目前我们正在努力--spring.profiles.active=dev 并且应用程序采用此文件夹"src/main/webapp"

的前端

当我在"src/main/webapp/dist"

中投放时,我希望从--spring.profiles.active=stage投放应用程序

“dist”文件夹由grunt生成,所有.js和.css缩小文件也与index.html文件一起生成。

1 个答案:

答案 0 :(得分:1)

  1. 创建2个属性文件:

    application-dev.propertiesapplication-stage.properties

  2. 使用spring.view.prefix属性为视图设置前缀(spring.mvc.view.prefix从Spring Boot 1.3版开始。)