I am currently learning ReactJS and am using the following seed-project;
In order, I have upgraded;
- Scala 2.12.8
(the application works fine) - sbt 1.2.8
(app works) - Play 2.7.0
(app fails with the following error)
[error] D:\workspace\scala-play-react-seed\project\FrontendRunHook.scala:42:20: method afterStarted overrides nothing.
[error] Note: the super classes of object UIBuildHook contain the following, non final members named afterStarted:
[error] def afterStarted(): Unit
[error] override def afterStarted(addr: InetSocketAddress): Unit = {
[error] ^
There is no mention in the 2.7 migration guide that anything needs to be changed between 2.6 and 2.7 for this method / process.
So;
I removed the override keyword and the application compiles just fine, now - but it refuses to run, now producing a routes error;
Action Not Found
For request 'GET /'
These routes have been tried, in this order:
1GET/controllers.FrontendController.index()
2GET/api/summarycontrollers.HomeController.appSummary
3GET/$file<.+>controllers.FrontendController.assetOrDefault(file:String)
I reviewed the documentation and noticed that the example “afterStarted” method contains no arguments. So I removed the argument from the seed application, and it now works.
Which is great - but I have no idea what removing the argument, might else do.
So I am left with, is this a change within Play 2.7.x - that is;
- at the very least, an undocumented change
- or a bug, that needs addressing.
-Gavin.