Development and Production profiles

JHipster comes with two "profiles":

  • "dev" for development: it focuses on ease of development and productivity
  • "prod" for production: it focuses on performance and scalability

Those profiles come in two different configurations:

  • The Maven profiles are used at build time. For example mvn -Pprod package will package a production application.
  • The Spring profiles work a run time. Some Spring beans will behave differently, depending on the profile.

Spring profiles are set by Maven, so we have a consistancy between the two methods: of course, you should have a "prod" profile on Maven and Spring at the same time.

In default mode, JHipster will use the "dev" profile

If you run the application without Maven, launch the "Application" class (you can probably run it easily from your IDE by right-clicking on it).

If you run the application with Maven, run mvn spring-boot:run

In production, JHipster has to run with the "prod" profile

Use Maven to build the application with the "prod" profile: mvn -Pprod spring-boot:run