package com.pannk.demo.demo.commonconfig.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wolf on 20-10-31.
 */
@RestController
public class IndexController {

    @Value("${test.data}")
    private String testData;

    @GetMapping("/hello/{name}")
    public String hello(@PathVariable String name) {
        return String.format("Hello,%s!Now we are in %s environment\n", name, testData);
    }
}
