Skip to content

Martini Application Properties

Many applications deliberately expose configuration files to users, empowering them to fine-tune and customize the application's behavior at runtime. In Martini, the <martini-home>/conf/application.properties file serves this purpose. Within this file, we define what are known as application properties, which Martini utilizes during startup or runtime to configure its behavior and guide the operation of its components.

Application properties are invaluable as they facilitate the externalization of Martini's configuration, enabling the application to operate seamlessly across various modes and environments with minimal effort.

Override Application Properties

To simplify the management of configuration changes and streamline the upgrade process, Martini offers an override file feature located under <martini-home>/conf/overrides/override.properties. This functionality allows users to preserve the original configuration stored in <martini-home>/conf/application.properties while selectively overriding specific properties. Restoring properties to their default state is as straightforward as removing them from the override file.

Note: It is a best practice to edit the override.properties file rather than directly editing the application.properties file. While the application.properties file may be updated when upgrading Martini Server Runtime, the overrides folder is not overwritten by the Martini Server Runtime installer, thereby preserving your custom application properties.

Important: Ensure that the mount for the location of the overrides folder is external if the file system for your virtual server or Docker container is ephemeral.

Editing Application Properties

There are several ways to modify an instance's application properties:

  • Using Martini Designer
  • Editing the application.properties file via the file system
  • Using the Martini Server Admin UI
  • Using the Martini Server CLI tool
  • Using the Martini Server REST API

It's important to note that modifications made to the application.properties file may not take immediate effect without restarting Martini or reloading properties via the UI. As a best practice, consider restarting Martini whenever making widespread changes to application properties.

Editing Application Properties using Martini Designer

To edit application properties in Martini Designer, navigate to the menu:

Martini | Edit Properties

The Application Properties will open in an editor. Saved changes will be written to the local embedded Martini Runtime instance.

Editing Application Properties on the File System

You can directly edit the application.properties file located inside:

<martini-home>/conf/application.properties

Note: It is best practice to edit the override.properties rather than directly modifying the application.properties file. See the Override Application Properties section above.

Editing Application Properties via the Martini Server Admin UI

To open the application.properties file in the Martini Server Admin UI:

  1. Hover your cursor over the Server Admin menu.
  2. Select Application Properties from the sub-menu that appears.

You will then be redirected to a page where you can edit the file in the editor.

Read more on the Martini Server Admin UI

Editing Application Properties via the Martini Server CLI Tool

Martini provides a CLI tool that enables you to execute various administration tasks.

Read more on the Martini Server CLI Tool

Editing Application Properties via the Martini Server REST API

Martini provides RESTful endpoints for maintaining and configuring application properties. This API allows you to remotely:

  • Retrieve application properties
  • Add, remove, or update application properties
  • Reload application properties

Read more on the Martini Server REST API