springboot项目目录结构
打包模块需要进行的配置
-
配置文件引入打包插件
<build> <finalName>api</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build>
-
模块的启动类文章来源:https://www.toymoban.com/news/detail-638584.html
@SpringBootApplication public class RootApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(RootApplication.class, args); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(RootApplication.class); } }
-
配置文件
文章来源地址https://www.toymoban.com/news/detail-638584.html
到了这里,关于springboot 多模块 每个模块进行单独打包的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!