Play Framework For Scala: Compilation error[type Application is not a member of package controllers]

前端 未结 4 873
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-09 03:48

I try to compile a scala example in the book: \"Play for Scala\" but get a following compilation error on Play console:

C:\\Play\\exp\\ch6_implicits>activ         


        
4条回答
  •  甜味超标
    2020-12-09 04:04

    Play 2.4, by default, generates a dependency injected router, unlike previously, when it used a static router. You have two options, remove the routesGenerator line from build.sbt so play will generate a static router, or (better) make your controllers classes instead of objects, and use dependency injection.

提交回复
热议问题