0

I have added below dependency to my pom.xml

<dependency>
    <groupId>org.eclipse.persistence</groupId>
    <artifactId>eclipselink</artifactId>
    <version>3.0.3</version>
</dependency>

This creates a list of extra rest apis, mentioned below:

GET     /api/{version : v\d\.\d|latest}
POST    /api/{version : v\d\.\d|latest}
OPTIONS /api/{version : v\d\.\d|latest}/{context}/entity/{entityName}
POST    /api/{version : v\d\.\d|latest}/{context}/entity/{type}
PUT     /api/{version : v\d\.\d|latest}/{context}/entity/{type}
DELETE  /api/{version : v\d\.\d|latest}/{context}/entity/{type}/{id}
GET     /api/{version : v\d\.\d|latest}/{context}/entity/{type}/{id}
DELETE  /api/{version : v\d\.\d|latest}/{context}/entity/{type}/{id}/{attribute}
GET     /api/{version : v\d\.\d|latest}/{context}/entity/{type}/{id}/{attribute}
POST    /api/{version : v\d\.\d|latest}/{context}/entity/{type}/{id}/{attribute}
GET     /api/{version : v\d\.\d|latest}/{context}/metadata
GET     /api/{version : v\d\.\d|latest}/{context}/metadata-catalog
GET     /api/{version : v\d\.\d|latest}/{context}/metadata-catalog/entity/{entityName}
GET     /api/{version : v\d\.\d|latest}/{context}/metadata-catalog/query/{queryName}
GET     /api/{version : v\d\.\d|latest}/{context}/metadata/entity/{descriptorAlias}
GET     /api/{version : v\d\.\d|latest}/{context}/metadata/query
GET     /api/{version : v\d\.\d|latest}/{context}/metadata/query/{queryName}
GET     /api/{version : v\d\.\d|latest}/{context}/query/{name}
OPTIONS /api/{version : v\d\.\d|latest}/{context}/query/{name}
POST    /api/{version : v\d\.\d|latest}/{context}/query/{name}
GET     /api/{version : v\d\.\d|latest}/{context}/singleResultQuery/{name}

I do not want these extra apis. how do I get rid of them?

When I was using eclipselink version 2.7.x, no extra apis were being created. Now I am moving my project from java ee 8 to jakarta ee 9 and hence changed the version of eclipselink to 3.x. This creates extra apis which i do not want.

  • What did you have when you were using version 2.7.x for dependencies - did you change anything else? I would suspect you should only be using 'org.eclipse.persistence.core' and 'org.eclipse.persistence.jpa' - as the 'eclipselink' artifact includes everything EclipseLink offers, including JPARS (https://eclipse.dev/eclipselink/documentation/2.4/solutions/restful_jpa.htm ). I would have thought there is more setup required, such as including the jar in the war file directly, but I could be wrong though as I've not set it up myself. – Chris Aug 30 '23 at 14:29
  • I used 'org.eclipse.persistence.core' and it solved my problem. Thanks @Chris for your comment. – Tushar Raj Aug 31 '23 at 09:24

0 Answers0