|
Lab: Web Server Annotation Routing
|
bet | 7/7 | Sana | 21.03.2017 | Hajmi | 1,03 Mb. | | #802 |
Open your HomeController. Add the Controller annotation to our class. You should have at least one method. Add the RequestMapping annotation to it. Give it a proper route. Finally, if your method takes any parameters, add the UriParameter annotation to them. The UriParameter value should correspond to the RequestMapping parameter name:
You can start the server and see if it works:
That’s it! Now you can create your own app.
Create a To Do list application, in which a user should be able to login and logout. If he is logged in, he should be able to add items in a list. If he logouts, he loses all of the current items.
Page of
Follow us:
© Software University Foundation (softuni.org). This work is licensed under the CC-BY-NC-SA license.
|
| |