I am now using angular and spring boot to build website project. When we deploy, we will ng build --output-path=../spring-boot-project/src/main/resources/static",
angular and generate a static folder in spring boot, like /resource/static
. Then we build and deploy a .jar file to our prod(or lab) environment.
so when we run the .jar file, how can we pass some environment varibles to angular part(the static files in spring boot project).
More specifically, I want to set angular environment in spring boot application.yml:
spring:
profiles:
active: dev
main:
banner-mode: "off"
---
spring:
profiles: dev
angular.v1: "something1_dev"
angular.v2: "something2_dev"
---
spring:
profiles: prod
angular.v1: "something1_prod"
angular.v2: "something2_prod"
how can I pass these values(different values because of different profiles) to angular side?