Fork me on GitHub

An application can run in three modes:

  • DEV (development)
  • TEST (testing)
  • PROD (production).

You can change the runtime mode using the pippo.mode system property (-Dpippo.mode=dev in command line or System.setProperty("pippo.mode", "dev")).

The default mode is PROD.

You can do some business according to this parameter. For example if the runtime mode is DEV then in pippo-freemarker module the cache for templates is disabled.

You can retrieves the current runtime mode using RuntimeMode.getCurrent().