{"id":16688639,"url":"https://github.com/hakandilek/play2-crud","last_synced_at":"2026-02-27T11:06:43.551Z","repository":{"id":6669668,"uuid":"7914455","full_name":"hakandilek/play2-crud","owner":"hakandilek","description":"Simple CRUD \u0026 DAO implementation for play2","archived":false,"fork":false,"pushed_at":"2017-04-18T09:43:06.000Z","size":1024,"stargazers_count":142,"open_issues_count":9,"forks_count":52,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-13T15:44:28.467Z","etag":null,"topics":["crud","crud-controllers","dao","java","play-framework","play2-crud","playframework"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hakandilek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-30T12:49:07.000Z","updated_at":"2023-09-08T16:37:26.000Z","dependencies_parsed_at":"2022-08-26T17:52:22.465Z","dependency_job_id":null,"html_url":"https://github.com/hakandilek/play2-crud","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakandilek%2Fplay2-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakandilek%2Fplay2-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakandilek%2Fplay2-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakandilek%2Fplay2-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakandilek","download_url":"https://codeload.github.com/hakandilek/play2-crud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221669470,"owners_count":16860887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud","crud-controllers","dao","java","play-framework","play2-crud","playframework"],"created_at":"2024-10-12T15:44:31.350Z","updated_at":"2026-02-27T11:06:41.546Z","avatar_url":"https://github.com/hakandilek.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"play2-crud\n==========\n\n[![Join the chat at https://gitter.im/hakandilek/play2-crud](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hakandilek/play2-crud?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nPowerful CRUD \u0026amp; DAO implementation with REST interface for [play framework](http://github.com/playframework/play) 2.x\n\nFor the [Typesafe Activator](http://typesafe.com/activator) check [play2-crud-activator](https://github.com/hakandilek/play2-crud-activator). \n\n### Some screenshots\n\n * index page\n   ![crud-index page](/screenshot/index.png)\n\n * create page\n   ![create page](/screenshot/create.png)\n\n * list page\n   ![list page](/screenshot/list.png)\n   \n## Quick Start\n\nFollow these steps to use play2-crud. You can also use it partially just for DAO or CRUD controllers. If you think any part needs further explanation, please report a new issue.\n\n### Add play2-crud dependency\n\nYou can begin with adding play2-crud dependency inside `conf/Build.scala` file.\n\n * Add app dependency:\n\n```\n    val appDependencies = Seq(\n        javaCore, javaJdbc, javaEbean,\n        \"play2-crud\" % \"play2-crud_2.10\" % \"0.7.0\"\n    )\n\n```\n\n * Dependency version is for version 0.7.0 defined, but you can use the latest version.\n\n * Add custom maven repositories:\n\n```\n    val main = play.Project(appName, appVersion, appDependencies).settings(\n        //maven repository\n        resolvers += \"release repository\" at  \"http://hakandilek.github.com/maven-repo/releases/\",\n        resolvers += \"snapshot repository\" at \"http://hakandilek.github.com/maven-repo/snapshots/\"\n    )\n\n```\n\n### Associate Global settings\n#### Direct reference\nIf you don't want to override the play application launcher, you just have to notice to play that the class to use as launcher is now GlobalCRUDSettings. Change the `application.global` configuration key in the `conf/application.conf` file, and use `play.utils.crud.GlobalCRUDSettings`:\n\n```\n...\napplication.global=play.utils.crud.GlobalCRUDSettings\n...\n\n```\n\n### Define routes\n\n```\n# CRUD Controllers\n-\u003e     /app             play.crud.Routes\n\n# REST API\n-\u003e     /api             play.rest.Routes\n\n```\n\n\n### Define model\n\n * Model class has to implement `play.utils.dao.BasicModel` with the type parameter indicating the type of the `@Id` field.\n\n```java\n@Entity\npublic class Sample extends Model implements BasicModel\u003cLong\u003e {\n\n   @Id\n   private Long key;\n\n   @Basic\n   @Required\n   private String name;\n\n   public Long getKey() {\n      return key;\n   }\n\n   public void setKey(Long key) {\n      this.key = key;\n   }\n\n   public String getName() {\n      return name;\n   }\n\n   public void setName(String name) {\n      this.name = name;\n   }\n}\n```\n\n * Here the `Sample` model class implements `BasicModel\u003cLong\u003e` where `key` field indicated with `@Id` is `Long`.\n\n... call [http://localhost:9000/app](http://localhost:9000/app) and voila!\n\n\n# Samples\n   \n   * [Sample with basic dynamic CRUD controllers](https://github.com/hakandilek/play2-crud/tree/master/samples/play2-crud-simple)\n   * [Sample with custom views](https://github.com/hakandilek/play2-crud/tree/master/samples/play2-crud-customView) is a full featured sample.\n   * [Full featured sample with DAO and DAOListeners](https://github.com/hakandilek/play2-crud/tree/master/samples/play2-crud-sample)\n   * [Sample with Cache usage](https://github.com/hakandilek/play2-crud/tree/master/samples/play2-cache-sample)\n \n# HOW-TO\n\n Here you can find some HOW-TO documents introducing some powerful functionality:\n  * [HOW-TO use simple CRUD](docs/simple-crud.md)\n  * [HOW-TO define a custom DAO](docs/custom-dao.md)\n  * [HOW-TO define a custom Controller](docs/custom-controller.md)\n  * [HOW-TO use DAO Listeners](docs/dao-listeners.md)\n  * [HOW-TO use dynamic REST Controllers](docs/rest-controllers.md)\n  * [HOW-TO use custom REST Controllers](docs/custom-rest-controllers.md)\n  * [HOW-TO Override Play Launcher](docs/override-play-launcher.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakandilek%2Fplay2-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakandilek%2Fplay2-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakandilek%2Fplay2-crud/lists"}