-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathVoucherManagementSystemApplication.java
More file actions
38 lines (30 loc) · 1.21 KB
/
VoucherManagementSystemApplication.java
File metadata and controls
38 lines (30 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package team.marco.voucher_management_system;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.ComponentScan;
import team.marco.voucher_management_system.console_app.ConsoleApplication;
import team.marco.voucher_management_system.util.Console;
import team.marco.voucher_management_system.web_app.WebApplication;
@ComponentScan
@ConfigurationPropertiesScan
public class VoucherManagementSystemApplication {
public static void main(String[] args) {
Console.print("""
=== 실행할 애플리케이션을 선택해주세요. ===
0. Console Application
1. Web Application""");
selectApplication(args);
Console.close();
}
private static void selectApplication(String[] args) {
String input = Console.readString();
switch (input) {
case "0" -> ConsoleApplication.main(args);
case "1" -> WebApplication.main(args);
default -> reselect(args);
}
}
private static void reselect(String[] args) {
Console.print("사용할 수 없는 애플리케이션 입니다.");
selectApplication(args);
}
}