2
我有要求使用swagger生成rest api。我写了用于生成Rest API的yaml文件。在我的pom.xml我有使用swagger-codegen-maven-plugin而不依赖于弹簧引导
块引用
`<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.2</version>
<executions>
<execution>
<id>sample-api</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/resources/swagger.yaml</inputSpec>
<output>src/test/java</output>
<language>spring</language>
<configOptions>
<sourceFolder>/</sourceFolder>
</configOptions>
<apiPackage>io.swagger.handler</apiPackage>
<modelPackage>io.swagger.model</modelPackage>
<invokerPackage>io.swagger.handler</invokerPackage>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>`
但是当我执行 “MVN全新安装” 它要求我提供org.springframework.boot依赖。有什么办法可以使用这个插件没有弹簧引导依赖?
尽管此代码可能会回答问题,但提供有关如何解决问题和/或解决问题原因的其他上下文会提高答案的长期价值。 – mx0