You can must use parameter with default value:
GET /posting/ controllers.posting.BlogController.allPosts(number: Int = 1)
GET /posting/:number controllers.posting.BlogController.allPosts(number: Int)
You may not use overloaded methods allPosts(Int)
and allPosts
. Since you declared allPosts
with two parameters with default values, Scala sees this method as 4 different methods. You may only use one of them.