Merge branch '1.5.x'
This commit is contained in:
commit
bed727ae8c
|
@ -60,8 +60,7 @@ public class SpringApplicationAdminJmxAutoConfiguration {
|
||||||
private final Environment environment;
|
private final Environment environment;
|
||||||
|
|
||||||
public SpringApplicationAdminJmxAutoConfiguration(
|
public SpringApplicationAdminJmxAutoConfiguration(
|
||||||
ObjectProvider<MBeanExporter> mbeanExporter,
|
ObjectProvider<MBeanExporter> mbeanExporter, Environment environment) {
|
||||||
Environment environment) {
|
|
||||||
this.mbeanExporter = mbeanExporter.getIfAvailable();
|
this.mbeanExporter = mbeanExporter.getIfAvailable();
|
||||||
this.environment = environment;
|
this.environment = environment;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,9 @@ public class CouchbaseCacheConfiguration {
|
||||||
public CouchbaseCacheManager cacheManager() {
|
public CouchbaseCacheManager cacheManager() {
|
||||||
List<String> cacheNames = this.cacheProperties.getCacheNames();
|
List<String> cacheNames = this.cacheProperties.getCacheNames();
|
||||||
CouchbaseCacheManager cacheManager = new CouchbaseCacheManager(
|
CouchbaseCacheManager cacheManager = new CouchbaseCacheManager(
|
||||||
CacheBuilder.newInstance(this.bucket).withExpiration(
|
CacheBuilder.newInstance(this.bucket)
|
||||||
this.cacheProperties.getCouchbase().getExpirationSeconds()),
|
.withExpiration(this.cacheProperties.getCouchbase()
|
||||||
|
.getExpirationSeconds()),
|
||||||
cacheNames.toArray(new String[cacheNames.size()]));
|
cacheNames.toArray(new String[cacheNames.size()]));
|
||||||
return this.customizers.customize(cacheManager);
|
return this.customizers.customize(cacheManager);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,8 @@ public class DataSourceAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
public DataSourceInitializer dataSourceInitializer(
|
public DataSourceInitializer dataSourceInitializer(DataSourceProperties properties,
|
||||||
DataSourceProperties properties, ApplicationContext applicationContext) {
|
ApplicationContext applicationContext) {
|
||||||
return new DataSourceInitializer(properties, applicationContext);
|
return new DataSourceInitializer(properties, applicationContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,8 @@ class DataSourceInitializer implements ApplicationListener<DataSourceInitialized
|
||||||
|
|
||||||
private boolean initialized = false;
|
private boolean initialized = false;
|
||||||
|
|
||||||
DataSourceInitializer(DataSourceProperties properties, ApplicationContext applicationContext) {
|
DataSourceInitializer(DataSourceProperties properties,
|
||||||
|
ApplicationContext applicationContext) {
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
this.applicationContext = applicationContext;
|
this.applicationContext = applicationContext;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,6 @@ public class AopAutoConfigurationTests {
|
||||||
this.context = ctx;
|
this.context = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@EnableAspectJAutoProxy(proxyTargetClass = true)
|
@EnableAspectJAutoProxy(proxyTargetClass = true)
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import(TestConfiguration.class)
|
@Import(TestConfiguration.class)
|
||||||
|
|
|
@ -66,7 +66,8 @@ public class CassandraAutoConfigurationTests {
|
||||||
public void createCustomizeCluster() {
|
public void createCustomizeCluster() {
|
||||||
load(MockCustomizerConfig.class);
|
load(MockCustomizerConfig.class);
|
||||||
assertThat(this.context.getBeanNamesForType(Cluster.class).length).isEqualTo(1);
|
assertThat(this.context.getBeanNamesForType(Cluster.class).length).isEqualTo(1);
|
||||||
assertThat(this.context.getBeanNamesForType(ClusterBuilderCustomizer.class).length)
|
assertThat(
|
||||||
|
this.context.getBeanNamesForType(ClusterBuilderCustomizer.class).length)
|
||||||
.isEqualTo(1);
|
.isEqualTo(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ public class SampleController {
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Map<String, String> hello() {
|
public Map<String, String> hello() {
|
||||||
return Collections.singletonMap("message", "Hello " +
|
return Collections.singletonMap("message",
|
||||||
this.helloWorldProperties.getName());
|
"Hello " + this.helloWorldProperties.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static class Message {
|
protected static class Message {
|
||||||
|
|
|
@ -163,10 +163,10 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the application. Normally all you would need to do is to add sources (e.g.
|
* Configure the application. Normally all you would need to do is to add sources
|
||||||
* config classes) because other settings have sensible defaults. You might choose
|
* (e.g. config classes) because other settings have sensible defaults. You might
|
||||||
* (for instance) to add default command line arguments, or set an active Spring
|
* choose (for instance) to add default command line arguments, or set an active
|
||||||
* profile.
|
* Spring profile.
|
||||||
* @param builder a builder for the application context
|
* @param builder a builder for the application context
|
||||||
* @return the application builder
|
* @return the application builder
|
||||||
* @see SpringApplicationBuilder
|
* @see SpringApplicationBuilder
|
||||||
|
|
|
@ -144,8 +144,8 @@ public class SpringProfileDocumentMatcher implements DocumentMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ProfilesMatcher} that matches when a value in {@code spring.profiles} is also
|
* {@link ProfilesMatcher} that matches when a value in {@code spring.profiles} is
|
||||||
* in {@code spring.profiles.active}.
|
* also in {@code spring.profiles.active}.
|
||||||
*/
|
*/
|
||||||
private static class ActiveProfilesMatcher extends ProfilesMatcher {
|
private static class ActiveProfilesMatcher extends ProfilesMatcher {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue