从https://github.com/playframework/play-socket.io/tree/master/samples/scala/chat创建项目并获得编译错误
overriding method applicationLifecycle in trait MyApplication of type => play.api.inject.DefaultApplicationLifecycle;
lazy value applicationLifecycle in class BuiltInComponentsFromContext of type play.api.inject.ApplicationLifecycle has incompatible type
尝试使用Play 2.6.23和2.7.2
答案 0 :(得分:1)
从MyApplication
中删除以下line应该可以正常工作:
override def applicationLifecycle: DefaultApplicationLifecycle
用
进行测试git clone https://github.com/playframework/play-socket.io.git
cd play-socket
play-socket.io/samples/scala/chat/app/modules/MyApplicationLoader.scala
移除替代项sbt "scalaChat/run"
从根项目目录play-socket/