Archive for the ‘Scala’ Category

At my current project, we use snapshots for versioning certain important states in our application. As we have the requirement to “jump back” to these states for some specialised queries, we needed a way to access a specific snapshot, without having to create a Persistent-Actor / Eventsourced-Behaviour that could mess up the journal of that […]

In an event-sourced environment, you sometimes have to introduce an artificial delay to some actions to make sure read-sides had the time to update themselves. If you’re using the classic routing mechanism with a routes-file, you can add such a delay declaratively, like here: This would delay the response of the update-action by 800 Milliseconds, […]

Zipping a stream with the only element of another stream with Akka Streams

send multipart/form-data with playframework wsClient in scala

Taken from the PlayFramework Google Groups File “conf/routes”: ->      /api                        api.Routes // focus on the big R! ->      /                           website.Routes File “conf/api.routes”: GET    /healthCheck/status     […]

// pdf generation val play2PDF = “it.innove” % “play2-pdf” % “1.5.1” excludeAll( ExclusionRule(organization = “com.typesafe.play”, name = “twirl-api_2.11”), ExclusionRule(organization = “com.typesafe.play”, name = “play-server_2.11”), ExclusionRule(organization = “com.typesafe.play”, name = “play-java_2.11”), ExclusionRule(organization = “com.typesafe.play”, name = “play-netty-server_2.11”), ExclusionRule(organization = “com.typesafe.play”, name = “play-logback_2.11”) ) Unfortunately, it’s required to hardcode the Scala Version into the Artifact name.. […]

Shows how to start the SBT with the YourKit Agent enabled on MacOS X (with default installation path)

Use your templates with both Java and Scala Controllers in PlayFramework 2.x and avoid getting “RuntimeException: There is no HTTP Context available from here.”.

I’m using PlayFramework 2.3 [1] on a new project of mine. Because I want the project to be safe by default, I enabled CSRF (Cross Site Request Forgery) Protection globally [2] [3]. In this project, I’m doing a pass-through of some legacy pages using a custom proxy I’ve built. These pages don’t know the concept of […]


top