All Projects → payintech → play-ebean

payintech / play-ebean

Licence: other
Play Ebean module

Projects that are alternatives of or similar to play-ebean

Play Redis
Play framework 2 cache plugin as an adapter to redis-server
Stars: ✭ 152 (+424.14%)
Mutual labels:  play-framework, playframework
Playframework
Play Framework
Stars: ✭ 12,041 (+41420.69%)
Mutual labels:  play, playframework
play-rconf
Remote configuration for Play Framework
Stars: ✭ 17 (-41.38%)
Mutual labels:  play, playframework
play-docker-aws-tutorial
101 tutorial: How to deploy Play application to Amazon Lightsail (AWS) using Docker
Stars: ✭ 25 (-13.79%)
Mutual labels:  play-framework, play
Play Mailer
Play mailer plugin
Stars: ✭ 243 (+737.93%)
Mutual labels:  play-framework, playframework
Lagom
Reactive Microservices for the JVM
Stars: ✭ 2,590 (+8831.03%)
Mutual labels:  play, playframework
Play2 Crud
Simple CRUD & DAO implementation for play2
Stars: ✭ 146 (+403.45%)
Mutual labels:  play-framework, playframework
Kebs
Scala library to eliminate boilerplate
Stars: ✭ 113 (+289.66%)
Mutual labels:  play-framework, play
Play26 Swagger Reactivemongo
A fully featured CRUD app built with Play 2.6, Swagger and ReactiveMongo
Stars: ✭ 36 (+24.14%)
Mutual labels:  play-framework, play
slim-play
Slim Play app
Stars: ✭ 76 (+162.07%)
Mutual labels:  play-framework, play
Play Pdf
A PDF module for the Play framework
Stars: ✭ 108 (+272.41%)
Mutual labels:  play-framework, playframework
sbt-sass
A fork of the sbt-sass repository which seems to be abandoned.
Stars: ✭ 32 (+10.34%)
Mutual labels:  play-framework, playframework
Scala Play React Seed
❄️ Java Play 2.7.x + React seed project with full-fledged build process
Stars: ✭ 180 (+520.69%)
Mutual labels:  play-framework
Play Json Derived Codecs
Stars: ✭ 179 (+517.24%)
Mutual labels:  play-framework
play-java-chatroom-example
Example Chatroom with Java API
Stars: ✭ 33 (+13.79%)
Mutual labels:  playframework
play-silhouette-rest-mongo
Seed project for Play Framework 2.6 with Silhouette 5.0, exposing a REST API for sign-up and signin. ReactiveMongo + MongoDB used as a backing store.
Stars: ✭ 19 (-34.48%)
Mutual labels:  play-framework
Pac4j
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 2,097 (+7131.03%)
Mutual labels:  play-framework
Api First Hand
API-First bootstrapping tool for building RESTful web services from a Swagger/OpenAPI spec
Stars: ✭ 138 (+375.86%)
Mutual labels:  play-framework
cachecontrol
Minimal HTTP cache management library in Scala
Stars: ✭ 13 (-55.17%)
Mutual labels:  playframework
intelliroutes
Support for Play Routes in IntelliJ IDEA
Stars: ✭ 21 (-27.59%)
Mutual labels:  play-framework

play-ebean

Latest release Build Status GitHub license

This module provides Ebean support for Play Framework 2.5 and superior.


About this project

This project was forked from the original repository playframework/play-ebean. It allows usage of Ebean ORM and Ebean Migration into a Play Framework project. Ebean is compatible with all major databases: CockroachDB, MariaDB, MSSQL, MySQL, PostgreSQL, SQLite, ...

Version

The plugin is built against the latest versions of Play Framework. If you are using an older version of Play Framework, think to use the right plugin version.

Play Framework 2.8.x

Plugin Min. Play Framework Ebean ORM Ebean Agent Ebean Migration
22.03RC1 * 2.8.0 12.15.1 12.15.1 12.15.1
21.02 2.8.0 12.7.1 12.7.1 12.4.0
20.02 2.8.0 12.1.13 12.1.12 12.1.4

