You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
C#
51 lines
1.1 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DockerStudyApi.Controllers
|
|
{
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
public class DemoController : ControllerBase
|
|
{
|
|
private readonly ILogger<DemoController> _logger;
|
|
private readonly IOptions<TestOption> _tespOption;
|
|
|
|
public DemoController(ILogger<DemoController> logger,IOptions<TestOption> tespOption)
|
|
{
|
|
_logger = logger;
|
|
_tespOption = tespOption;
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Test()
|
|
{
|
|
return Ok();
|
|
}
|
|
|
|
[HttpGet]
|
|
public TestOption TestOption()
|
|
{
|
|
return _tespOption.Value;
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Evn(string envName)
|
|
{
|
|
return Ok();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Info()
|
|
{
|
|
return Ok();
|
|
}
|
|
}
|
|
}
|