For the sake of simplicity, our product
service has two functions:
List<int> getProducts(int categoryId)
Product getProduct(int prodId)
The intent of the two methods is quite clear. The first returns a list of product IDs given a category ID, and the second returns product details (as an object) given a product ID.
Open your IDE (Eclipse Neon or other) and then create a new Maven project as follows:
- Right-click on
Package Explorer
and selectNew
andProject...
, as shown in the following screenshot:
- Select
Maven Project
:
- In the next window of the wizard, choose
Create a simple project
.
- The next dialog will ask for many parameters. Of these, the
Group Id
(what your project name is) and theArtifact Id
(application or service name) are important. Select reasonable names, as shown in the following screenshot:
- Select
Finish
. You should see the following structure:
If the JRE System Library [JavaSE-1.6]
does not exist, or you have a later version...