Every time I access my spring boot application I type localhost:8080
.
I want to access the application by typing www.MyApp.com. It is an in-house application so it is not going to be live on the Web. The application is using spring boot embedded. Is there a way to change it?
Asked
Active
Viewed 706 times
0

Pika Supports Ukraine
- 3,612
- 10
- 26
- 42

GRF
- 9
-
3Does your hosts file contain a line like "127.0.0.1 www.MyApp.com"? – imperezivan May 21 '19 at 16:33
-
3How you access your application isn't generally related to anything in app's configuration itself. Generally speaking, address of your application isn't actually the `localhost` - it's a `127.0.0.1:8080`, localhost name is being just a common name resolved by your browser to mean `127.0.0.1`. For most things on the web, we use DNS servers to convert from human-readable address to machine readable one. For an in-house app, you have to imitate a DNS service yourself, locally. In Windows, that can be done by editing the hosts file. – M. Prokhorov May 21 '19 at 16:33
1 Answers
0
This is more related to operating system's host configurations.
https://www.webhosting.uk.com/kb/how-to-update-hosts-file-entry-on-windows-ubuntu-and-mac/
About the adding port number in host file refer: Using port number in Windows host file

Shubham Khandare
- 135
- 1
- 15