Example Spring MVC server that exposes a simple REST interface.
The easiest way to run this project is to import it in IntelliJ IDEA.
- Create a new "Maven" Run/Debug configuration
- Command line:
jetty:run
Simply run mvn clean jetty:run
in your terminal.
Once the server is running, open a REST client (e.g., Postman) and try the following requests:
GET http://localhost:8080/test
GET http://localhost:8080/test/1
POST http://localhost:8080/test {"id":5}
PUT http://localhost:8080/test/6 {"id":6}
DELETE http://localhost:8080/test/5
- Add Hibernate integration
- Generate WAR/EAR file for Tomcat/WebLogic
- Add Freemarker