Since Spring Boot 1.5, you can complete ignore the error-prone string literal in pom or build.gradle. The repackaging tool (via maven or gradle plugin) will pick the one annotated with @SpringBootApplication
for you. (Refer to this issue for detail: https://github.com/spring-projects/spring-boot/issues/6496 )