Skip to content

Commit 9aa2c41

Browse files
authored
Merge pull request #6 from wkennedy/dev
Dev
2 parents 9638b9d + 46d635b commit 9aa2c41

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

pubsubly-service/src/main/java/com/github/wkennedy/pubsubly/config/WebConfig.java

+14
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111
import org.springframework.beans.factory.annotation.Autowired;
1212
import org.springframework.context.annotation.Bean;
1313
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;
1418
import org.springframework.web.servlet.config.annotation.CorsRegistry;
1519
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
1620
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
1721

22+
import java.util.ArrayList;
23+
import java.util.List;
24+
1825
@Configuration
1926
public class WebConfig implements WebMvcConfigurer {
2027

@@ -25,6 +32,13 @@ public void configureJackson(ObjectMapper jackson2ObjectMapper) {
2532
jackson2ObjectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
2633
}
2734

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+
2842
@Override
2943
public void addCorsMappings(CorsRegistry registry) {
3044
registry.addMapping("/**");

pubsubly-service/src/main/java/com/github/wkennedy/pubsubly/demo/DemoConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class DemoConfig {
1414
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC";
1515
private static final String KAFKA_USER_TOPIC = "DEMO-KAFKA_USER_TOPIC";
1616
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";
1818

1919
@Bean
2020
public NewTopic topic1() {

pubsubly-service/src/main/java/com/github/wkennedy/pubsubly/demo/DemoService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class DemoService {
5757
private static final String KAFKA_BID_TOPIC = "DEMO-KAFKA_BID_TOPIC";
5858
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC";
5959
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";
6161
private static final String REDIS_TOPIC = "REDIS-USER-SESSION";
6262

6363
private final StringRedisTemplate stringRedisTemplate;

pubsubly-service/src/main/java/com/github/wkennedy/pubsubly/demo/LocalDemoConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class LocalDemoConfig {
1111
private static final String KAFKA_BID_TOPIC = "DEMO-KAFKA_BID_TOPIC";
1212
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC";
1313
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";
1515

1616
@Bean
1717
public NewTopic topic1() {

pubsubly-service/src/main/java/com/github/wkennedy/pubsubly/demo/LocalDemoService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class LocalDemoService {
3333
private static final String KAFKA_BID_TOPIC = "DEMO-KAFKA_BID_TOPIC";
3434
private static final String KAFKA_ORDER_TOPIC = "DEMO-KAFKA_ORDER_TOPIC";
3535
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";
3737

3838

3939
private KafkaProperties kafkaProperties;

0 commit comments

Comments
 (0)