Can we bundle multiple spring-boot application as a war and deploy

298 Views Asked by At

We have multiple boot component as well as different schema for each component. We have a business requirement where we need to deliver everything as a war and has to be deployed as a single application on different machine. I am trying to go with plugin architecture, so that one(new) aggregator microservice will be prepared where we can add every boot component as a plugin and then use them as a bundle(war) deployable. By enabling a component with maven plugin we have created two jar one executable jar and another original jar. But how do i add them in to the new aggregator component as a plugin and access the rest layer from each component(plugin).

        <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.3.4.RELEASE</version>
            <configuration>
    <descriptorRefs>
        <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>
    <classifier>exec</classifier>
    
</configuration>
        </plugin>
    </plugins>

Do i need any change in approach/ how do i add a spring-boot jar as a plugin to another project? Any references or sample structure/code would be helpful & thanks in advance.

0

There are 0 best solutions below