playframework-2.3

Anorm's Row object no longer exists in Play 2.3

≡放荡痞女 提交于 2019-12-02 09:12:45
问题 After upgrading to Play 2.3.0 I get this compilation error on object Row not found: value Row I noticed the Row object no longer exists in play 2.3.0 (I've found only the Row trait). Looking at the documentation, pattern matching should be still supported in Play 2.3 http://www.playframework.com/documentation/2.3.x/ScalaAnorm See "Using Pattern Matching" paragraph Here's my code: def findById(aId: Long) = { DB.withConnection { implicit conn => SQL(byIdStmt).on("id" -> aId)().map { case Row(id

Play framework 2 (Java) form data binding with nested allowed fields

心不动则不痛 提交于 2019-12-02 05:44:56
问题 Consider following model: public class Contact { @Required public String name; @Valid public List<Information> informations; } public static class Information { public String securedField; @Required public String email; @Valid public List<Phone> phones; public static class Phone { @Required @Pattern(value = "[0-9.+]+", message = "A valid phone number is required") public String number; } } } I don't want Information securedField to be affected by mass assignment vulnerability. So i decided to

Problems with Compiling Play Application

巧了我就是萌 提交于 2019-12-02 05:10:20
问题 I have been running into a few problems with compiling my play framework application. Sometimes the application runs fine but most of the time these problems both occur with the sbt and activator tools. Here is an example of compiling my application with sbt: [info] Compiling 15 Scala sources and 1 Java source to C:\Server\trunk\target\scala-2.11\classes... [error] C:\Server\trunk\target\scala-2.11\src_managed\main\controllers\routes.java:8: error: cannot find symbol [error] public static

Play framework 2 (Java) form data binding with nested allowed fields

牧云@^-^@ 提交于 2019-12-02 02:04:41
Consider following model: public class Contact { @Required public String name; @Valid public List<Information> informations; } public static class Information { public String securedField; @Required public String email; @Valid public List<Phone> phones; public static class Phone { @Required @Pattern(value = "[0-9.+]+", message = "A valid phone number is required") public String number; } } } I don't want Information securedField to be affected by mass assignment vulnerability . So i decided to set array of allowedFields for Contact Form . As i know, play forms are based on Spring DataBinder ,

NoClassDefFoundError after upgrading to 1.7.0.RELEASE

僤鯓⒐⒋嵵緔 提交于 2019-12-01 14:02:09
I was trying to upgrade my application from 1.6.2.RELEASE to 1.7.0.RELEASE in my playframework project. Insert queries are working fine but there seems to be an issue when spring-data tries to inflate the object using class name after fetching result against query, if there's no result against query then it returns an empty arraylist without throwing error. 1.7.0.RELEASE works fine in another project based on spring-integration framework. below is statck trace :- java.lang.NoClassDefFoundError: models/db/nosql/ACME models.db.nosql.ACME_Instantiator_gtblf6.newInstance(Unknown Source) org

NoClassDefFoundError after upgrading to 1.7.0.RELEASE

▼魔方 西西 提交于 2019-12-01 13:24:38
问题 I was trying to upgrade my application from 1.6.2.RELEASE to 1.7.0.RELEASE in my playframework project. Insert queries are working fine but there seems to be an issue when spring-data tries to inflate the object using class name after fetching result against query, if there's no result against query then it returns an empty arraylist without throwing error. 1.7.0.RELEASE works fine in another project based on spring-integration framework. below is statck trace :- java.lang

IntelliJ Ultimate can't find routes in Play 2.3 (Java) project tests

廉价感情. 提交于 2019-12-01 09:29:24
While my tests run just fine, IntelliJ complains that it can't find the routes object and code auto complete fails to work. I've looked all over the documentation and this should just work. Here is what IntelliJ is reporting Any thoughts as to what might be wrong with my project configuration? Most likely it's connected with the fact that the routes object is generated during project compilation. After compilation, it should be placed under the target/scala-{ver}/src_managed directory. Mark this directory as source and IntelliJ should see routes correctly. You can use one of the following

How do you run the SecureSocial demo?

≡放荡痞女 提交于 2019-12-01 08:45:46
I downloaded securesocial-master.zip from https://github.com/jaliss/securesocial/tree/master 1.After extracting, change directory cd C:\Users\ddd\play\securesocial-master 2.run activator C:\Users\ddd\play\securesocial-master\activator run The Error message: C:\Users\DDD\workspace\securesocial-master>activator run [info] Loading project definition from C:\Users\DDD\workspace\securesocial-m aster\project [info] Set current project to SecureSocial-parent (in build file:/C:/Users/DDD /workspace/securesocial-master/) [info] Updating {file:/C:/Users/DDD/workspace/securesocial-master/}root... [info]

How do you run the SecureSocial demo?

浪子不回头ぞ 提交于 2019-12-01 06:58:59
问题 I downloaded securesocial-master.zip from https://github.com/jaliss/securesocial/tree/master 1.After extracting, change directory cd C:\Users\ddd\play\securesocial-master 2.run activator C:\Users\ddd\play\securesocial-master\activator run The Error message: C:\Users\DDD\workspace\securesocial-master>activator run [info] Loading project definition from C:\Users\DDD\workspace\securesocial-m aster\project [info] Set current project to SecureSocial-parent (in build file:/C:/Users/DDD /workspace

IntelliJ Ultimate can't find routes in Play 2.3 (Java) project tests

馋奶兔 提交于 2019-12-01 05:47:36
问题 While my tests run just fine, IntelliJ complains that it can't find the routes object and code auto complete fails to work. I've looked all over the documentation and this should just work. Here is what IntelliJ is reporting Any thoughts as to what might be wrong with my project configuration? 回答1: Most likely it's connected with the fact that the routes object is generated during project compilation. After compilation, it should be placed under the target/scala-{ver}/src_managed directory.