About 22.03RC1

This version is a release candidate due to a lot of changes that are currently breaking some tests. It is also heavily inspired by the work done on the official Play Framework release of play-ebean 6.2.0-RC4. Due to the deprecation of Play Enhancer. The models now need to have Getters and Setters created by yourself.

Thanks to all the Play Framework guys for the update for SBT on the official repo !

Play Framework 2.7.x

Note: Since the version 19.10u1, the plugin add support for scala 2.13 and drop the support for scala 2.11. The last version available for scala 2.11 is the 19.10.

Plugin Min. Play Framework Ebean ORM Ebean Agent Ebean Migration
19.10u1 2.7.3 11.45.1 11.45.1 11.21.1
19.10 2.7.3 11.45.1 11.45.1 11.21.1

Play Framework 2.6.x

Note: Since the version 17.12, the plugin need SBT 1.0

Plugin Min. Play Framework Ebean ORM Ebean Agent Ebean Migration
19.07 2.6.20 11.41.1 11.41.1 11.16.2
19.06 2.6.20 11.39.1 11.39.1 11.16.1
19.04 2.6.20 11.36.4 11.36.4 11.14.1
19.03 2.6.20 11.35.1 11.34.1 11.14.1
19.02 2.6.20 11.33.1 11.27.1 11.13.1
19.01 2.6.20 11.32.1 11.27.1 11.13.1
18.12 2.6.20 11.31.1 11.26.1 11.12.1
18.11 2.6.20 11.26.1 11.26.1 11.11.1
18.10 2.6.20 11.22.10 11.11.1 11.9.1
18.08 2.6.15 11.22.1 11.11.1 11.9.1
18.06 2.6.15 11.17.5 11.11.1 11.5.4
18.05 2.6.12 11.15.10 11.11.1 11.5.4
18.04u1 2.6.12 11.15.3 11.11.1 11.5.1
18.04 2.6.12 11.15.3 11.11.1 11.5.1
18.03 2.6.10 11.14.2 11.10.1 11.3.1
18.02u1 2.6.10 11.10.2 11.9.1 11.3.1
18.02 2.6.10 11.10.1 11.9.1 11.3.1
18.01u1 2.6.10 11.8.1 11.5.1 11.2.1
18.01 2.6.10 11.7.1 11.5.1 11.2.1
17.12 2.6.6 11.6.1 11.5.1 11.1.1
17.11 2.6.6 11.4.1 11.4.1 11.1.1
17.10 2.6.3 11.1.1 11.1.1 10.3.1
17.09 2.6.3 10.4.7 10.4.1 10.3.1
17.08 2.6.1 10.4.2 10.3.1 10.1.11
17.07 2.6.1 10.4.1 10.3.1 10.1.11
17.06 2.6.0 10.3.1 10.2.1 10.1.8

Play Framework 2.5.x

Plugin Min. Play Framework Ebean ORM Ebean Agent Ebean Migration
17.05 2.5.15 10.3.1 10.2.1 10.1.8
17.04 2.5.13 10.2.1 10.1.7 10.1.5
17.03 2.5.12 10.1.7 10.1.6 10.1.4
17.02 2.5.12 10.1.6 10.1.2 10.1.3
17.01 2.5.10 10.1.3 10.1.2 -
16.12 2.5.10 9.3.1 8.2.1 -
16.11 2.5.10 9.1.2 8.1.1 -

How to use

Add the module to your Play application

play-ebean can be easily added to your Play application by adding the following line in the file project/plugin.sbt. You have to replace YY.MM with the release number you want to use from available releases.

addSbtPlugin("com.payintech" % "sbt-play-ebean" % "YY.MM")

Note: If you are already using sbt-play-ebean provided by com.typesafe.sbt, you have to comment or remove the line to avoid any conflicts.

Configure the module

You can configure the module by adding the following keys on your application.conf file :

