我的问题是项目主pom里没有加入子module的依赖导致controller没有被扫到,
解决方式
</dependencyManagement> 标签里加入子module的依赖版本号管理,例如 <dependency> <groupId>com.dtdream</groupId> <artifactId>tag_search</artifactId> <version>${project.version}</version> </dependency> </dependencyManagement>
然后在boostrap主启动的模块的依赖里引入依赖
<dependency> <groupId>com.dtdream</groupId> <artifactId>tag_search</artifactId> </dependency>
然后再clean ,compile
重新启动,就能访问到controller的接口了