简体   繁体   中英

Spring Boot application: net::ERR_CONNECTION_REFUSED

For a school project we are creating a Spring Boot application based on Restful. It works flawlessly locally, but once deployed to AWS I receive "net::ERR_CONNECTION_REFUSED" on all GET and POST requests I send to my RestController.

If I just host my database on AWS it works fine locally, but as soon as I upload my project to an AWS instance it goes back to "net::ERR_CONNECTION_REFUSED". I get no exception in Java.

Does anyone have any idea about this? If so, I'd be more than grateful for the help. I can of course show any code you need to see to clarify anything, I'm just unsure which code would be relevant.

Thanks a lot, I hope you are all well.

I figured out the issue. I was running both front end and backend in the same project which resulted in API calls from the very same project to ip:8080 was void. I hosted the backend on ip:9090 and the frontend on ip:8080 in order for it to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM