Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Spring Bootでの定数の扱い
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hiromu Takahashi
April 15, 2024
0
240
Spring Bootでの定数の扱い
https://clas-istyle.connpass.com/event/315044/
上記勉強会での発表内容
Hiromu Takahashi
April 15, 2024
Tweet
Share
More Decks by Hiromu Takahashi
See All by Hiromu Takahashi
gRPCの概要について理解できるスライド
tk_hirom
0
46
触って理解するElasticsearch 1
tk_hirom
0
29
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
The Curse of the Amulet
leimatthew05
1
9.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
430
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Leo the Paperboy
mayatellez
4
1.5k
Code Review Best Practice
trishagee
74
20k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
380
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
120
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
140
Transcript
Spring Bootでの 定数の扱い
自己紹介 高橋拓夢 - アカウント - Twitter(X): @tk_hirom - GitHub: tk_hirom
- 経歴 - Web系4年目 - サーバーサイド中心 - ベンチャー企業→アスクル - 最近の興味 - CI/CD
概要 - Spring Bootで定数をどのように定義するか? - 定義した定数をどのようにプログラムの中で参照するか? - よりテストしやすくできないか? - よりシンプルに書けないか?
使用技術 - Spring Boot 3.2.4 - Kotlin 1.9.23
定義の仕方 - コード上に含める方法 - 設定ファイルから読み取る方法
定義の仕方 - コード上に含める方法 - コードのロジックで使用されるもの - マジックナンバー回避のためのもの - 設定ファイルから読み取る方法 -
データベース接続情報 - APIキー - ログレベル etc…
定義の仕方 - コード上に含める方法 - コードのロジックで使用されるもの - マジックナンバー回避のためのもの - 設定ファイルから読み取る方法 -
データベース接続情報 - APIキー - ログレベル etc… 今回はこっち
共通部分 application.yml
共通部分 application.yml
共通部分 WardrobeApiController
イマイチな実装 AppProperties
イマイチな実装の問題点 AppProperties
改善ver実装 AppProperties
改善ver実装 AppProperties
最後に - 今回作成したRepository - URL: https://github.com/tk-hirom/wardrobe-api - 次回はCodePipelineについて