package com.epam.itweek.ba.controller;

import lombok.extern.slf4j.Slf4j;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class MessagingRestController {

    @RequestMapping("/{username}")
    @ResponseBody
    public String messagesFor(@PathVariable("username") @NotEmpty String username) {
        log.info("Is about to list messages");
        return "Hello, " + username;
    }
}

@@ -245,16 +245,78 @@
 apping;%0A
+import org.springframework.web.bind.annotation.RequestMethod;%0A
 import o
@@ -368,16 +368,16 @@
 seBody;%0A
-
 import o
@@ -432,16 +432,59 @@
 oller;%0A%0A
+import com.sun.javafx.tools.packager.Log;%0A%0A
 @RestCon
@@ -723,16 +723,16 @@
 ages%22);%0A
-
         
@@ -765,11 +765,230 @@
 e;%0A    %7D
+%0A%0A    @RequestMapping(value = %22/%7Busername%7D%22, method = RequestMethod.POST)%0A    public void newMessage(@PathVariable(%22username%22) String username, String message) %7B%0A        log.info(%22Is about to create new message%22);%0A    %7D
 %0A%7D%0A

Add messages creation