I am using Spring Boot to create a web app, and I am not sure how to change the URL from localhost:8080 to something like localhost:8080/myWebApp.
As of spring boot 2 the server.contextPath property is deprecated. Instead you should use server.servlet.contextPath.
So in your application.properties file add:
server.servlet.contextPath=/myWebApp
For more details see: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#servlet-specific-server-properties