Skip to main content

All Questions

Tagged with
0 votes
0 answers
41 views

How can I resolve [org.springframework.web.HttpMediaTypeNotAcceptableException: No acceptable representation] error?

I have created a REST API for user registration using Spring Boot in which I for response I'm using GenericResponse class along with ResponseEntity to manipulate the response but I'm facing [org....
Saurabh's user avatar
  • 19
1 vote
2 answers
62 views

Looping problem when serializing objects to JSON in Spring Boot

I'm using Spring Boot 3.2 version with MySQL database. I have two objects @Getter @Setter @Entity @Table(name = "shops") public class Shop{ @Id @GeneratedValue(strategy = ...
Dany's user avatar
  • 75
0 votes
1 answer
78 views

Object Mapper readValue function returns Null in Spring Boot 3

Below is my response POJO Class @Getter @Setter @Builder @AllArgsConstructor @NoArgsConstructor public class ProductResponse { boolean required; ProductModel model; } Below is my code where I'...
Sweta Sharma's user avatar
  • 2,654
1 vote
2 answers
35 views

JPA Repository search by field input from the user form

I have a form in Angular which looks like so The user can input only the field he wants and I send the form to Spring Rest API like so { "symbol": "DOL", "currency&...
matel's user avatar
  • 457
0 votes
0 answers
59 views

How to create and return a nested object in Java Spring Boot?

I'm working on a Spring Boot application and I'm facing an issue with handling nested objects within an entity. I have an entity called TopicEntity, which has a field topicContent defined as a Map<...
shyshyshy1's user avatar
0 votes
0 answers
17 views

Can I make an endpoint that returns both thymeleaf template and JSON object?

I was wondering if I could combine my html template String and a json inside an endpoint, so I can have an endpoint that returns the web template for my app and I can also visualize in Postman the ...
Aerna's user avatar
  • 3
-1 votes
1 answer
68 views

I sent a post request, but I keep getting a null value

i send this data i send this data but it always get null but it always get null I want to comment on each movie I don't know where the problem is CommentController It's the part where you get it ...
user24868563's user avatar
0 votes
1 answer
42 views

Deserializing a JSON object that doesn't work if there are uppercase letters

I have that class package com.akensys.testlucas.model; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta....
CosmosFutur's user avatar
-1 votes
2 answers
39 views

Searching JSON data for strings and returning a subset as JSON

I am working on a Java Spring Boot application. I have a JSON in the following format. I need to search for a string and return the results in the same JSON format containing only the matching ...
ambuli's user avatar
  • 25
1 vote
0 answers
44 views

Springboot using Gson serialization and @Since/@Until annotations

I have a springboot application (REST API), and I've configured GSON to be my default serializer/deserializer instead of Jackson. I already have versioned models, using @Since and @Until annotations, ...
Felipe Quecole's user avatar
0 votes
0 answers
24 views

Could not write JSON: Could not instantiate entity

I'm using this CompositeKey for my Bills class: @NoArgsConstructor @AllArgsConstructor @Data public class BillsKey implements Serializable { private Suppliers supplier; private int id; and this is ...
user avatar
3 votes
1 answer
47 views

How to censor custom annotated fields in java dtos?

I need a handy way to censore DTO fields/secrets when converting them into a json string (for logging). Im using objectmapper and I heard about @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) ...
Baksa Zoltán's user avatar
0 votes
1 answer
100 views

Does deserialize method(mapper.readValue) allocate direct buffer memory instead of heap memory?

I would like to ask you something about ObjectMapper.readvalue(). ObjectMapper mapper = new ObjectMapper(); List<ConvertType> responseList = new ArrayList<>(); for (ExampleContent content ...
gna's user avatar
  • 1
0 votes
0 answers
32 views

Modify ObjectMapper by Adding New Deserializer

I have a deserialiser: public class TrimStringDeserializer extends JsonDeserializer<String> implements ContextualDeserializer { @Override public JsonDeserializer<String> ...
GaripTipici's user avatar
0 votes
1 answer
36 views

Find the json field dynamically when user send the field path?

I'm currently working on a spring boot application where I have find a way to meet the following requirement When user send a path to a field of a json I have to find that that field on the json and ...
Isuru 26's user avatar

15 30 50 per page
1
2 3 4 5
299