PlayMorphia configuration
This page list all available configuration items along with it’s definition and default value. To use PlayMorphia configuration, you just need to add them into your conf/application.conf
file. If a configuration item is missing from the conf/application.conf
then it’s default value will be used.
ID | Description | default value |
---|
morphia.db.seeds | define mongodb server to be connected. Note, this item takes precedence over morphia.db.host and morphia.db.port . E.g, server1:port1,server2:port2... | None |
morphia.db.host | define the mongodb server host to be connected. Note this configuration is deprecated. Please use morphia.db.seeds instead | localhost |
morphia.db.port | define the mongodb server port to be connected. Note this is deprecated. Please use morphia.db.seeds instead | 27017 |
morphia.db.name | define the database name that is accessed by the application | test |
When either one of the above configuration is missing, PlayMorphia will try to access MongoDB without authentication.
ID | Description | default value |
---|
morphia.logger | Enable/disable Morphia log. When this configuration set to true, Morphia log is enabled. Remove this confiuration item to disable Morphia log | false |
morphia.collection.upload | Set the GridFS collection name | uploads |
morphia.id.type | Define the default ID field type. Could be any one of "Long " and "ObjectId " | ObjectId |
morphia.postPluginEvent | When set to true, PlayMorphia will post entity lifecycle events to Play plugin’s event framework. Note turning on this configuration might impact performance a little bit | false |
morphia.autoRegisterEventHandler | When set to true, PlayMorphia will automatically register lifecycle event handler using annotations. See here | true |
morphia.defaultWriteConcern | Set default writeconcern. Could one of "FSYNC_SAFE ", "NONE ", "NORMAL ", "REPLICAS_SAFE ", "SAFE ". See here for details | SAFE |
- Getting start
- “Morphia documetation home”#home