Questions tagged [spring-rest]

Use this tag for question about the REST architectural style used in Spring framework

REST architectural style used in Spring framework

1305 questions
-1
votes
1 answer

Spring boot application not able to access the third party REST API on Heroku platform which is accepting request specific to Indian IP addresses

I have a Java Spring Boot application that exposes REST endpoints and deployed on Heroku free service. The problem I am facing is that I am calling another third party REST API from the controller class and that API takes only request that comes…
SSV
  • 95
  • 1
  • 1
  • 11
-1
votes
2 answers

Why ResponseEntity is generic?

Imagine this simple controller method : public ResponseEntity findById(@Parameter(description = "id") @PathVariable String id) { Optional model = repository.findById(id); if(model.isEmpty()) { return…
flywell
  • 384
  • 3
  • 20
-1
votes
1 answer

Error handling when exception is thrown on a JsonSerializer in a spring web application (not spring boot)

I've defined a custom JsonSerializer in my spring web application (NOT Spring Boot). public class CalendarSerializer extends StdSerializer { public CalendarSerializer() { super(Calendar.class); } /** {@inheritDoc}…
Maura
  • 15
  • 4
-1
votes
1 answer

@EnableResourceServer not available in springboot application

The resource server is not detected in the sprign application.Not able to get the reason behind. Please help on this This is my pom
-1
votes
1 answer

Request Body issue in Spring Boot PUT Request

I am trying to create a PUT request where admin will be making decision based on some criteria and Verifying or Rejecting a user. I expect this decision in JSON body(Refer to Verification method in below image). But I am confused what json body…
Sarthak
  • 188
  • 1
  • 2
  • 14
-1
votes
2 answers

Getting nulls when trying to post data using spring

I have made a crud ajax rest application using spring framework. The problem is: When i am sending post from client to server, i am getting object filled with nulls, from client side i have status 200. Here is my code: Product class public class…
john2994
  • 393
  • 1
  • 3
  • 15
-1
votes
1 answer

Quickly mock resposne of Spring Boot rest controller

i'm looking for a tool or library that allow me to quickly develop a Spring Boot backend that expose mocked REST services while we're waiting to have specifications about services business logic from our customer. Are there any best practices? For…
-1
votes
1 answer

Multifunctional SpringBoot JAVA Application (REST/BATCH/LAMBDA)

I have a java spring boot application that runs a job to upload data to Database after polling a message from SQS and this application also contains a REST API over that same database. Now I need to decouple the upload functionality and REST…
Tarun Kundhiya
  • 156
  • 1
  • 9
-1
votes
1 answer

Calling legacy code jsp/servlet code from angular 7 returns 302 error

I am working on updating our legacy code with uses jsp and servelts to angular 7. However, there are some parts of the legacy code that i still have to maintain. So i have to make some calls to webservices that have below webservice.…
Rohan
  • 1
  • 1
  • 4
-1
votes
1 answer

Spring rest with React (dropzone and Formik)

I'm trying to build an endpoint where I can post a JSON message with an image to upload. But whenever I send the request from the frontend, I got null values. I have tested this endpoint with Postman, and it works just fine. This is my server…
Ahmed Aziz
  • 380
  • 1
  • 5
  • 17
-1
votes
1 answer

How to set filter to process not all requests?

I'm using Spring Core, Spring MVC, Spring REST, JWT. Hello everyone! I'm learning Spring Security and I encountered a problem. I would like to make an authentication based on JWT; I have a Rest controller with 3 simple methods: The first method…
kolo yolo
  • 23
  • 9
-1
votes
3 answers

Can' t see data from repository on junit

Hi I wanna try to receive data from my repository but I can t retrieve nothing. I make autowired and on java class in: " src/main" it works but in the junit test no I ve tried any method of Jpa repository but I receive always a "null"…
blackz7
  • 15
  • 3
-1
votes
1 answer

Redirect All Request from web server to another

I have to make an application in tomcat which core responsibility is to redirect all request coming from browser application to API server. It works like proxy server between browser application and API application. Have to write it on tomcat. How…
herman shafiq
  • 499
  • 2
  • 8
  • 26
-1
votes
1 answer

Class literal with generics in java

After going through the following links i.e. link1 and link2, i am facing a challenge to provide a class literal as a parameter. Following is my code and i am getting compile error as follows: class GenericService { public List
Adithya
  • 2,923
  • 5
  • 33
  • 47
-1
votes
1 answer

Angular 4 http service call fails to call the spring rest service method

I am beginner to Angular 4 as well as spring boot rest. I made a simple app which has Angular 4 as front end and Spring Rest as API. I am trying to call Spring Rest controller method (Post) from Angular http request. Following is the Angular 4…