Home > OS >  Where to put controller service and repository in deployment diagram
Where to put controller service and repository in deployment diagram

Time:11-09

I want to put more in my deployment diagram like the controller layer, the service layer and the repository that are in my spring application. So where shall I put these 3 layers?

Here is my current deployment diagram: enter image description here

Do you think it can be a component inside the Application: java spring artifact or is it wrong to do it this way?

CodePudding user response:

The UML deployment diagram should reflect your architecture. I'm not a spring / java expert, but here some elements based on my understanding:

  • I understand that the Controller corresponds to the MVC controller, i.e. it processes input received by an application. I also read, browsing across the net, that the controller annotation can only be set on a class. As a consequence, I understand that the controller layer must be component of the Application: Java Spring.

  • I understand that the Spring repository can be used inside a Spring container or as a standalone component. So it would seem possible to show it as a component in the Application Java Spring, but if it is used as standalone service on another server, it should be shown elsewhere, i.e. as a separate component inside TomCat, or as a component in another environment on another server.

  • Related