Ebsan / generator-jhipster-es-entity-reindexer

Generates code to reindex selected entities with Elasticsearch.
Apache License 2.0
3 stars 4 forks source link

application.yml file gets unnecessary changes #5

Closed timothystone closed 2 years ago

timothystone commented 2 years ago

Version 1.0.2 JHipster 7.9.3

During the installation of the generator, the application.yml looks to have received several changes that were unintended.

Specifically:

  1. Removal of management:env:enabled:true
  2. spring:application:name is updated to AndroidSoftwarePortal
  3. spring:main:allow-circular-references:true is set (possibly intentional, but no documented explanation 🤔 )
  4. spring:task:execution:thread-name-prefix is updated to android-software-portal-task-
  5. spring:task:scheduling:thread-name-prefix is updated to android-software-portal-scheduling-
  6. spring:security:oauth2 is removed (somewhat alarming)
  7. jhipster:clientApp:name is updated to androidSoftwarePortalApp
  8. jhipster:api-docs:{title,description} are updated to Android Software Portal API and Android Software Portal API documentation, respectively
  9. jhipster:security:content-security-policy is updated (omitted for brevity)
  10. jhipster:security:oauth2 is removed (somewhat alarming, but possibly an artifact of a missing EOF line feed and Git behaviors)

I reverted these changes, leaving only application:elasticsearch:reindex-on-startup:true

Ebsan commented 2 years ago

Thanks for bringing this up. It's because we have to completely rewrite the application.yml file. I created #3 for this and a subsequent feature request in the main generator-jhipster project (https://github.com/jhipster/generator-jhipster/issues/17838). It's not that easy to create a needle to write into the application.yml file so I can instead try to append a commented out line with the new application properties and tell the user to uncomment if they want when the generator completes.