Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Specify main class for spring boot application jar

Specify Main Class For Spring Boot Application Jar

This is continuation to my previous post. In my previous post, I explained how to generate UBER jar for a spring boot Application using spring boot maven plugin.

Suppose, if your application has more than one Main Class, how can you specify the main class to be executed in the application jar.

Using element, you can specify the main class.



org.springframework.boot
spring-boot-maven-plugin

com.sample.app.App1




repackage







Find the below working application.



This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Specify main class for spring boot application jar

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×