I am developping a blueprint for JHipster. For now, I prompt the user for the database URL, username and password. I want to then take the user's answers and add it to application-dev.yml.
What I want :
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: userURL
username: userUsername
password: userPassword
hikari:
poolName: Hikari
auto-commit: false
I am already able to get the intended behavior, but that implies that I override the whole JHipster template which is at https://github.com/jhipster/generator-jhipster/blob/main/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
I saw on the JHipster website that you can add application properties by the ApplicationProperties class. Though my supervisor (I am an intern) told me not to go that route.
My thinking is that JHipster is changing constantly and the template for application-dev.yml is prone to change often. I would rather use a function or an algorithm so that when they update JHipster, I get the changes too.
Any ideas or solutions to this particular issue?