/**
 * Copyright (c) 2022 雷掣 All rights reserved.
 *
 * https://www.lc_crm.com
 *
 * 版权所有，侵权必究！
 */

package io.renren.controller;

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

import io.renren.common.utils.Result;
import io.swagger.annotations.ApiOperation;

/**
 * 测试接口
 *
 * @author Mark sunlightcs@gmail.com
 */
@RestController
@RequestMapping("/api")
public class ApiTestController {
	
	@Value("${hn.yz.da:sx}")
    private String addr;

    @RequestMapping("addr")
    public String addr() {
        return addr;
    }
    
    @GetMapping("getName")
    public Result<String> getName(@RequestParam("name") String name){
    	return new Result<String>().ok("hello "+ name);
    }

    @GetMapping("notToken")
    @ApiOperation("忽略Token验证测试")
    public Result<String> notToken(){
        return new Result<String>().ok("无需token也能访问。。。");
    }
    
}