Jim Shingler
Jim Shingler

Reputation: 56

JHipster - 404 when running executable jar

Given JHipster is using springboot, I created a new empty JHipster project and attempted to run the resulting executable jar (java -jar jhipster-0.1-SNAPSHOT.jar). I am receiving a 404 return code when attempting to access the site http://localhost:8080.

If I do gradle bootRun it works.

Any thoughts?

Gradle OSX Yosemite

Upvotes: 3

Views: 851

Answers (1)

fabwu
fabwu

Reputation: 661

I have the same issue in a maven project when I package the jar with the development profil. Make sure that you use the production profil:

gradlew -Pprod bootRepackage

and then run the jar with the development profil

java -jar jhipster-0.0.1-SNAPSHOT.war

or with the production profil

java -jar jhipster-0.0.1-SNAPSHOT.war --spring.profiles.active=prod

Upvotes: 0

Related Questions