简体   繁体   English

如何使用Spring Boot设置Spring Multi Maven模块

[英]How to set up Spring multi maven module using spring boot

I would like to evolve my Spring application with a better architecture. 我想用更好的架构来开发我的Spring应用程序。 The technologies I'm using are : spring portfolio ( spring mvc, spring test, spring Web, spring core, spring rest...) Today I'm using packaging to structure the different layers of my application: models, services, api and of course web where I have my controllers. 我正在使用的技术有:spring产品组合(spring mvc,spring测试,spring Web,spring core,spring rest ...)今天,我正在使用包装来构造应用程序的不同层:模型,服务,api和当然是网络,我有我的控制器。

I would like to know how can I use the power of spring boot to make a multi module maven architecture with an xml spring configuration for a Web application. 我想知道如何使用Spring Boot的功能来为Web应用程序创建具有XML Spring配置的多模块Maven体系结构。 I read that spring boot have an embedded tomcat and since I'm using eclipse with a separate tomcat server I would like to deploy my application on it and I think that this can create a problem. 我读到该弹簧靴具有嵌入式的tomcat,并且由于我将eclipse与单独的tomcat服务器一起使用,因此我想在其上部署我的应用程序,并且我认为这可能会引起问题。

I already found some links on github with this type of projects most of them are not elaboring an architecture of a Web application and use a class for spring configuration with the embedded tomcat that spring boot offers. 我已经在github上找到了一些与此类项目有关的链接,其中大多数都没有详细说明Web应用程序的体系结构,而是使用带有Spring Boot提供的嵌入式tomcat的Spring配置类。

Thank you 谢谢

Ps: sorry for my bad English ps:对不起,我的英语不好

What you mean by multi module. 您所说的多模块。 If you want to build your jar for multiple environment you can use maven profile for it. 如果要为多个环境构建jar,则可以使用maven配置文件。 Spring boot is nothing but a spring project which ease the configurations for you. Spring Boot只是一个Spring项目,可以为您简化配置。

Regarding deployment to your own server, you have to convert the jar to war. 关于部署到您自己的服务器,您必须将jar转换为war。 Read "What about the Java EE Application Server" section of below link. 阅读下面链接的“关于Java EE应用服务器的知识”部分。

https://spring.io/blog/2014/03/07/deploying-spring-boot-applications https://spring.io/blog/2014/03/07/deploying-spring-boot-applications

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM