在我的应用程序中,当我收到请求时,我将其打印出来。我最近注意到传入请求包含以下信息。该注释与我在routes文件中编写的注释相匹配,但是为什么在请求中以及如何在注释中显示注释,其目的或ROUTE_COMMENTS
是什么?
Tags -> Map(ROUTE_COMMENTS -> An example controller showing a sample home page
If I don't pass signupMessage="" (even though the index function has a default value for the argument), then I get error
Using different overloaded methods is not allowed. If you are using a single method in combination with default parameters, make sure you declare them all explicitly., ROUTE_PATTERN -> /, ROUTE_CONTROLLER -> controllers.HomeController, ROUTE_ACTION_METHOD -> index, ROUTE_VERB -> GET), Session -> Container<Session(Map())>, Flash -> Container<?>, HandlerDef -> HandlerDef(ReloadableClassLoader(v1){file:/C:/Users/manuc/Documents/manu/codingjedi/code_related/code/frontend/web/target/scala-2.12/classes/},router,controllers.HomeController,index,List(class java.lang.String),GET,/, An example controller showing a sample home page
If I don't pass signupMessage="" (even though the index function has a default value for the argument), then I get error
Using different overloaded methods is not allowed. If you are using a single method in combination with default parameters, make sure you declare them all explicitly.,List()), Id -> 1},
路线是
GET /home controllers.HomeController.index(signupMessage="")
#new page, called when signup is clicked
#If I do /home/:signup then Angular gives error that empty path url segment cannot have parameters: ';signup=error'. It seems its
#because a url parameter (something which is preceded by ; and is generally a key/value pair like signup=error) can be part of a
#a path segment only (something which begins with a /
#Below matches the url /home;signup=error or home;signup=success. The rule for matching urls seem to be everything is matched
#exactly as mentioned unless special characters like :, * or reg exp is used.
GET /home;signup=:result controllers.HomeController.index(result)
有趣的是,语句Using different overloaded methods is not allowed. If you are using a single method in combination with default parameters, make sure you declare them all explicitly.,List()), Id -> 1},
不在我的注释中,因此它似乎是由Play
添加的。这是来自Play
的消息吗?