Commit 10868519 authored by Andy Wilkinson's avatar Andy Wilkinson

Adapt to breaking API change in Spring Data Commons

parent f5da19f2
/* /*
* Copyright 2012-2015 the original author or authors. * Copyright 2012-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -33,6 +33,7 @@ import org.springframework.core.type.StandardAnnotationMetadata; ...@@ -33,6 +33,7 @@ import org.springframework.core.type.StandardAnnotationMetadata;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource; import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
import org.springframework.data.repository.config.RepositoryConfigurationDelegate; import org.springframework.data.repository.config.RepositoryConfigurationDelegate;
import org.springframework.data.repository.config.RepositoryConfigurationExtension; import org.springframework.data.repository.config.RepositoryConfigurationExtension;
import org.springframework.data.util.Streamable;
/** /**
* Base {@link ImportBeanDefinitionRegistrar} used to auto-configure Spring Data * Base {@link ImportBeanDefinitionRegistrar} used to auto-configure Spring Data
...@@ -66,15 +67,15 @@ public abstract class AbstractRepositoryConfigurationSourceSupport ...@@ -66,15 +67,15 @@ public abstract class AbstractRepositoryConfigurationSourceSupport
return new AnnotationRepositoryConfigurationSource(metadata, getAnnotation(), return new AnnotationRepositoryConfigurationSource(metadata, getAnnotation(),
this.resourceLoader, this.environment) { this.resourceLoader, this.environment) {
@Override @Override
public java.lang.Iterable<String> getBasePackages() { public Streamable<String> getBasePackages() {
return AbstractRepositoryConfigurationSourceSupport.this return AbstractRepositoryConfigurationSourceSupport.this
.getBasePackages(); .getBasePackages();
} }
}; };
} }
protected Iterable<String> getBasePackages() { protected Streamable<String> getBasePackages() {
return AutoConfigurationPackages.get(this.beanFactory); return Streamable.of(AutoConfigurationPackages.get(this.beanFactory));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment