-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMainApplication.java
34 lines (27 loc) · 1016 Bytes
/
MainApplication.java
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
package jpa.practice.relationship.useful_transient;
import jpa.practice.relationship.useful_transient.service.OrderService;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class MainApplication {
private final OrderService orderService;
public MainApplication(OrderService orderService) {
this.orderService = orderService;
}
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
@Bean
public ApplicationRunner init() {
return args -> {
orderService.init();
//orderService.fetchV1Orders();
//orderService.fetchV1OrdersDto();
//orderService.fetchV2Orders();
//orderService.fetchV3Orders();
orderService.fetchV3OrdersDto();
};
}
}