0

I have implemented spring boot 2.7.3 version application. Now I want to deploy the application in different port numbers. So I used a maven build... goal like spring-boot:run -Dserver.port=7878 as we use in spring boot 1.x but it is getting deployed in default port defined in application.properties or 8080 only.

Is there any alternate property/goal defined in spring boot 2.7.3 for deploying multiple times with different port numbers?

I found in case of profiles as below: For Spring Boot 2.x+ run has been renamed to spring-boot.run and run.profiles has been renamed to spring-boot.run.profiles

  • This seems like a good answer to your solution: https://stackoverflow.com/questions/36357135/configure-spring-boot-with-two-ports – WLefever Aug 09 '23 at 08:14

1 Answers1

0

If you have embedded tomcat server.

You can simply use server.port=8082 in your application.properties file.

Ajaj Ali
  • 86
  • 4