79305122

Date: 2024-12-24 08:34:59
Score: 3
Natty:
Report link

Is there any annotation to do this? I only add annotation in Coordinates class. if it is a SpringBoot project, I want to "Coordinates" as param, so I have to use this way..It's not good coding way..

@RestController
public class JacksonController {
    @Resource
    ObjectMapper objectMapper;
    @GetMapping("getCoordinates ")
    public void getCoordinates (@RequestBody Map<String, Object> map){
        var pet = objectMapper.convertValue(map.get("Coordinates "), Coordinates .class);
        
          
        }
    }
Reasons:
  • Blacklisted phrase (1): Is there any
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there any
  • Low reputation (1):
Posted by: KY S