swagger-api / swagger-samples

Samples for the various Swagger projects under swagger-api
http://swagger.io
Apache License 2.0
537 stars 887 forks source link

java-spring-boot 404 on every endpoint #121

Open goraxe opened 6 years ago

goraxe commented 6 years ago

Tried to get the spring-boot app running, I'm just looking for something to quickly demo something else.

mvn spring-boot:run

it fires up and starts listening on port 8080

curl localhost:8080 ... 404

curl -H 'content-type:application/json' localhost:8080/swagger.json ... 404

curl localhost:8080/pets/1 ... 404

janzieg commented 6 years ago

i got the same issue for java-jersey2 sample project

http://localhost:8002/sample/openapi.yaml ...404

zejun19 commented 1 year ago

server.contextPath=/v2 in application.properties

use localhost:8080/v2/pets/1