Amending Path annotation (#3553)

* Amending Path annotation

Changed the Path annotation value from "/" to "/{{baseName}}"

* jaxrs-cxf-petstore-server.sh script was not referencing cxf module directory. Included generated files following script run. Have amended Path annotation value to {{contextPath}} and removed public access modifier from template as this is redundant for Java interface definition.
This commit is contained in:
rynger
2016-08-09 16:09:07 +12:00
committed by wing328
parent c4835ea52e
commit 3faee1f6ce
8 changed files with 332 additions and 26 deletions

View File

@@ -12,7 +12,7 @@ import javax.ws.rs.core.Response;
import org.apache.cxf.jaxrs.ext.multipart.*;
@Path("/")
@Path("{{contextPath}}")
public interface {{classname}} {
{{#operations}}
{{#operation}}
@@ -20,7 +20,7 @@ public interface {{classname}} {
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}});
Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}});
{{/operation}}
}
{{/operations}}