Spring MVC - Project structure - best practices [c

2019-01-31 11:43发布

What's the best approach?

1- Create multiple projects:

enter image description here

2- Create a single project:

enter image description here

2条回答
我想做一个坏孩纸
2楼-- · 2019-01-31 12:02

I'd suggest you take a look at Spring's Project Sagan. It's the source code for their current website (http://spring.io). While they used a multi-module approach, it wasn't divided as you are suggesting. They really just pulled out some client work and kept the rest in a single module.

This site was written by the Spring team the way they would use their own tools and released as a reference application to answer questions just like this. I encourage you to take a look here: https://github.com/spring-io/sagan.

查看更多
聊天终结者
3楼-- · 2019-01-31 12:17

The point is to ask yourself what is the point in separation. If you are planning to run them in different containers on different servers, then it makes sense. If it is a large project, it makes sense to separate.

查看更多
登录 后发表回答