java - How to use onRouteRequest in play 2.4? -


how write this scala implementation of "onrouterequest"(from - https://jazzy.id.au/2013/05/08/advanced_routing_in_play_framework.html)

override def onrouterequest(req: requestheader): option[handler] = {   (req.method, req.path) match {     case ("get", "/") => some(controllers.application.index)     case ("post", "/submit") => some(controllers.application.submit)     case _ => none   } } 

in java in play 2.4 ? how create handler object return in java ?

(i not want owerride onrequest, or use {} in routing , not want redirecting, triing dynamic router seo url controller can change in administration, stuck @ scala implementation mentioned everywhere no java implementation)


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -