I wanted to externalise the email templates to send email notifications so I am storing them in a templates folder in GIT repository which is mapped to our spring-cloud-config server.
The templates folder in git repository has some .html files. Can someone help me with the cloud config URL to access .html files.
Generate App
For example, taking a default microservice app with a baseName of
ms
created withjh import-jdl --inline "application { config { applicationType microservice, baseName ms } }"
Add HTML File
Add a file
src/main/docker/central-server-config/localhost-config/example.html
:Start the JHipster Registry
Start the JHipster Registry with
docker-compose -f src/main/docker/jhipster-registry.yml up -d
which will serve the config and HTML file we created.Request the HTML File
To access this file through the JHipster Registry, you can use the following URL. Any variables in the templates will be replaced with the config variable present in the JHipster Registry config file. The format is:
http://user:password@registry-url:8761/config/app-name/profile/git-label/example.html
:Which will return: