I have a Spring Boot application running on port 8080 on an Amazon EC2 instance. Both commands work when executed on the instance:
8080
curl localhost:808