Множественная шестиугольная архитектура с пружинным пыльникомJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Множественная шестиугольная архитектура с пружинным пыльником

Сообщение Anonymous »


I work on a spring boot application with spring data and hibernate. I am using hexagonal architecture. I have 2 hexagons:
  • ConnexionManagment
  • OrderManagment

Each hexagon interacts with the same table in the database called User. In the OrderManagment hexagon I use User table because user have a list of orders And in ConnexionManagment hexagon I use User table because I need to manage user information when the user subscribes and other things.

So in each hexagon U have added the same UserjpaEntity to interact with table user in the infrastructure layer.

Is it good practice to duplicate class userJpaEntity in each hexagon? Or do I have to create a common hexagon and put all common classes in this hexagon?

To finish we can imagine other hexagon separate by functional domain which need to interact with the same table user in database.

So can you help me to find the best practice? enter image description here Thanks.


Источник: https://stackoverflow.com/questions/775 ... print-boot
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»