Change Port on a Spring Boot Application when using intelliJ

Change Port on a Spring Boot Application when using intelliJ 



Two ways to change the port that the embedded Tomcat is using in a Spring Boot Application.

The first way is to modify the application properties in the resources folder:

Update application properties to change port
Update application props in Spring Boot Application



There are a couple issues with this approach.  You might only want this port change in your local environment and if you check it in by accident you might break things.


Alternatively, you can use a command line parameter.

Go to Run -> Edit Configurations -> VM options

Then enter in the following argument:

-Dserver.port=8090


Then click apply and OK and attempt to run the application again.

Update port on Spring Boot application using VM option
Update port using VM option



Comments

  1. Thanks for providing such a great Information, you can see, we also provide
    Peptide Synthesis

    ReplyDelete
  2. Such a wonderful blog on Machine learning . Your blog have almost full information about Machine learning .Your content covered full topics of Machine learning that it cover from basic to higher level content of Machine learning . Requesting you to please keep updating the data about Machine learning in upcoming time if there is some addition.
    Thanks and Regards,
    Machine learning tuition in chennai
    Machine learning workshops in chennai
    Machine learning training with certification in chennai

    ReplyDelete
  3. Sorry tried this not working. I am new using Intellij and Spring Boot

    My execution just stopped. No mistake no error.

    ReplyDelete
  4. I feel this article have given such a lot of vital info for me. And I am satisfied studying your article. However wanna commentary on few general things, The website style is ideal, the articles are truly nice.
    Interior Designers in Chennai | Interior Decorators in Chennai | Best Interior Designers in Chennai | Home Interior designers in Chennai | Modular Kitchen in Chennai

    ReplyDelete
  5. This is really a big and great source of information. We can all contribute and benefit from reading as well as gaining knowledge from this content. Just amazing
    experience. Thanks for sharing such nice information.
    Event Management in Pondicherry | Wedding Decorators in Trichy | Wedding Photographers in Trichy | Wedding Planner in Pondicherry | Wedding Decorators in Pondicherry | Candid Photography Pondicherry | Wedding Photographers in Pondicherry

    ReplyDelete

Post a Comment

Popular posts from this blog

How to set up a SQL Server 2008 Local Database

Spring Boot Internationalization with Default Locale for Message Strings