Spring Boot – Rename package name

You can rename the spring boot package name by using the finalName tag.

// code omitted

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <war.filename>gconsole</war.filename>
</properties>

// code omitted

<build>
    <finalName>${war.filename}</finalName>
    <plugins>
        <plugin>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-maven-plugin</artifactId>
           <configuration>
                 <mainClass>com.codeomitted.Application</mainClass>
	   </configuration>
	   <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
		    </goals>
		</execution>
	    </executions>	
        </plugin>
    </plugins>
</build>

 

 

Spring Boot – Rename package name

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.