Minimal API içerisinde oluşturduğumuz WebApplication ile appsettings.json dosyasını okuyabiliyoruz.
✅Github reposu: https://github.com/sonergonul/MinimalAPI
Örneğin appsettings.json içerisinde;
"JWT": {
"Key": "eyJhbGciOiJIUzI1NiJ9eyJSb2x",
"Issuer": "https://localhost:7115/",
"Audience": "https://localhost:7115/"
}
şeklinde bir kısım varsa biz buradaki Key değerini;
app.Logger.LogInformation($"{app.Configuration["JWT:Key"]}");
şeklinde okuyup konsola bilgilendirme amacıyla yazdırabiliyoruz.
#shorts #minimalapi #dotnet
***
Sosyal Medya
🐦 Twitter'dan takip edin: / sonergonul
💜 Twitch'ten takip edin: / sonergonul
💚 Discord kanalımız: / discord
💖 Quora'dan takip edin: https://www.quora.com/profile/Soner-G...
💛 Instagram'dan takip edin: / sonergonul
Destek
💪 ByNoGame: https://www.bynogame.com/destekle/son...
💪 Stremlabs: https://streamlabs.com/sonergonul/tip