Working example of jackson pojo serialization
This commit is contained in:
		@@ -2,6 +2,7 @@ package com.release11.klaus.controller;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import com.release11.klaus.model.MockedMessageDto;
 | 
			
		||||
import com.release11.klaus.model.TestModel;
 | 
			
		||||
import com.release11.klaus.service.KlausService;
 | 
			
		||||
import com.release11.klaus.utilis.BusinessKey;
 | 
			
		||||
import com.release11.klaus.utilis.TrackingClient;
 | 
			
		||||
@@ -12,15 +13,9 @@ import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.RequestEntity;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.DeleteMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.GetMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.PathVariable;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import java.util.UUID;
 | 
			
		||||
import java.util.*;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -34,6 +29,21 @@ import java.util.UUID;
 | 
			
		||||
public class KlausController {
 | 
			
		||||
 | 
			
		||||
    private final KlausService klausService;
 | 
			
		||||
//    MockedMessageDto msg = MockedMessageDto.builder()
 | 
			
		||||
//            .clientUUID(UUID.randomUUID())
 | 
			
		||||
//            .httpStatus(200)
 | 
			
		||||
//            .mediaType("text/xml")
 | 
			
		||||
//            .messageBody("Hello world")
 | 
			
		||||
//            .mockedResponseId(1)
 | 
			
		||||
//            .httpHeaders(new HashMap<>())
 | 
			
		||||
//            .build();
 | 
			
		||||
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    @GetMapping(value = "klaus/v1/get/test")
 | 
			
		||||
    public TestModel getTestMessage(){
 | 
			
		||||
        TestModel testModel = new TestModel();
 | 
			
		||||
        return testModel;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @DeleteMapping(value = "klaus/v1/delete/{clientUUID}/{mockedResponseId}")
 | 
			
		||||
    public ResponseEntity<String> deleteMockedResponse(@PathVariable UUID clientUUID,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user