Hi ivyteam

I'm using ivy 7.0.3 to develop RestAPI.

Now i have a api as below

alt text On the right side i define @Path on class body but the left side.

The right it works well on designer and engine. The left only works for Designer. on engine it say restAPI not found (already restart ivy engine)

Does ivy require @Path on class body?

Thanks

asked 23.10.2018 at 07:51

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 23.10.2018 at 07:54


Hi

Yes the Path annotation is needed at class level. This is defined in the JAX-RS standard. See Building RESTful Web Services with JAX-RS or @Path Java Doc

I can not reproduce that this works without the path annotation on class level on a designer (7.0.8). You could use an empty path at class level:

@Path("")
public class PersonServiceEmptyClassAnnotation {

    @GET
    @Path("person-empty")
    public String getPersonInfo() {
        return "info-empty";
    }
}
link

answered 05.11.2018 at 09:09

Christian%20Strebel's gravatar image

Christian St... ♦
3.2k31338
accept rate: 88%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×33

Asked: 23.10.2018 at 07:51

Seen: 1,573 times

Last updated: 05.11.2018 at 09:09