File tree 5 files changed +18
-4
lines changed
pubsubly-service/src/main/java/com/github/wkennedy/pubsubly
5 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 11
11
import org .springframework .beans .factory .annotation .Autowired ;
12
12
import org .springframework .context .annotation .Bean ;
13
13
import org .springframework .context .annotation .Configuration ;
14
+ import org .springframework .hateoas .client .LinkDiscoverer ;
15
+ import org .springframework .hateoas .client .LinkDiscoverers ;
16
+ import org .springframework .hateoas .mediatype .collectionjson .CollectionJsonLinkDiscoverer ;
17
+ import org .springframework .plugin .core .SimplePluginRegistry ;
14
18
import org .springframework .web .servlet .config .annotation .CorsRegistry ;
15
19
import org .springframework .web .servlet .config .annotation .ResourceHandlerRegistry ;
16
20
import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
17
21
22
+ import java .util .ArrayList ;
23
+ import java .util .List ;
24
+
18
25
@ Configuration
19
26
public class WebConfig implements WebMvcConfigurer {
20
27
@@ -25,6 +32,13 @@ public void configureJackson(ObjectMapper jackson2ObjectMapper) {
25
32
jackson2ObjectMapper .setVisibility (PropertyAccessor .FIELD , JsonAutoDetect .Visibility .ANY );
26
33
}
27
34
35
+ @ Bean
36
+ public LinkDiscoverers discoverers () {
37
+ List <LinkDiscoverer > plugins = new ArrayList <>();
38
+ plugins .add (new CollectionJsonLinkDiscoverer ());
39
+ return new LinkDiscoverers (SimplePluginRegistry .create (plugins ));
40
+ }
41
+
28
42
@ Override
29
43
public void addCorsMappings (CorsRegistry registry ) {
30
44
registry .addMapping ("/**" );
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class DemoConfig {
14
14
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC" ;
15
15
private static final String KAFKA_USER_TOPIC = "DEMO-KAFKA_USER_TOPIC" ;
16
16
private static final String REDIS_TOPIC = "REDIS-USER-SESSION" ;
17
- private static final String EXTERNAL_TOPIC = "EXTERNAL_TOPIC" ;
17
+ private static final String EXTERNAL_TOPIC = "DEMO- EXTERNAL_TOPIC" ;
18
18
19
19
@ Bean
20
20
public NewTopic topic1 () {
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public class DemoService {
57
57
private static final String KAFKA_BID_TOPIC = "DEMO-KAFKA_BID_TOPIC" ;
58
58
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC" ;
59
59
private static final String KAFKA_USER_TOPIC = "DEMO-KAFKA_USER_TOPIC" ;
60
- private static final String EXTERNAL_TOPIC = "EXTERNAL_TOPIC" ;
60
+ private static final String EXTERNAL_TOPIC = "DEMO- EXTERNAL_TOPIC" ;
61
61
private static final String REDIS_TOPIC = "REDIS-USER-SESSION" ;
62
62
63
63
private final StringRedisTemplate stringRedisTemplate ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class LocalDemoConfig {
11
11
private static final String KAFKA_BID_TOPIC = "DEMO-KAFKA_BID_TOPIC" ;
12
12
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC" ;
13
13
private static final String KAFKA_USER_TOPIC = "DEMO-KAFKA_USER_TOPIC" ;
14
- private static final String EXTERNAL_TOPIC = "EXTERNAL_TOPIC" ;
14
+ private static final String EXTERNAL_TOPIC = "DEMO- EXTERNAL_TOPIC" ;
15
15
16
16
@ Bean
17
17
public NewTopic topic1 () {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class LocalDemoService {
33
33
private static final String KAFKA_BID_TOPIC = "DEMO-KAFKA_BID_TOPIC" ;
34
34
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC" ;
35
35
private static final String KAFKA_USER_TOPIC = "DEMO-KAFKA_USER_TOPIC" ;
36
- private static final String EXTERNAL_TOPIC = "EXTERNAL_TOPIC" ;
36
+ private static final String EXTERNAL_TOPIC = "DEMO- EXTERNAL_TOPIC" ;
37
37
38
38
39
39
private KafkaProperties kafkaProperties ;
You can’t perform that action at this time.
0 commit comments