I have a problem with my REST app. Here is the git link to ease your burden: https://github.com/TheNiceGuy123/AstonishingBackEnd Here is the raw code also: Classes posted in order: Employee Controller: Employee Service: Global Exception Handler: CNPNotFoundException class: ApiErrorModel class: I want to give some relevant informations to the user like in the second picture but in postman everything remains at
Tag: rest
An APRI REST http request goes in 404
I am new with SpringBoot, and API REST, i used to develop in a Struts MVC SOAP project. When i try to run an API REST on a browser or with curl it goes in 404. here is my projec, the ide that I am using is IntelliJ IDEA 2021.3.3 (Community Edition): info about the ide pom.xml Controller The Object
How can I use more then one param in a spring boot rest Controller?
I want to achive the follwing URL to access my data with 2 params: http://localhost:8080/contactnote?entryDate=2022-02-01?contactType=T Both mappings with a single param is working: But when I try to combine them with two params it wont work, not one of them is usable. My reposiitory looks like this: Answer the URL you entered is invalid, double ?, you have to use
Why do I get 404 Not Found in Spring Boot
My Spring Boot application sends data through REST API. I connects to many Google Cloud components: google pubsub, mqtt server and google SQL. Since I implemented PUBSUB and MQTT, whenever I send a request from Postman I receive My pom.xml configuration looks like this I also found that request is being served by backend to the point of return, so
Why my REST api created with camel servlet doesn’t expose?
I’m currently struggling with exposing the REST api in my project using Apache Camel. When I run the project it seems to be fine in the console, but it just doesn’t work: curl http://127.0.0.1:8080/materials curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused Here’s the pom.xml file: Here’s the code I wrote: I’m not sure to put the
How do I retrieve particular List of element from MongoDB Using findById from another List => SubList from MainList?
How To Retrieve this list: When passing this list [id]: Answer I just figured out an answer for my question and it’s as follows: In the mongo repository just declare a custom find method: Then use it as a normal find method => [query] in your business logic layer and controller layer.
How can I receive dynamically number of query params in Rest Client – Quarkus?
I need create a rest client to access a URI that can receive 0 or n query params. Example: how could i do this here? Answer Please refer to How to send a query params map using RESTEasy proxy client, similar issue is being discussed. You can define your client similar to below: And you can define ClientRequestFilter for converting
Bean that could not be found Spring Boot
I have a problem when trying to start my Spring Boot application with tokenization. This is my service class: This is my config class: And I get the following error when I try to run my Application: I dont understand why i get this error. Answer I solved it. The problem was that the package where the config lays was
Error in parsing Json Object node while creating an issue of Jira using REST API of atlassian in Java
I am trying to create an issue using Jira REST API in java. But I am getting below Runtime Exception in my console. Below is my code, I have implemented same code as provided in the documentation, still I am getting an error. The output which I am printing here, is genuine json and if I put post request in
Firebase email+password authentication in Java
I’m trying to use Firebase email and password authentication in Java using their REST API, as their Admin SDK doesn’t provide the needed methods to log in etc., only user management methods. With help from this answer, I’ve managed to put together the following code, which works for correct credentials but when trying to handle errors e.g. USER_NOT_FOUND or INVALID_PASSWORD,