简体   繁体   English

找不到用于弹簧启动页的大笔代码

[英]swagger code generation for spring boot page not found

I git cloned the swagger-api/swagger-codegen project from github and tried the generated code in samples/server/petstore/springboot (mvn package and java -jar ...). 我从github克隆了swagger-api / swagger-codegen项目,并尝试在samples / server / petstore / springboot(mvn包和java -jar ...)中生成了代码。 The server runs but I can't access any of the apis. 服务器正在运行,但是我无法访问任何API。 They always say 404 not found. 他们总是说404 not found。 Any ideas? 有任何想法吗?

turned out that there is a server.contextPath parameter in application.properties of value /v1. 原来,application.properties中有一个server.contextPath参数,值为/ v1。 All urls have this prefix. 所有网址都有此前缀。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM