One Play 2 Framework App - use both java and scala

后端 未结 2 2112
深忆病人
深忆病人 2021-02-12 17:41

I want to use morphia for my data access, but I also want to try to use Scala for web content. Is it possible to mix and match Java and Scala files, or if i choose to use Java,

2条回答
  •  Happy的楠姐
    2021-02-12 18:18

    You can definitevelly use both java and scala since Play is a JVM framework, not a Java nor a Scala one.

    So in controllers, you could have a ScalaApplication.scala and a JavaApplication.java if you wish.

    And they are callable (redirectable, ...) from each other.

提交回复
热议问题