'Scala Play Framework not found: type AbstractController problem
I have a TaskList App on Scala Play Framework and I am creating the first controller like this
package controllers
import javax.inject._
import play.api.mvc._
import play.api.i18n._
@Singelton
class TaskList1 @Inject{}(cc: ControllerComponents) extends AbstractController(cc){
def taskList = Action {
Ok("Task List")
}
}
But I have this problem when I launch my application enter image description here
Solution 1:[1]
You have few typos here.
It should be:
@Singleton
class TaskList1 @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
// ...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gaël J |
