I am trying to run the example from the spring guide : Building a RESTful Web Service .
It works well if I open localhost:8080/greeting.
But it cannot make connection if I open either 192.168.1.111:8080/greeting, or 140.112.134.22:8080/greeting instead, despite both IPs are actually used by my computer on the internet.
Could someone suggest me how to configure the embedded Tomcat in Spring to accept HTTP request on other IP addresses, besides localhost(that is, 127.0.0.1)?
Thanks! :)