我正在创建一个使用apache camel路由的spring boot小项目。我想实现swagger(swagger2版本可以使用camel2.25),但是找不到访问它的url。我试着直接从
application.yml文件如下:
server.port: 8088
springdoc:
swagger-ui:
url: /swagger.yaml
path: /docs/
但我想”localhost:8088/docs/“它一直告诉我什么都没有,
以下是我的路线:
package io.swagger.routes;
import javax.annotation.Generated;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.rest.RestParamType;
import org.springframework.stereotype.Component;
/**
* Generated from Swagger specification by Camel REST DSL generator.
*/
@Generated("org.apache.camel.generator.swagger.PathGenerator")
@Component
public final class MhanzRoutes extends RouteBuilder {
/**
* Defines Apache Camel routes using REST DSL fluent API.
*/
public void configure() {
restConfiguration().component("servlet").contextPath("/").apiContextPath("/*");
rest("/ocs/")
.post("/homologation")
.id("homologation")
.consumes("application/json")
.produces("application/json")
.param()
.name("IntegrationRequestDto")
.type(RestParamType.body)
.required(true)
.description("attivazione nuovo contratto sul portale")
.endParam()
.to("direct:homologation");
}
}
非常感谢你的回答!
暂无答案!
目前还没有任何答案,快来回答吧!