dfsg76
dfsg76

Reputation: 524

How to override the spring boot version used by jhipster

my JHipster generated application uses

<jhipster-dependencies.version>2.0.28</jhipster-dependencies.version>

which includes Spring Boot v.2.0.6

But I want to use Spring Boot 2.1.1

What do I need to change in my pom.xml to achieve that. I tried to set <spring-boot.version>2.1.1.RELEASE</spring-boot.version>

But when I build & run, still v2.0.6 is used.

Upvotes: 4

Views: 3258

Answers (2)

Saber Chebka
Saber Chebka

Reputation: 107

I faced the same problem, my jhipster version is 3.9.1 and spring boot's version is 2.2.7.RELEASE.

So to upgrade spring-boot.version to latest 2.7.5:

Add dependency management from Spring Boot before Jhipster as follow:

<dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
    <dependency>
        <groupId>io.github.jhipster</groupId>
        <artifactId>jhipster-dependencies</artifactId>
        <version>${jhipster-dependencies.version}</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
</dependencies>

It worked for me

Upvotes: 2

Joe Seff
Joe Seff

Reputation: 1830

Thanks for asking this question. The comment to your question by Gael pointed me in the right direction. I've just completed an upgrade of my legacy project. Here is how I did it:

  1. Go to this link: https://www.jhipster.tech/upgrading-an-application/
  2. Follow the instructions for automatic upgrade ( Make sure before you upgrade that you create a new branch, there are sure to be merge conflicts).
  3. Resolve the merge conflicts and run your tests.
  4. Commit the changes to avoid having to repeat the work.

Above all read the instructions and understand them before beginning because otherwise you will become frustrated.

You can get the list of JHipster release versions here: https://www.jhipster.tech/releases/

Upvotes: 2

Related Questions