How to configure embedded Tomcat integrated with Spring to listen requests to IP address, besides localhost?

后端 未结 4 820
长情又很酷
长情又很酷 2020-11-27 15:57

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 cann

4条回答
  •  长情又很酷
    2020-11-27 16:13

    I solved this setting the IP address in the /etc/hosts file in this way:

    IP  hostmane
    

    Like:

    172.x.x.x  my-hostname
    

提交回复
热议问题