playframework-2.4 Questions

2

Solved

I'm trying to migrate my GlobalSettings to playframework 2.4 but I'm having a hard time understanding what I'm supposed to do. Currently my Global is like below, I already moved out the onRequest ...
Unjaundiced asked 5/6, 2015 at 13:35

2

Solved

Consider a repository/DAO method like this, which works great: def countReports(customerId: Long, createdSince: ZonedDateTime) = DB.withConnection { implicit c => SQL"""SELECT COUNT(*) FRO...
Disclaimer asked 4/12, 2015 at 0:38

2

Solved

I'm working with Play JSON API (latest version; Play 2.4), reading incoming JSON into objects. When writing JSON, there's absolutely no problem in using a list of custom objects, as long as I hav...
Impend asked 5/1, 2016 at 15:41

3

Solved

Our application is built on Play 2.4 with Scala 2.11 and Akka. Database used is MySQL. Cache is used heavily in our application.We use Play's default EhCache for caching. Our sample code snippet ...
Tishtisha asked 25/6, 2015 at 5:25

4

Solved

In Play 2.3, I can disable certain filters based on different request path or method. However, I can't find a way to do it in Play 2.4. https://www.playframework.com/documentation/2.4.x/ScalaHttpFi...
Triste asked 23/12, 2015 at 7:57

2

Solved

I don't want to define the default database configuration in the application.conf file. Instead, I want to construct the default EbeanServer programmatically and inject it myself into the DAO. The...
Hartz asked 18/12, 2015 at 7:47

3

In trying to update from Play 2.2 to Play 2.4, I've hit this stumbling block. I've got the memcached2 plugin also added but disabled. my conf file: # Cache configuration # ~~~~~ # To avoid confl...
Testimony asked 5/12, 2015 at 15:57

1

My controller actions use a custom action that looks like: class ActionWithContext @Inject()(....) extends ActionBuilder[ContextAwareRequest] { def invokeBlock[A](request: Request[A], block: (C...
Cristencristi asked 14/12, 2015 at 1:23

1

Solved

Here's an authorisation example from Play Documentation (version 2.0.4; I tried to find a newer version of this document but couldn't): trait Secured { def username(request: RequestHeader) = re...

3

Solved

Play 2.4 app, using dependency injection for service classes. I found that Specs2 chokes when a service class being tested has more than one injected dependency. It fails with "Can't find a constr...

2

With Play 2.4.0 Anorm got moved to an external package and logging got changed to LogBack (http://logback.qos.ch) All well and good but nowhere are the class/package names obvious for tracing SQL ...
Abducent asked 4/6, 2015 at 14:46

1

Solved

I am getting this error after migrating to 2.4 from 2.3. What is the right import statement I should use? error: value routesImport is not a member of object play.Play.autoImport.PlayKeys PlayKey...
Scholar asked 24/11, 2015 at 17:31

1

Solved

I am new to Shapeless. I have a helper class that leverages the shapeless 'Automatic Typeclass Derivation' (https://gist.github.com/negator/fbbcd1b2ce9a85b762b7) to help me populate json reads and ...
Stenosis asked 24/11, 2015 at 19:41

1

Solved

I follow along plays description how to use actors: https://www.playframework.com/documentation/2.4.x/ScalaAkka they suggest something like: @Singleton class Application @Inject() (system: ActorSy...
Stallfeed asked 25/11, 2015 at 12:34

1

Solved

So according to Play 2.4 documentation (https://playframework.com/documentation/2.4.x/ScalaTestingWithScalaTest#Unit-Testing-Controllers), the controller should be set up as a trait like this trai...
Polaroid asked 19/11, 2015 at 12:46

3

Solved

Play can be launched in dev mode (via run), in production mode (via start) or in test mode. Is there a way to provide a different config file (conf/application.conf) depending on which mode it is l...
Kareem asked 11/6, 2015 at 17:50

2

I have an Play2 application using eBean integrated with PostgreSQL database. Basically I have a model TripRequest that as a list of Passengers . The use case is "A trip has several passengers". F...
Tanguay asked 23/10, 2015 at 21:10

1

I would like to write database integration tests against a Play Slick managed database and apply and unapply Evolutions using the helper methods described in the Play documentation namely, Evolutio...
Renferd asked 7/8, 2015 at 18:13

1

Solved

The play documentation about functional tests in java shows two modes using fakeApplication to specify a custom configuration (in memory database in the example) using dependency injection to con...
Semester asked 5/6, 2015 at 9:11

1

I have 2 projects, which are developed using PlayFramework 2.4. Although they are completely separate in concept, they share some common features, like evolution management (Liquibase), CRUD admini...
Araxes asked 28/6, 2015 at 18:52

1

Solved

I'm trying to migrate from anorm to slick, using play 2.4.2, and getting a configuration error: play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [dethcs]] at play.ap...
Tack asked 7/10, 2015 at 19:28

1

Solved

I would like to show some data from the database in the menubar of my web page. To get the data, I have a data-access-object (DAO) which is usually created with Guice injection. How can I use such...
Abmho asked 4/10, 2015 at 14:44

0

I am using Play framework(JAVA) to connect to MYSQL. While interacting with the database, I am getting an intermittent(20% times) the error with exception: play.api.http.HttpErrorHandlerExceptio...
Macaw asked 29/9, 2015 at 1:44

1

Solved

I im trying to print "Hello" to console on application start. Can You explain how to do it? What i tried myself: app/modules/HelloModule.scala: package modules import com.google.inject.Abstract...
September asked 15/9, 2015 at 10:2

0

I need an action method to receive file upload and I want to test this also. But my test is throwing error My action: def upload = Action.async(parse.multipartFormData) { request => val multi...
Soke asked 14/9, 2015 at 14:30

© 2022 - 2024 — McMap. All rights reserved.