Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
340
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spring Bootでの定数の扱い
https://clas-istyle.connpass.com/event/315044/
上記勉強会での発表内容
Hiromu Takahashi
April 15, 2024
Transcript
15 slides
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について
More Decks by Hiromu Takahashi
See All by Hiromu Takahashi
gRPCの概要について理解できるスライド
tk_hirom
0
67
触って理解するElasticsearch 1
tk_hirom
0
37
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.7k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Optimizing for Happiness
mojombo
378
72k
Chasing Engaging Ingredients in Design
codingconduct
0
410
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
Are puppies a ranking factor?
jonoalderson
2
4.2k
For a Future-Friendly Web
brad_frost
184
11k
Thoughts on Productivity
jonyablonski
76
5.5k