Developing a RESTful service – the legacy approach
This example will review the traditional RESTful service development before jumping deep into Spring Boot.
STS will be used to develop this REST/JSON service.
Note
The full source code of this example is available as the legacyrest
project in the code files of this book.
The following are the steps to develop the first RESTful service:
Start STS and set a workspace of choice for this project.
Navigate to File | New | Project.
Select Spring Legacy Project as shown in the following screenshot and click on Next:
Select Spring MVC Project as shown in the following diagram and click on Next:
Select a top-level package name of choice. This example uses
org.rvslab.chapter2.legacyrest
as the top-level package.Then, click on Finish.
This will create a project in the STS workspace with the name
legacyrest
.Before proceeding further,
pom.xml
needs editing.Change the Spring version to
4.2.6.RELEASE
, as follows:<org.springframework-version>4.2.6.RELEASE<...