Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Vaibhav Yaramwar
Courses Plus Student 4,292 PointsHow to change localhost port
My Localhost port 8080 is already in used by System or By Some other Application....Now I want to change my local host port for Tomcat .... how should I do it in Spring Boot?
2 Answers

Daniel Vargas
29,184 PointsHi,
In the application.properties you can change spring default values, in the case of the port you could do this:
server.port = 8000

Vaibhav Yaramwar
Courses Plus Student 4,292 PointsThank You Daniel...will create this file and check
Vaibhav Yaramwar
Courses Plus Student 4,292 PointsVaibhav Yaramwar
Courses Plus Student 4,292 PointsHi Daniel Thanks For Your Answer but in my Project I am not able to locate this file.
Daniel Vargas
29,184 PointsDaniel Vargas
29,184 PointsYou can create the file
application.proterties
in the resources folder, spring-boot will find it.Also here are some other properties you could change in that file:
https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html