-
Notifications
You must be signed in to change notification settings - Fork 1
/
ConfigApplication.java
55 lines (43 loc) · 1.67 KB
/
ConfigApplication.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package io.github.cepr0.demo.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.SubscribableChannel;
@Slf4j
@EnableBinding(ConfigApplication.Routes.class)
@SpringBootApplication
public class ConfigApplication {
public static void main(String[] args) {
new SpringApplicationBuilder(ConfigApplication.class)
.bannerMode(Banner.Mode.OFF)
.run(args)
.close();
}
public interface Routes {
// to order-service
@Input("order-completed-to-order-service")
SubscribableChannel orderCompletedToOrderService();
@Input("product-not-found-to-order-service")
SubscribableChannel productNotFoundToOrderService();
@Input("product-ended-to-order-service")
SubscribableChannel productEndedToOrderService();
// to product-service
@Input("order-created-to-product-service")
SubscribableChannel orderCreatedToProductService();
// to supply-service
@Input("product-ended-to-supply-service")
SubscribableChannel productEndedToSupplyService();
// to stat-service
@Input("order-created-to-stat-service")
SubscribableChannel orderCreatedToStatService();
@Input("order-completed-to-stat-service")
SubscribableChannel orderCompletedToStatService();
@Input("product-not-found-to-stat-service")
SubscribableChannel productNotFoundToStatService();
@Input("product-ended-to-stat-service")
SubscribableChannel productEndedToStatService();
}
}