Reputation: 11
I have a project:
\--- Project ':backend'
+--- Project ':backend:api'
\--- Project ':backend:shared'
In root module I have configured common dependencies and quarkus plugin Module API contains services, resources and all needed for web server
Module shared contains repositories and entities
project build successfully, but wroks strangely
Questions:
Thanks
when I try to start a API with gradle :backend:api:build :backend:api:quarkusDev
, it works, but after stop a server still running and I can send requests. I think it can be because shared module starts also and after cancel gradle task on api, shared still running. When I try to run again it doesn't work, because port 8080 used, and I need to remove it by 'kill -9 $(lsof -t -i :8080)'
Upvotes: 1
Views: 412
Reputation: 46
It seems to me that splitting into 'shared' and 'api' modules might not be necessary in your case. They appear to be interconnected, forming part of a unified solution within this section of the project. I believe it's more appropriate to divide the business domains into distinct modules—each module dedicated to solving specific problems or addressing particular areas.
I think it's good to define common libraries and framework plugins/dependencies between modules.
Configuring the startup and shutdown of servers should ideally reside in the root, determining what needs to be initiated. When the root is started, all the required modules should begin, and when it's stopped, everything stops. There might be modules in the project that aren't directly linked to the root but handle parallel processes. These could produce artifacts or can be started as a separate project when necessary, necessitating separate completion. However, if modules are interconnected, they should commence from a unified entry point.
Upvotes: 0