Issue
When i start spring-boot with tomcat9 in a windows machine, i can access in this way from the same machine:
curl 192.168.1.13:3000
i can also :
curl localhost:3000
however when i do:
curl 192.168.1.13:3000 from another machine in the same subnet, spring-boot tomcat does not respond
i have tried running express.js on the same machine on port 3000 and when i curl 192.168.1.13:3000 i get a http response, so i think its not a firewall issue with the port number (since port number is 3000 for both express.js and spring-boot tomcat)
how can i setup spring-boot tomcat9 so that it will respond to a request coming from another ip address that is not localhost?
I have server.address=0.0.0.0 in application.properties
Solution
previously i ran the spring boot application with mvn spring-boot:run and it did not respond to curl from another computer from the same network
then i tried mvn package java -jar target/demo.jar
then the server responded to curl from another computer from the same network
Answered By - green onion
Answer Checked By - Willingham (JavaFixing Volunteer)