Skip to content

Instantly share code, notes, and snippets.

@chathurangat
Created April 17, 2018 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chathurangat/8340f878cff1511cccc33f7f46f4dc32 to your computer and use it in GitHub Desktop.
Save chathurangat/8340f878cff1511cccc33f7f46f4dc32 to your computer and use it in GitHub Desktop.
package com.springbootdev.examples.slf4j.mdc.springbootslf4jmdcsupport.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class WelcomeController
{
private static final Logger logger = LoggerFactory.getLogger(WelcomeController.class);
@GetMapping("/welcome")
public String welcomeMessage()
{
logger.info("inside the welcomeMessage");
return "Welcome to www.SpringBootDev.com";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment