多模块WEB项目集成一个服务启动,SWAGGER文档中找不到子模块中定义的的接口
1.启动模块和引用模块 pox都加入了一个maven的打包插件(用于设定启动的class)如下,导致引用的模块没有加载到启动模块的spring容器中,接口加载失败,swagger文档中找不到对应接口
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>${start-class}</mainClass>
<fork>true</fork>
<!--
Enable the line below to have remote debugging of your application on port 5005
<jvmArguments>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArguments>
-->
</configuration>
</plugin>
解决办法:去依赖模块的pom文件中删除上述配置即可