Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialVaibhav 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