Endpoints just return 404
I'm testing my endpoints with curl but them always return 404 code
curl -X POST -H "Content-Type: application/json" -d '{"name":"Chocolate"}' http://localhost:8080/latte/api/v1/flavors
19 Replies
⌛ This post has been reserved for your question.
Hey @Franscis123$#! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Can you show your application.properties?
application.yml
Can you show your pom.xml?
I use gradle
How are you running the project?
What is the package of the main class?
From IntelliJ IDE
package com.latteIceCream.latte;
Are you using IntelliJ Community or Ultimate?
Community
Can you add Spring actuator to the project for testing?
Yeah, done
Can you temporarily add the properties
management.endpoint.beans.enabled=true and management.endpoints.web.exposure.include=beans?
and then access /actuator/beans
might be /latte/api/v1/actuator/beansI added them and try it
curl http://localhost:8080/latte/api/v1/actuator/beans but it gives me the same errorwhat without the
/latte/api/v1?
Did you restart the project after reloading?I restarted it and tried both but throws 404
what without the
beans at the end?The same
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.