Reputation: 93
I am in very initial stage of our application design. I am trying to decouple application business logic in different (module) Maven projects. All Maven projects will have their own data access layer ( I am using Spring data for this), and independent Rest Service interface.
Now I have tried using spring boot, but spring boot creates standalone executable jar files for each module. But I need to somehow deploy all module jars into single Jetty instance.
I am somewhat trying to implement both micro services and single fat application. Reason being, There may be few clients where user traffic is comparatively very low. So, in such scenarios I feel running independent Jetty for all rest module will be over-kill. But there may be few client where expected user data load is very huge. So, I am trying to implement a flexible solution to meet of requirement.
Can you please suggest if there is anything wrong in my approach.
Upvotes: 2
Views: 154
Reputation: 47895
If you change the Maven packaging type from jar
to war
then the distro will be a WAR file rather than an uber JAR. The WAR file can then be deployed to a standard servlet container, like Jetty.
To facilitate bundling both an uber JAR and a WAR you could adopt one of the following approaches:
<packaging>war</packaging>
and the other would have <packaging>jar</packaging>
Upvotes: 1