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
44
触って理解するElasticsearch 1
tk_hirom
0
29
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Designing for humans not robots
tammielis
254
26k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
66
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
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について