I would like to change the SpringBoot Application URL.
As my current application.properties file looks like this :
spring.application.name=MyApplication
server.port=9090
and the directory structure is
src/main/resources/static/ui/index.html
src/main/resources/application.properties
So , while running the application, I need to do
http://localhost:8080/ui/index.html
as static directory is directly map to public directory.
But the issue is , I don't want see this : I would like to access the application as :
http://myurl.com and it should be map to above url i.e. http://localhost:8080/ui/index.html
How can I achieve this, As Spring boot contains embedded tomcat container.
If I can't achieve this, suppose I buy I domain name, then how to map domain name with this url.
I tried with dummy domain name mapping, it maps successfully but when it resolves the actual url is displayed in the browser. It show entire url i.e http://192.168.1.102:8080/ui/index.html whereas I need http://myurl.com/index.html.
I have look around https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html for spring boot application properties fields but didn't find any solution. as server.display-name also didn't worked for me.
If I buyied myurl.com how to map it with Spring boot application if my application is running on cloud.
Thank you in Advance. Examples are appreciated. :)