jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

Add an ApplicationProperties needle #17838

Closed Ebsan closed 2 years ago

Ebsan commented 2 years ago
Overview of the feature request

Could a needle be added to ApplicationProperties.java and the corresponding application.yml file?

Motivation for or Use Case

Some modules may require application specific settings to be enabled/disabled by the user. At the moment the best way to do it is to completely regenerate the ApplicationProperties.java file and notify them that they'll have to manually edit the application.yml file. Some needles in the java class and yaml file would really make this process easier.

Related issues or PR

None were found.

mshima commented 2 years ago

ApplicationProperties.Java is a good candidate for a needle, but yaml files are not. Its hierarchy is not friendly for needles and as alternative, check the value parsing with some yaml parser and append the value at the end after a --- line (parsed like a new file). Like this: https://github.com/jhipster/generator-jhipster/blob/95da11612004cc1d517c6b054a942ec462c57d4e/generators/server/templates/src/main/resources/config/application.yml.ejs#L35-L44

mshima commented 2 years ago

@DanielFran bounty claimed https://opencollective.com/generator-jhipster/expenses/100749.

DanielFran commented 2 years ago

@mshima approved