Merge pull request #9855 from izeye:polish-20170725-update
* pr/9855: Polish
This commit is contained in:
commit
8d3d16b235
|
@ -1519,7 +1519,7 @@ There is a catch however. Because the actual type of the connection pool is not
|
|||
no keys are generated in the metadata for your custom `DataSource` and no completion is
|
||||
available in your IDE (The `DataSource` interface doesn't expose any property). Also, if
|
||||
you happen to have Hikari on the classpath, this basic setup will not work because Hikari
|
||||
has no `url` parameter (but a `jdbcUrl` parameter). You will have to rewrite your
|
||||
has no `url` property (but a `jdbcUrl` property). You will have to rewrite your
|
||||
configuration as follows:
|
||||
|
||||
[source,properties,indent=0]
|
||||
|
@ -1585,7 +1585,7 @@ described in the previous section. You must, however, mark one of the `DataSourc
|
|||
type.
|
||||
|
||||
If you create your own `DataSource`, the auto-configuration will back off. In the example
|
||||
below, we provide the _exact_ same features set than what the auto-configuration provides
|
||||
below, we provide the _exact_ same features set as what the auto-configuration provides
|
||||
on the primary data source:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes,attributes"]
|
||||
|
@ -1618,7 +1618,7 @@ include::{code-examples}/jdbc/CompleteTwoDataSourcesExample.java[tag=configurati
|
|||
----
|
||||
|
||||
This final example configures two data sources on custom namespaces with the same logic
|
||||
than what Spring Boot would do in auto-configuration.
|
||||
as what Spring Boot would do in auto-configuration.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -262,14 +262,14 @@ public class SpringApplication {
|
|||
this.resourceLoader = resourceLoader;
|
||||
Assert.notNull(primarySources, "PrimarySources must not be null");
|
||||
this.primarySources = new LinkedHashSet<>(Arrays.asList(primarySources));
|
||||
this.webApplicationType = deduceWebApplication();
|
||||
this.webApplicationType = deduceWebApplicationType();
|
||||
setInitializers((Collection) getSpringFactoriesInstances(
|
||||
ApplicationContextInitializer.class));
|
||||
setListeners((Collection) getSpringFactoriesInstances(ApplicationListener.class));
|
||||
this.mainApplicationClass = deduceMainApplicationClass();
|
||||
}
|
||||
|
||||
private WebApplicationType deduceWebApplication() {
|
||||
private WebApplicationType deduceWebApplicationType() {
|
||||
if (ClassUtils.isPresent(REACTIVE_WEB_ENVIRONMENT_CLASS, null)
|
||||
&& !ClassUtils.isPresent(MVC_WEB_ENVIRONMENT_CLASS, null)) {
|
||||
return WebApplicationType.REACTIVE;
|
||||
|
|
|
@ -302,12 +302,12 @@ public class SpringApplicationBuilder {
|
|||
/**
|
||||
* Flag to explicitly request a specific type of web application. Auto-detected based
|
||||
* on the classpath if not set.
|
||||
* @param webApplication the type of web application
|
||||
* @param webApplicationType the type of web application
|
||||
* @return the current builder
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public SpringApplicationBuilder web(WebApplicationType webApplication) {
|
||||
this.application.setWebApplicationType(webApplication);
|
||||
public SpringApplicationBuilder web(WebApplicationType webApplicationType) {
|
||||
this.application.setWebApplicationType(webApplicationType);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -763,12 +763,12 @@ public abstract class AbstractServletWebServerFactoryTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void compressionOfResposeToGetRequest() throws Exception {
|
||||
public void compressionOfResponseToGetRequest() throws Exception {
|
||||
assertThat(doTestCompression(10000, null, null)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void compressionOfResposeToPostRequest() throws Exception {
|
||||
public void compressionOfResponseToPostRequest() throws Exception {
|
||||
assertThat(doTestCompression(10000, null, null, HttpMethod.POST)).isTrue();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue