Skip to content

Provide easy way to add context path to sample curl request #135

Closed
@kpb

Description

@kpb

I have a project named 'myapp'. When I deploy to a web server, the context path is '/myapp'.

Requests to a Controller with a RequestMapping(value="/some/resource") will be accessed with:

$ curl http://example.com/myapp/some/resource ...

The generated snippet will create:

$ curl http://example.com/some/resource

which is only useful for apps deployed to the root context. I don't see an easy way to change this via config. (setting the contextPath on the MockMvc.perform() won't work, because the RequestMapping doesn't include the contextPath).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions