Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
Update KafkaChannelsScanner implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
stavshamir committed Aug 18, 2020
1 parent d151c2d commit 055c379
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package io.github.stavshamir.springwolf.asyncapi.scanners.channels;

import com.google.common.collect.ImmutableMap;
import io.github.stavshamir.springwolf.asyncapi.scanners.components.ComponentsScanner;
import io.github.stavshamir.springwolf.asyncapi.types.channel.operation.bindings.OperationBinding;
import io.github.stavshamir.springwolf.asyncapi.types.channel.operation.bindings.kafka.KafkaOperationBinding;
import io.github.stavshamir.springwolf.configuration.KafkaProtocolConfiguration;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.EmbeddedValueResolverAware;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;
Expand All @@ -16,7 +14,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static java.util.stream.Collectors.toList;

Expand All @@ -27,7 +24,6 @@ public class KafkaChannelsScanner extends AbstractChannelScanner<KafkaListener>
implements ChannelsScanner, EmbeddedValueResolverAware {

private final KafkaProtocolConfiguration kafkaProtocolConfiguration;
private final ComponentsScanner componentsScanner;

private StringValueResolver resolver;

Expand All @@ -37,9 +33,8 @@ public void setEmbeddedValueResolver(StringValueResolver resolver) {
}

@Override
protected Set<Class<?>> getClassesToScan() {
String basePackage = kafkaProtocolConfiguration.getBasePackage();
return componentsScanner.scanForComponents(basePackage);
protected String getBasePackage() {
return kafkaProtocolConfiguration.getBasePackage();
}

@Override
Expand Down

0 comments on commit 055c379

Please sign in to comment.