FREME Configuration Options

FREME is configured via the file application.properties. In the standalone distribution this file is located in config/application.properties, in the source code it is located insrc/main/resources/application.properties. It is a standard spring property file. You can find additional information on this format in the official spring documentation . Here is an example configuration:

server.port=8080
multipart.maxFileSize: 2048MB
multipart.maxRequestSize: 2048MB
workspace.location=workspace

Each non-empty line contains a configuration option. The first line assigns the value 8080 to configuration option server.port.

If you are interested in loading the default FREME entities like templates or sparqle-converters into your FREME application, have a look at the Initialising FREME article.

List of available configuration options

  • server.port

    This specifies the port that the FREME API will listen to. By default it is 8080.

  • multipart.maxFileSize

    This specifies the maximum file size of a file send to the FREME API via a HTTP POST or PUT request. This is the global configuration option. Individual API endpoints may introduce lower values for the upload file size but individual API endpoints cannot introduce a higher file size than multipart.maxFileSize.

  • multipart.maxRequestSize

    This specifies the maximum file size of a HTTP PUT or POST request send to the FREME API. This is the global configuration option. Individual API endpoints may introduce lower values for the maximum request size but individual API endpoints cannot introduce a higher file size than multipart.maxRequestSize. workspace.location FREME maintains a workspace folder that stores resource files. E.g. all user uploaded templates are stored in a file in this folder. workspace.location configures the location of this workspace folder. This configuration option must be set. It can be set either as a relative path from the FREME installation directory or as an absolute path.

  • admin.create, admin.username, admin.password

    You can create an admin user from the application.properties file using the following configuration.

    admin.username=admin
    admin.password=password
    admin.create=true

    When FREME starts it will check if the user exists in the database and if it has admin rights and create / promote the user to be an admin. The default value for admin.create is false so by default no admin user will be created.

    If a user with the name admin.username already exists, the password will be overwritten with admin.password.

  • mysql database settings

    To connect FREME to a mysql database, use the following configuration:

    spring.datasource.driver-class-name=com.mysql.jdbc.Driver
    spring.datasource.url=jdbc:mysql://localhost/freme
    spring.datasource.username=username
    spring.datasource.password=password

    In the second line, you specify host and database, in the last two lines you configure username and password. This requires an installation of MySQL database. This is the recommended setting for production. If you fill the mysql database (freme) automatically with FREMEs default entries for the first time, as described in the Initialising FREME article, make sure that the schema freme had already been creaed.

  • h2 in-memory database settings

    To make freme use an in-memory h2 database (useful for testing or local installations), add the following configuration:

    spring.datasource.driverClassName = org.h2.Driver
    spring.datasource.url = jdbc:h2:mem:~/freme
    spring.jpa.hibernate.ddl-auto=create-drop

    When you do not provide any database settings then FREME will use an h2 in-memory database. This database will be freshly created upon each start of FREME.

  • h2 file database

    To configure an h2 file database that will persist when you shutdown the broker you can use this configuration:

    spring.datasource.driverClassName = org.h2.Driver
    spring.datasource.url = jdbc:h2:file:~/freme.h2
    spring.jpa.hibernate.ddl-auto=update
  • spring.jpa.hibernate.ddl-auto

    You can configure FREME to generate database schemas for you using this configuration value. Possible values are none (do not auto-generate anything), update (update table schema when it is not up to date) and create-drop (drop existing schema and create a new schema upon every start). Default value is none. For production scenarios we recommend update. You can find more information on automatic schema generation in the offical Spring documentation.

  • Proxy Filter

    The proxy filter can be configured like this:

    proxy.proxy-id.servlet_url: /e-entity/freme-ner/documents
    proxy.proxy-id.target_url: http://example.org/freme-ner

    Have a look at the Proxy Filter reference for further information.

  • freme.einternationalization.endpoint-blacklist

    This parameter can be used to exclude the internalisation filter for certain endpoints. It accepts a comma separated list of regular expressions which will be matched with the endpoint subpath.

    Use this, for instance, if you want to disable internalisation functionality for endpoints which are proxied to another FREME instance that already uses the internalisation filter.

    freme.einternationalization.endpoint-blacklist = /e-entity/freme-ner/documents.*
  • Rate-Limiter Filter

    You can enable and configure the ratelimiter with a set of parameters:

    ratelimiter.enabled=true
    ratelimiter.yaml=ratelimiter.yaml
    ratelimiter.clear.timer=3600000

    Have a look at the RatelImiting reference for further information.

    Note: Ensure that your FREME package loads the rate-limiter.xml if you are intended to use this feature.