I have an interface outside my grails-app as below
@Path("/")
@Produces("application/json")
@Consumes("application/json")
public interface EligibilityCDSService {
@Path("/pushRawData")
@POST
public boolean pushRawData(final Eligibility e);
}
Inside my grails app under resources or src (I have tried both), I have the following implementing class
class MyService implements EligibilityCDSService{
@Override
public boolean pushRawData(Eligibility e){
e.toString()
}
}
When I try to access localhost:8080/pushRawData I get 404
Additional Info (If required): I have my grails app converted as maven and though I am not using any jaxrs annotations inside my grails app, yet I have added dependency for grails jaxrs plugin version 0.8 in my pom.xml
Please help what am I missing.
By Default jaxrs plugin accepts url mapping only /api
I had to update Config.groovy the below property to accept different url paths
org.grails.jaxrs.url.mappings=['/','/api']
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.