Quick revision
The short answer
First decide whether the service will keep following JHipster at all. JHipster's upgrade regenerates the application with the new version and merges it with our changes through git, so three years of heavy modifications mean many conflicts. If we leave the generator, we treat the code as a normal Spring Boot application and upgrade Boot with OpenRewrite recipes and manual fixes. Either way, we strengthen the tests before touching anything, and we record the decision so future teams know whether the code is still generator-managed.
What to remember
In this answer, we upgraded a heavily modified JHipster application. JHipster's upgrade regenerates the code and merges it with ours through git, so we first measured the drift and did a test merge. With heavy modifications, leaving the generator and upgrading as a normal Spring Boot application with OpenRewrite is usually better; with modest ones, following JHipster keeps its benefits. In both cases we strengthened the tests first, upgraded in small steps, and recorded the decision so future teams know whether the code is still generator-managed.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
First decide whether the service will keep following JHipster at all. JHipster's upgrade regenerates the application with the new version and merges it with our changes through git, so three years of heavy modifications mean many conflicts. If we leave the generator, we treat the code as a normal Spring Boot application and upgrade Boot with OpenRewrite recipes and manual fixes. Either way, we strengthen the tests before touching anything, and we record the decision so future teams know whether the code is still generator-managed.
Why this question is asked
Generated applications age in a particular way. At first, the generator is a big help; after three years of changes, the code is half JHipster and half our own, and the generator's upgrade path no longer fits it well. Meanwhile the Spring Boot version is falling out of support, so doing nothing is not an option. Interviewers ask this scenario to see whether we can make a clear decision with real trade-offs instead of starting a risky merge and hoping. In this answer, we will see how JHipster upgrades work, assess how far the code has drifted, compare the two paths, strengthen the safety net first, carry out the chosen path, and record the decision.
1How JHipster's Upgrade Works
JHipster stores the options used to generate the application in .yo-rc.json and the entity definitions in its .jhipster folder or a JDL file. Its upgrade command uses these to regenerate the whole application with the new JHipster version, on a separate git branch that contains only generated code. Then it merges that branch into our working branch.
The idea is sound: git sees the difference between the old generated code and the new generated code, and applies it on top of our version. Where we never touched a file, the merge is clean. Where we changed a file that the new version also changed, git reports a conflict and we resolve it by hand. Check the current JHipster documentation for the exact command and options of your version, as the upgrade tooling has evolved.
5 messages in order. Play them, or step through them one at a time.
The more we modified, the more of the merge is manual work.
2Assess How Far the Code Has Drifted
Before choosing, we measure the drift. We can regenerate the application with its original JHipster version on a scratch branch and compare it with our current code. The diff tells us how many generated files we changed, how many new files we added and how much of the generated structure we replaced, for example by moving from JHipster's REST resources to our own layering.
Suppose the numbers are 640 generated files, 410 of them modified, plus 300 files of our own, a front end restructured and the security configuration rewritten. That is not a lightly customised JHipster application any more; it is our application that started as JHipster. A test merge on a scratch branch, counting the conflicts, makes the cost concrete.
3Choose a Path: Follow JHipster or Leave It
Following JHipster keeps the generator's benefits: future entities can still be generated, and upgrades bring JHipster's improvements to security and front-end tooling. It is the right choice when modifications are modest, when the team still generates new entities often, and when JHipster's structure matches how the team wants to work.
Leaving the generator means we treat the code as an ordinary Spring Boot and front-end application. We lose generation for new entities, but upgrades become normal upgrades with normal tools, and we can restructure the code freely. For a heavily modified application like the one we measured, this is usually the better path, because each future JHipster upgrade would cost as much as this one.
- Measure drift and do a test mergefiles modified, conflicts
- Modifications modest and generator still used for entities?YesFollow JHipster: upgrade via its mergeNoLeave the generator
- Strengthen the tests firsteither way
- Upgrade in small stepsJHipster versions or Boot versions
- Record the decisionREADME and architecture decision record
5 steps in order. Play them, or step through them one at a time.
4Strengthen the Tests Before Anything Else
Whichever path we take, the upgrade changes thousands of lines, and the tests are the only way to know behaviour stayed the same. JHipster generates tests for each REST resource, but after three years many have been deleted or no longer cover the modified code. So before upgrading, we add tests where the risk is: integration tests for the main API flows, tests for security rules such as which roles can call which endpoints, and a few end-to-end tests for the critical screens.
We also record a baseline: response snapshots for key endpoints and the current test coverage of the modules we changed most. After the upgrade, those snapshots must still match, which catches subtle changes such as JSON date formats or a different default sort order.
5Carrying Out the Chosen Path
If we follow JHipster, we upgrade one JHipster major version at a time, each on its own branch: run the upgrade, resolve conflicts with the drift report open, run the full test suite, and release before the next step. Smaller steps mean smaller merges that people can review.
If we leave the generator, we upgrade Spring Boot like any other application. OpenRewrite recipes automate most of the mechanical work, such as the javax to jakarta package change, the Spring Security configuration changes and renamed properties. We step through Boot versions rather than jumping, fix compile errors and failing tests at each step, and upgrade the front-end framework separately on its own schedule. Removing JHipster-only parts we do not need, such as the generator's configuration files, makes the new status visible in the code itself.
6Record the Decision
The last step is easy to skip and expensive to forget. If we left the generator, a future developer who sees .yo-rc.json, or knows the project started with JHipster, may run the generator and overwrite months of work. So we write an architecture decision record, a short document that states the decision, the date, the reasons and the drift numbers, and we add a line to the README saying the code is no longer generator-managed. If we kept the generator, the record says so, along with the rules for which files the team agrees not to modify, so the next upgrade stays manageable.
7Follow-up questions
Can you leave JHipster partially, for example keep the front end generated?
It is possible but rarely worth it. The generator assumes it owns the whole application, so regenerating only part of it still touches shared files. A cleaner variant is to stop regenerating entirely but keep using the generated code as a style guide for new entities.
How long would you expect such an upgrade to take?
It depends on drift and test coverage, which is why we measure first. A test merge gives the number of conflicts, and a small time-boxed spike, such as upgrading one module, gives a rate. For a heavily modified application, several weeks for a small team is a realistic order of magnitude, and it should be planned like a project.
What about the database changelogs?
Liquibase changelogs that have already run in production must never be edited, because Liquibase checks their checksums. New changes go into new changelog files, whichever path we choose, and the upgrade must not regenerate old ones.
8Conclusion
In this answer, we upgraded a heavily modified JHipster application. JHipster's upgrade regenerates the code and merges it with ours through git, so we first measured the drift and did a test merge. With heavy modifications, leaving the generator and upgrading as a normal Spring Boot application with OpenRewrite is usually better; with modest ones, following JHipster keeps its benefits. In both cases we strengthened the tests first, upgraded in small steps, and recorded the decision so future teams know whether the code is still generator-managed.
Open with
I would start by understanding how JHipster upgrades work and how far we have drifted. Its upgrade regenerates the app with the new version on a separate branch and merges that into ours through git, so every file we modified that the new version also changed becomes a conflict.
Then, if they want more
After three years of heavy changes that can be hundreds of conflicts. So I would regenerate with the original version on a scratch branch, diff it against our code and try a test merge to get real numbers. Then I would make a deliberate decision.
If modifications are modest and we still generate entities, we follow JHipster and upgrade one major version at a time.
If, as it sounds here, most generated files have been changed, I would leave the generator and treat the code as a normal Spring Boot app: OpenRewrite recipes for the Boot upgrade, which handle the jakarta packages, security config and property renames, then fixing what is left, step by step.
Either way, before touching anything I would strengthen the tests around the main API flows and security rules and take response snapshots. Finally I would record the decision in an architecture decision record and the README, so nobody runs the generator later and overwrites our work.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Boot reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "A team built a service with JHipster three years ago, heavily modified the generated...": https://scrivio-interview-library.netlify.app/spring-boot/developer-experience/1effa9ca42/