1. Serving web content with Spring MVC (hello world)

https://spring.io/guides/gs/serving-web-content/

Ce e important:
– aplicatie web spring boot build-uita cu MAVEN si GRADLE (tool-uri de build)
– annotarile @Controller, @RequestMapping, @RequestParam
– injectarea automata obiectului „model” in controller
– redirectarea catre pagina „greeting” din metoda greeting a controller-urlui
– injectarea „${name}” in view-ul greeting.html
– resurse statice in spring boot web app („src/main/resources/static/index.html”)

Note:
– sistemul de build gradle (https://spring.io/guides/gs/gradle/)
– sistemul de build maven (https://spring.io/guides/gs/maven/)
– proiectul se importa in eclipse ca existing Maven project (anterior in directorul de proiect se executa „mvn eclipse:eclipse” – comanda va crea artefactele de proiect Eclipse)

2. Simple REST service (hello world REST style)

https://spring.io/guides/gs/rest-service/

Ce e important:
– controller-ul intoarce un obiect custom (Greeting) in functie de content-ul ce vine pe request
– spring-ul face marshall la obiectul Greeting intr-un JSON

Note:
– despre JSON (http://www.w3schools.com/js/js_json_intro.asp)
– despre marshalling/unmarshalling (https://en.wikipedia.org/wiki/Marshalling_(computer_science))