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: When to chose which validation method?

I have a Spring application with a JPA Repository. Now I'd like to add some validations. I found several solutions but none works perfect and I don't know which methode should be used in which case: 1.) Im using validation annotations (e.g.…
Franken
  • 419
  • 1
  • 4
  • 14
-1
votes
1 answer

Spring REST with Spring Security not accepting credentials

I am creating a REST API using Spring REST, and I'm trying to secure it with Spring Security for basic authentication. It's backed by a MariaDB database. I've used this guide for setting up basic authentication. I've gotten to where I can make a…
-1
votes
3 answers

Adding custom HttpMessageConverter

I am attempting to add a custom HttpMessageConverter to my (Spring-powered) REST API. @Configuration public class SpringWebConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { …
zessi
  • 13
  • 1
  • 6
-1
votes
1 answer

How To Receive Multipart Request From Retrofit API

I am using Spring-rest at server side. here i am handling request from android app. but , i am unable to receive multipart files uploaded from android app. android app developers sending multiple files as in the form of List. for receiving that…
-1
votes
1 answer

How to use a viewResolver using spring-rest?

I am very much new to Spring-rest. I have small doubt on that. In normal spring MVC we can get a response and we will display on the client side, for this, we are using view resolvers, to achieve this we have to do configurations on, XML file. but,…
-1
votes
1 answer

How to develop a spring rest web service in accessing external API?

I want to develop the spring rest web service which accesses the external API when user sends request. User sends a json request and set of request headers to the web service and web service should authenticate the user and call the eternal API.…
Amila Perera
  • 69
  • 2
  • 8
-1
votes
1 answer

Spring endpoints without dependency Spring-Boot-Data-REST-Starter

I Have a Repository and Controller, @RestController public class PersonController { @Autowired PersonRepository repository; @GetMapping("/people") public Iterable getPeople() { return repository.findAll(); } …
-1
votes
1 answer

How to show list of Products coming from spring rest webservice on html page

I have created a spring RESTFul web service using spring boot, spring-data. This url(/api/products) returns a list of product object in json format. This is my all spring data rest service code for repository and…
-1
votes
1 answer

Spring boot method parameter argument custom validation

http://www.bbenson.co/post/spring-validations-with-examples/ In the above example custom validation is implemented for request body. How can the same can be done for request parameter
shoaib1992
  • 410
  • 1
  • 8
  • 26
-1
votes
1 answer

Spring security: restful web services and maintaining user sessions

In a classical jsp or php application, user sessions can be maintained through below process 1) on first access to a resource, challenge user to authenticate using userid & password. 2) if the credential are correct, then successfully authenticate…
samshers
  • 1
  • 6
  • 37
  • 84
-1
votes
1 answer

how to Parse Json Arabic text in java

I cannot parse json arabic test.I am sending request in json as {"SUBJECT_AR":"أهلا بك"}.But while reading this jsonobject in spring i am getting ?????.The content type for this jsonobject while sending the request is…
sandybelieve
  • 45
  • 3
  • 7
-1
votes
1 answer

spring mvc(rest) with angular2 causing 302 moved temporarily

We have simple spring mvc(rest), security and Angular2 app which is deployed in weblogic 12.1.2 Everything is packaged as single war file including dist folder of angular2 app. When app launched by index.html, it is requesting multiple Angular2…
user509755
  • 2,941
  • 10
  • 48
  • 82
-1
votes
1 answer

Are all the REST methods idempotent?

In Spring RESTful Web Services, are all the REST (Representational State Transfer) methods idempotent?
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
-1
votes
1 answer

Example for basic rest template

Can you please give basic example for Resttemplate post call using spring. for ex: resttemplate.exchange(..,..,..,..,..);
Java Learing
  • 269
  • 3
  • 11
  • 26
-1
votes
1 answer

How to get the json object in our rest java controller,for example we have a search method with multiple parameters

Example:- searchCriteria(jsonObject) 1. jsonObject : { employeeId :"xx" , employeeName : "yy", employeeDOB : "zz", } 2. jsonObject : { SSN:"xx" } 3. jsonObject : { agentId:"xx", …
1 2 3
86
87