Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring MVC - Project structure - best practices [closed]

What's the best approach?

1- Create multiple projects:

enter image description here

2- Create a single project:

enter image description here

like image 662
bsferreira Avatar asked May 08 '14 18:05

bsferreira


People also ask

What is the core problem that Spring MVC framework solves?

What Is the Core Problem That Spring MVC Framework Solves? Spring MVC Framework provides decoupled way of developing web applications. With simple concepts like Dispatcher Servlet, ModelAndView and View Resolver, it makes it easy to develop web applications.

Is Spring MVC still used?

@PanadolChong accomodate Spring MVC is still used in some legacy applications, and Spring boot does majority of the configurations under-hood so to have a better understanding of how things work internally, Spring MVC might help.

Why is Spring data rest not recommended in real world applications?

It is not recommended in real-world applications as you are exposing your database entities directly as REST Services. While designing RESTful services, the two most important things that we consider are the domain model and the consumers. But, while using Spring Data REST, none of these parameters are considered.

When should you not use Spring boots?

The complex and time-consuming process of converting a legacy or an existing Spring project to a Spring Boot application; Not suitable for large-scale projects. Although it's great for working with microservices, many developers claim that Spring Boot is not suitable for building monolithic applications.


1 Answers

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.

like image 75
Michael Minella Avatar answered Sep 21 '22 23:09

Michael Minella