BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News JHipster 8 Upgrades to Spring Boot 3, Hibernate 6.2, Node 18 LTS, Vue 3 and Angular 16

JHipster 8 Upgrades to Spring Boot 3, Hibernate 6.2, Node 18 LTS, Vue 3 and Angular 16

JHipster, the web and microservices applications generator, has recently released version 8.0. New features in this release include setting HashiCorp Consul as the default service discovery mechanism, support for Development Containers, and the enabling of Cross-Origin Resource Sharing (CORS) for each application that acts as a gateway or is a monolith. The latest version includes key refactoring, and unmaintained components were removed.

According to Matt Raible, developer advocate at Okta and a contributor to JHipster, the project relies solely on volunteers, making it more challenging to commit to release dates. Given that no major version has been released since 2021, multiple dependency versions were incremented with this release. Support for both JDK 20 and 21 was added, allowing users to take advantage of previews of simplified structured concurrency (JDK 21) or the second preview of record patterns (JDK 20).

There was a dependency upgrade to Hibernate 6.2.x (unlocking support for Java records and STRUCT types), and build tools were upgraded to Maven 3.9.5 and Gradle 8.4. The project is now on the Spring Boot 3.x release train, even though Raible told InfoQ that "this effort took longer than expected". He also estimates that Spring Boot 3.2 and Angular 17 might be available in an upcoming version, 8.1.0, sometime in December 2023. So will the newly added support for virtual threads and the teaser for project CraC be available for the Spring users, while Angular fans can use deferrable views.

Changes were made on the JavaScript side as well. The Node.js dependency was bumped to 18.17.1, adopting the Node 18 LTS. Angular was upgraded to version 16, Vue was upgraded to version 3, and the test files were moved from the test folder to the main folder for Vue. Moving forward, Vite will be used as the build tool for Vue projects, and Prettier was upgraded to version 3. Node users will also have access to the Fetch API.

Breaking changes in this release include the removal of unmaintained deployment sub-generators: aws, aws-app-service, azure-spring-cloud, cloudfoundry, gae and openshift. Other removed generators include the open-api-client sub-generator, page sub-generator, upgrade-config sub-generator, and spring-controller and spring-service sub-generator.

The npm command may be used to install or upgrade to version 8. For example:

npm install -g generator-jhipster

Raible pointed out that in the future, users could refer to the newly added JHipster 8 Demo Tutorial too. For automatic upgrades, the JHipster upgrade sub-generator can be used on an existing application.

Asked about the smoothest migration path, Raible declared:

Ideally, you’d be able to run `jhipster upgrade` and migrate a v7 project to v8. I tried this with my 21-Points Health project and it didn’t work.

He also pointed out that the newly added Migrate Blueprint might be a possible solution for easier upgrades in the future.

Developers should initially upgrade their version of JHipster, followed by running the upgrade of the sub-generator. After upgrading JHipster, any existing project will still stick to the version with which it was generated. To upgrade the project, developers can run jhipster after deleting the node-modules or jhipster –with-entities which would update the project and all its entities. The entities can also be independently updated by running jhipster entity EntityName.

The full list of closed tickets and merge requests can be consulted online. Developers interested in experimenting with the new version can use JHipster online, the Docker image, or by configuring a development machine via JHipster Devbox. The JHipster team encourages developers to submit any bugs via their official bug-tracker. As pointed out by Raible, the project’s code frequency graph shows that 2023 saw the most active contributions until now. Also, he mentions that starting with this version, the project should be easier to maintain because they "did many refactorings, modularization, and dropped support for unmaintained sub-generators".

About the Author

Rate this Article

Adoption
Style

BT