package com.bjsxt.logback.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/logback")
public class HelloController {

    private final static Logger logger = LoggerFactory.getLogger(HelloController.class);

    @Value("${msg}")
    private String msg;

    @RequestMapping("/showInfo")
    public String showInfo(){
        logger.info("输出日志");
        return "hello logback"+msg;
    }
}
