spring-rest Questions

0

I have two projects, projectA (spring boot), projectB (spring) In these two projects I have similar API that returns a string. But the response from the projectB API have double quotes and projectA...
Peeling asked 30/9, 2021 at 16:54

2

Solved

I wanted to learn non blocking REST, but first I wrote blocking controller for comparison. To my surprise Spring doesn't block incoming requests. Simple blocking service: @Service public class Bloc...
Epsom asked 22/12, 2017 at 8:37

3

I am writing a Rest client to post JSON data using Spring RestTemplate. Using POSTMAN and following JSON data in body get the response correctly- { "InCode":"test", "Name":"This is test", "Emai...
Telephone asked 20/5, 2016 at 6:48

7

Solved

An Abstract controller class requires List of objects from REST. While using Spring RestTemplate its not mapping it to required class instead it returns Linked HashMAp public List<T> ...
Jamal asked 28/4, 2016 at 13:15

2

Solved

I have Entity object : @Entity(name = "table") public class SomeEntity { @Id @Column(name = "id_column_name") public final BigDecimal entityId; @Column(name = "table_column_name") public fi...
Circumferential asked 21/7, 2018 at 20:5

4

Solved

To my Spring Boot 2.0.0.M6 application.properties I have added the following lines: spring.http.multipart.max-file-size=100MB spring.http.multipart.max-request-size=100MB but when I try to uplo...
Homopolar asked 24/12, 2017 at 14:41

5

Solved

I have controller implemented with Spring Boot Rest: @RestController @RequestMapping("/example") public class ExampleController { @Autowired private ExampleService exampleService; @GetMapping...
Fredella asked 14/9, 2017 at 8:17

5

I am almost new to rest services world,here i am trying to change the field name displayed in the output xml. Not sure,am i following the right method,any help is a good thing. Activity.java impor...
Bullish asked 29/11, 2016 at 20:4

1

Solved

So I'm trying to build a REST API that will use LDAP authentication. Basically, when my login endpoint is consumed, I want it to detect credentials using httpBasic authentication and then use those...
Exostosis asked 6/2, 2020 at 1:45

1

Solved

Why is my integration test complaining about missing RestTemplate wiring in Spring Boot ? What can I do to fix this integration test? Moreover, is this an integration test or a unit test? Based ...

1

Front end of my spring-boot service gets rendered in a 3rd party dashboard. That dashboard also has a generic search bar which we want to use. Now, once we implemented Keycloak authentication, we s...

3

Solved

I am trying to read HTTP headers in Spring based REST API. I followed this. But I am getting this error: No message body reader has been found for class java.lang.String, ContentType: applicati...
Jephthah asked 29/1, 2015 at 7:34

1

Solved

I went through link: Is it possible in Java to check if objects fields are null and then add default value to all those attributes? and implemented the same solution as below - Note: I am using S...
Pion asked 4/4, 2020 at 18:27

1

Solved

I have the same problem as described here and here. I tried the answers given and combinations thereof but none solved my issue. When I tried this answer, after 30 seconds, instead of the timeout...
Chor asked 4/4, 2020 at 15:48

2

Solved

I went through so many links like How to show all controllers and mappings in a view and How to configure a default @RestController URI prefix for all controllers? and so on. I want to get the Req...
Obeisance asked 28/2, 2020 at 7:5

3

Solved

Scenario : I will have Spring boot REST API application running in any EC2 with exposing multiple APIs and I am not using AWS API Gateway for them. I need multiple users for accessing multiple APIs...
Fog asked 20/11, 2019 at 6:6

2

Solved

I am using Spring Boot and Spring Rest Example. In this example, I am passing custom header, if that value is valid, endpoint gets called successfully, if custom header value is not correct then I ...
Headrick asked 28/1, 2020 at 13:58

1

I have created a @RepositoryRestResource @RepositoryRestResource(collectionResourceRel = "tracks", path = "tracks") public interface TrackRepository extends PagingAndSortingRepository<TrackEnti...
Albert asked 22/1, 2020 at 20:59

3

Solved

Anybody know why it doesn't work? Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 06/04/2017 14:11:24.732 ERROR [main] - o...
Bingen asked 6/4, 2017 at 12:24

1

I definitely didn't find clear way to do partial updates quite automatically (possible by comparing field by field object in databse and partial object). I saw some tracks like : here but I don'...
Stagecoach asked 16/2, 2018 at 10:31

3

Solved

I have created a simple Spring REST service (POST, PUT). But when i call this service from postman when value store in null. Student Pojo Class import java.io.Serializable; import javax.persiste...
Solicitor asked 6/7, 2018 at 9:34

3

Solved

I am trying to mock a POST method with MockRestServiceServer in the following way: MockRestServiceServer server = bindTo(restTemplate).build(); server.expect(requestTo("/my-api")) .andExpect(meth...
Meemeece asked 2/8, 2019 at 14:34

3

Solved

Code convention says no logic in the controllers. All should be handled in the service layer. My question is especially about returning ResponseEntity. Should it be handled in RestController or in...
Malebranche asked 31/7, 2019 at 5:50

2

I use this code to get values from an HTTP request: @PostMapping(consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, value = "/v1/notification") public ResponseEntity<String> handleNoti...
Atomizer asked 21/4, 2019 at 12:55

3

I'm using SpringBoot and Spring REST. I would like to understand the HTTP PATCH method to update properties of my Model Is there any good tutorial explaining how to make it works ? HTTP PATCH me...
Khrushchev asked 1/5, 2015 at 14:32

© 2022 - 2025 — McMap. All rights reserved.