2.How to change default server port number in spring boot|Spring boot tutorial Zest prime

preview_player
Показать описание
Description:
In this comprehensive tutorial, we will demonstrate different approaches to change the default port number of a Spring Boot application running on the Tomcat web server. If you're looking to customize the port configuration for your Spring Boot project, this video is a must-watch!

Approach 1: Using a Property File
Learn how to modify the Tomcat port number for a Spring Boot application by configuring a property file. We'll guide you through the steps to locate the file, make the necessary changes to the port configuration, and restart your application to apply the new port setting.

Approach 2: Java -jar Command
Discover an alternative method to change the Spring Boot Tomcat port by utilizing the Java -jar command. Follow along as we demonstrate the command syntax and show you how to specify a custom port number for your Spring Boot application.

Approach 3: Using mvnw (Maven Wrapper)
Explore how to change the Spring Boot Tomcat port number using the Maven Wrapper, mvnw. We'll walk you through the steps to configure the Maven Wrapper, update the desired port in the Maven configuration, and demonstrate the command to start your Spring Boot application with the modified port.

By the end of this tutorial, you will have a solid understanding of different approaches to change the default port number of a Spring Boot application running on Tomcat. You'll be able to choose the method that suits your project requirements and confidently configure your Spring Boot application.

🎓 Stay tuned for more informative tutorials and tips on Spring Boot, web development, and server configuration! Don't forget to like, share, and subscribe to our channel for regular updates. If you have any questions or suggestions, please leave them in the comments section below. Happy port configuring with Spring Boot!
Рекомендации по теме
Комментарии
Автор

Man, Even as an experienced Java Developer, , you've kind of Help me on this Topic, the third solution is really helping, because I can Run locally with a port and run in a container with another port for deployement purposes. THANK YOU

abderrezakboukazouha
Автор

Thank You !!

Does mvnw command belongs to maven ?

For productions application, Do you suggest Java 20 version as some of the dependencies won’t support this version. In this case, what is the java version suitable for prod applications ?

hackwithharsha