• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to access a REST api deployed on tomcat from a different system on the network

 
Ranch Hand
Posts: 658
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
Is there any way I can access a REST api developed using spring-boot and deployed on embedded Tomcat, from a different system(mobile/pc) on the same network?
I tried below application.properties options, but they didn't help
 
Sheriff
Posts: 22849
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove server.address. That line tells Spring Boot to only listen on the local interface, which means that any request from any other machine will be rejected (connection refused).
 
Puspender Tanwar
Ranch Hand
Posts: 658
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:Remove server.address. That line tells Spring Boot to only listen on the local interface, which means that any request from any other machine will be rejected (connection refused).

Earlier was not using these parameters, I wrote them after googling the issue
Anyway, I would need to get the local IP address of my system on the network. Now I can access that IP from other systems.
 
Rob Spoor
Sheriff
Posts: 22849
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
0.0.0.0 should allow you to connect from any machine to any interface. Its the generic "listen on all interfaces" IP address.
 
reply
    Bookmark Topic Watch Topic
  • New Topic