Use the required autoconfiguration in test
- Instead of using `@EnableAutoConfiguration` use `PropertyPlaceholderAutoConfiguration` which is all required for the property resolution
This commit is contained in:
@@ -41,8 +41,7 @@ import org.springframework.context.annotation.Import;
|
||||
@Documented
|
||||
@Inherited
|
||||
@Configuration
|
||||
@Import({
|
||||
ChannelBindingAdapterConfiguration.class, AggregateBuilderConfiguration.class, ModuleRegistrar.class})
|
||||
@Import({ChannelBindingAdapterConfiguration.class, AggregateBuilderConfiguration.class, ModuleRegistrar.class})
|
||||
public @interface EnableModule {
|
||||
|
||||
Class<?>[] value() default {};
|
||||
|
||||
@@ -26,9 +26,10 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.cloud.stream.adapter.ChannelBinding;
|
||||
import org.springframework.cloud.stream.adapter.ChannelBindingAdapter;
|
||||
@@ -133,8 +134,7 @@ public class ChannelBindingAdapterConfigurationTests {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Import({ChannelBindingAdapterConfiguration.class})
|
||||
@EnableAutoConfiguration
|
||||
@Import({ChannelBindingAdapterConfiguration.class, PropertyPlaceholderAutoConfiguration.class})
|
||||
protected static class Empty {
|
||||
@Bean
|
||||
public LocalMessageChannelBinder binder() {
|
||||
|
||||
Reference in New Issue
Block a user