Почему Play добавил ROUTE_COMMENTS - PullRequest
0 голосов
/ 20 сентября 2018

В моем заявлении, когда я получаю запрос, я его распечатываю.Я недавно заметил, что входящий запрос имеет следующую информацию.Комментарий совпадает с комментариями, которые я написал в файле маршрутов, но почему и как он содержится в запросе и какова цель или 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?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...