IntelliJ IDEA Report Highlighting error when using routes in Controller

millhouse’s answer helped me find the right answer. Play 2.2 (and perhaps earlier versions, haven’t checked) output a scala version of the routes file to project_dir/target/scala-2.10/src_managed/main So for IntelliJ to get the highlighting right you need to make sure that src_managed/main is added as a source folder. The reverse routes for javascript are for some … Read more

Defaults for missing properties in play 2 JSON formats

Play 2.6+ As per @CanardMoussant’s answer, starting with Play 2.6 the play-json macro has been improved and proposes multiple new features including using the default values as placeholders when deserializing : implicit def jsonFormat = Json.using[Json.WithDefaultValues].format[Foo] For play below 2.6 the best option remains using one of the options below : play-json-extra I found out … Read more

When to use Actors vs Futures?

There certainly is no shortage of opinion on the topic of what should and shouldn’t be an actor. Like these two posts: http://noelwelsh.com/programming/2013/03/04/why-i-dont-like-akka-actors/ http://www.chrisstucchio.com/blog/2013/actors_vs_futures.html I don’t think you’re going to find an absolute answer to this question other then that it’s situational and it’s really up to your preferences and your problem. What I can … Read more

How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?

Add the following settings to the Play project: sources in (Compile,doc) := Seq.empty publishArtifact in (Compile, packageDoc) := false With the change it should be as follows: play.Project(appName, appVersion, appDependencies) .settings(scalaVersion := “2.10.3”) .settings(jsSettings : _*) .settings( publishArtifact in (Compile, packageDoc) := false, publishArtifact in packageDoc := false, sources in (Compile,doc) := Seq.empty ) Thanks … Read more

Convert JsonNode object to Map

Got here trying to find the answer myself. Dug a little deeper and found a bit the answer here Basically just use the ObjectMapper to convert the value for you: ObjectMapper mapper = new ObjectMapper(); Map<String, Object> result = mapper.convertValue(jsonNode, new TypeReference<Map<String, Object>>(){});

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)