File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
src/main/java/umc/th/juinjang
api/appVersion/controller Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ package umc .th .juinjang .api .appVersion .controller ;
2+
3+ import org .springframework .web .bind .annotation .GetMapping ;
4+ import org .springframework .web .bind .annotation .RequestMapping ;
5+ import org .springframework .web .bind .annotation .RestController ;
6+
7+ import lombok .RequiredArgsConstructor ;
8+ import umc .th .juinjang .api .appVersion .controller .response .AppVersionResponse ;
9+ import umc .th .juinjang .api .dto .ApiResponse ;
10+ import umc .th .juinjang .config .AppVersionProperties ;
11+
12+ @ RestController
13+ @ RequestMapping ("/api/app/version" )
14+ @ RequiredArgsConstructor
15+ public class AppVersionController {
16+
17+ private final AppVersionProperties appVersionProperties ;
18+
19+ @ GetMapping ("/ios" )
20+ public ApiResponse <AppVersionResponse > getIOSVersion () {
21+ return ApiResponse .onSuccess (AppVersionResponse .of (appVersionProperties .getIos ()));
22+ }
23+
24+ }
Original file line number Diff line number Diff line change 1+ package umc .th .juinjang .api .appVersion .controller .response ;
2+
3+ public record AppVersionResponse (
4+ String version
5+ ) {
6+ public static AppVersionResponse of (String version ) {
7+ return new AppVersionResponse (version );
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ package umc .th .juinjang .config ;
2+
3+ import org .springframework .boot .context .properties .ConfigurationProperties ;
4+ import org .springframework .context .annotation .Configuration ;
5+
6+ import lombok .Getter ;
7+ import lombok .Setter ;
8+
9+ @ Configuration
10+ @ ConfigurationProperties (prefix = "app.version" )
11+ @ Getter
12+ @ Setter
13+ public class AppVersionProperties {
14+
15+ /**
16+ * IOS 의 어플 최신 버전
17+ */
18+ private String ios ;
19+ }
You can’t perform that action at this time.
0 commit comments