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
Hiromu Takahashi
April 15, 2024
250
0
Share
Spring Bootでの定数の扱い
https://clas-istyle.connpass.com/event/315044/
上記勉強会での発表内容
Hiromu Takahashi
April 15, 2024
More Decks by Hiromu Takahashi
See All by Hiromu Takahashi
gRPCの概要について理解できるスライド
tk_hirom
0
53
触って理解するElasticsearch 1
tk_hirom
0
31
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
170
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
290
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
520
Test your architecture with Archunit
thirion
1
2.2k
Producing Creativity
orderedlist
PRO
348
40k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
Typedesign – Prime Four
hannesfritz
42
3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
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について