If you wish to use your own static state you can still do so in a controller that is a class. That is no longer supported, as Play no longer relies on static state. That means the class is suitable for use with dependency injection and can also be instantiated manually using the constructor.īefore Play 2.7.0, Play supported a static routes generator that allowed defining controllers as objects instead of classes. Play’s default routes generator creates a router class that accepts controller instances in an constructor. This means that you’ll see route errors directly in your browser: Routes are defined in the conf/routes file, which is compiled. clients/1542, /photos/list), including the query string This event contains two major pieces of information: The router is the component in charge of translating each incoming HTTP request to an Action.Īn HTTP request is seen as an event by the MVC framework. English ▾ English българин Français 日本語 Türkçe HTTP programming
0 Comments
Leave a Reply. |