## Ebean
# https://github.com/payintech/play-ebean
# ~~~~~
ebean {
  servers {

    # You can declare as many servers as you want.
    # By convention, the default server is named `default`
    default {

      # Locations of the classes to enhance
      enhancement = ["models.*"]

      # Extra server settings
      settings {

        # Set to true if this server is Document store only
        onlyUseDocStore = false

        # Set to true to quote all fields (useful if you use
        # reserved keywords as field names)
        allQuotedIdentifiers = false

        # Set to true to disable L2 caching. Typically useful in performance testing
        disableL2Cache = false

        # Encryption key manager to use for fields annotated with @Encrypted
        encryptKeyManager = "com.zero_x_baadf00d.ebean.encryption.StandardEncryptKeyManager"

        # Set the user provider. This is used to populate @WhoCreated, @WhoModified an
        # support other audit features
        currentUserProvider = "com.zero_x_baadf00d.ebean.provider.CustomUserProvider"

        # Set the tenant provider
        currentTenantProvider = "com.zero_x_baadf00d.ebean.provider.CustomTenantProvider"
      }

      # Document store
      docstore {

        # URL of the ElasticSearch server to use
        url = "http://127.0.0.1:9200"

        # Enable document store integration
        active = true

        # Set the relative file system path to resources when generating mapping files
        pathToResources = "conf"

        # Generate mapping files for each index and these will by default be
        # generated into ${pathToResources} under "elastic-mapping"
        generateMapping = false

        # Drop and re-create all indexes
        dropCreate = false

        # Create only indexes that have not already been defined
        create = false

        # Allow connections to document stores (like ElasticSearch) that have
        # self signed certificates
        allowAllCertificates = false
      }
      
      # Extra Ebean server configuration
      # Use full classpath (ie: ebean.DemoEbeanServerExtraConfig)
      extra-config = [
      ]
    }
  }

  # Ebean clustering
  # Read more at http://ebean-orm.github.io/docs/features/clustering
  # Note that this is specifically for Ebean's ebean-cluster module (L2 cache
  # implementation - near cache based). And this not required if the L2 cache
  # implementation is instead ebean-hazelcast or ebean-ignite.
  clustering {

    # Is clustering enabled?
    isActive = false

    # Define the "IP" and "PORT" (eg: 127.0.0.1:9942) of the current node
    currentNode = "127.0.0.1:9942"

    # Define all members of the cluster. This list must include the current node too
    members = [
      "127.0.0.1:9942"
    ]
  }

  # Ebean DB Migration
  # Read more at https://github.com/ebean-orm/ebean-dbmigration
  dbmigration {

    # Is Ebean DB Migration enabled?
    enabled = false

    # Defines where are located migration SQL scripts. Ebean DB Migration
    # will search SQL scripts in "conf/${migrationPath}/${serverName}-${appMode}"
    # or "conf/${migrationPath}/${serverName}"
    #
    # By example, in your run your application in development mode:
    #     conf/dbmigration/<platform>/default-dev/
    #  OR conf/dbmigration/<platform>/default/
    #  OR conf/dbmigration/default-dev/
    #  OR conf/dbmigration/default/
    migrationPath = "dbmigration"

    # Is the migration must be auto applied?
    autoApply = false
    
    # Override the platform name detection
    # https://github.com/ebean-orm/ebean-migration/blob/master/src/main/java/io/ebean/migration/DbPlatformNames.java
    platformName = null
  }
}

Override migration mode

In case you need to use run "Dev" migration scripts when your Play application run on "Prod" mode, you could use the environment variable EBEAN_MIGRATION_MODE to override the default value with Dev, Test, Prod or whatever alphanumeric.

Override Ebean version

In case you need to use a newest version of Ebean, you have the possibility to override built-in Ebean version by adding these lines in your build.sbt file.

libraryDependencies ++= Seq(
  .
..
"io.ebean" % "ebean" % "X.Y.Z"
)

dependencyOverrides ++= Seq(
  .
..
"io.ebean" % "ebean" % "X.Y.Z"
)

License

This project is released under terms of the Apache 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].