könemer2.0
unknown
plain_text
4 years ago
695 B
8
Indexable
ObjectMapper objectMapper = new ObjectMapper();
@PostMapping("/v1/applikation/{applikationID}/{sprache}/import")
public ResponseEntity<Void> createApplikation(@RequestParam("json") MultipartFile file, @PathVariable long applikationID, @PathVariable Sprache sprache) throws IOException {
final Map<String, ?> keyValue = objectMapper.readValue(file.getInputStream(), Map.class);
for (Map.Entry<String, ?> entry : keyValue.entrySet()) {
if (entry.getValue() instanceof String) {
System.out.println(entry.getKey() + "=" + entry.getValue());
}
}
return new ResponseEntity<>(HttpStatus.CREATED);
}Editor is loading...