parent
3684c2ec56
commit
caa4c0800f
|
@ -314,7 +314,7 @@ public final class ConditionMessage {
|
||||||
|
|
||||||
private final Builder condition;
|
private final Builder condition;
|
||||||
|
|
||||||
private final String reson;
|
private final String reason;
|
||||||
|
|
||||||
private final String singular;
|
private final String singular;
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ public final class ConditionMessage {
|
||||||
private ItemsBuilder(Builder condition, String reason, String singular,
|
private ItemsBuilder(Builder condition, String reason, String singular,
|
||||||
String plural) {
|
String plural) {
|
||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
this.reson = reason;
|
this.reason = reason;
|
||||||
this.singular = singular;
|
this.singular = singular;
|
||||||
this.plural = plural;
|
this.plural = plural;
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,7 @@ public final class ConditionMessage {
|
||||||
*/
|
*/
|
||||||
public ConditionMessage items(Style style, Collection<?> items) {
|
public ConditionMessage items(Style style, Collection<?> items) {
|
||||||
Assert.notNull(style, "Style must not be null");
|
Assert.notNull(style, "Style must not be null");
|
||||||
StringBuilder message = new StringBuilder(this.reson);
|
StringBuilder message = new StringBuilder(this.reason);
|
||||||
items = style.applyTo(items);
|
items = style.applyTo(items);
|
||||||
if ((this.condition == null || items.size() <= 1)
|
if ((this.condition == null || items.size() <= 1)
|
||||||
&& StringUtils.hasLength(this.singular)) {
|
&& StringUtils.hasLength(this.singular)) {
|
||||||
|
|
|
@ -52,8 +52,8 @@ class OnResourceCondition extends SpringBootCondition {
|
||||||
+ "least one resource location");
|
+ "least one resource location");
|
||||||
List<String> missing = new ArrayList<String>();
|
List<String> missing = new ArrayList<String>();
|
||||||
for (String location : locations) {
|
for (String location : locations) {
|
||||||
String resouce = context.getEnvironment().resolvePlaceholders(location);
|
String resource = context.getEnvironment().resolvePlaceholders(location);
|
||||||
if (!loader.getResource(resouce).exists()) {
|
if (!loader.getResource(resource).exists()) {
|
||||||
missing.add(location);
|
missing.add(location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,7 @@ public class DataSourceAutoConfiguration {
|
||||||
public ConditionOutcome getMatchOutcome(ConditionContext context,
|
public ConditionOutcome getMatchOutcome(ConditionContext context,
|
||||||
AnnotatedTypeMetadata metadata) {
|
AnnotatedTypeMetadata metadata) {
|
||||||
ConditionMessage.Builder message = ConditionMessage
|
ConditionMessage.Builder message = ConditionMessage
|
||||||
.forCondition("EmbeddedDataAvailble");
|
.forCondition("EmbeddedDataAvailable");
|
||||||
if (hasBean(context, DataSource.class)
|
if (hasBean(context, DataSource.class)
|
||||||
|| hasBean(context, XADataSource.class)) {
|
|| hasBean(context, XADataSource.class)) {
|
||||||
return ConditionOutcome
|
return ConditionOutcome
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class DispatcherServletAutoConfiguration {
|
||||||
.match(message.didNotFind("dispatcher servlet beans").atAll());
|
.match(message.didNotFind("dispatcher servlet beans").atAll());
|
||||||
}
|
}
|
||||||
return ConditionOutcome.match(message
|
return ConditionOutcome.match(message
|
||||||
.found("dipatcher servlet bean", "dispatcher servlet beans")
|
.found("dispatcher servlet bean", "dispatcher servlet beans")
|
||||||
.items(Style.QUOTE, dispatchServletBeans)
|
.items(Style.QUOTE, dispatchServletBeans)
|
||||||
.append("and none is named " + DEFAULT_DISPATCHER_SERVLET_BEAN_NAME));
|
.append("and none is named " + DEFAULT_DISPATCHER_SERVLET_BEAN_NAME));
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class ErrorMvcAutoConfiguration {
|
||||||
public ConditionOutcome getMatchOutcome(ConditionContext context,
|
public ConditionOutcome getMatchOutcome(ConditionContext context,
|
||||||
AnnotatedTypeMetadata metadata) {
|
AnnotatedTypeMetadata metadata) {
|
||||||
ConditionMessage.Builder message = ConditionMessage
|
ConditionMessage.Builder message = ConditionMessage
|
||||||
.forCondition("ErrorTemplate Misssing");
|
.forCondition("ErrorTemplate Missing");
|
||||||
TemplateAvailabilityProviders providers = new TemplateAvailabilityProviders(
|
TemplateAvailabilityProviders providers = new TemplateAvailabilityProviders(
|
||||||
context.getClassLoader());
|
context.getClassLoader());
|
||||||
TemplateAvailabilityProvider provider = providers.getProvider("error",
|
TemplateAvailabilityProvider provider = providers.getProvider("error",
|
||||||
|
|
|
@ -55,7 +55,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||||
* {@link WebEnvironment#DEFINED_PORT defined} or {@link WebEnvironment#RANDOM_PORT
|
* {@link WebEnvironment#DEFINED_PORT defined} or {@link WebEnvironment#RANDOM_PORT
|
||||||
* random} port.</li>
|
* random} port.</li>
|
||||||
* <li>Registers a {@link org.springframework.boot.test.web.client.TestRestTemplate
|
* <li>Registers a {@link org.springframework.boot.test.web.client.TestRestTemplate
|
||||||
* TestRestTemplate} bean for use in web tests that are using a fully running container
|
* TestRestTemplate} bean for use in web tests that are using a fully running container.
|
||||||
* </li>
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class LocalHostUriTemplateHandler extends RootUriTemplateHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@code LocalHostUriTemplateHandler} the will generate URIs with the
|
* Create a new {@code LocalHostUriTemplateHandler} that will generate URIs with the
|
||||||
* given {@code scheme} and use the given {@code environment} to determine the port.
|
* given {@code scheme} and use the given {@code environment} to determine the port.
|
||||||
* @param environment the environment used to determine the port
|
* @param environment the environment used to determine the port
|
||||||
* @param scheme the scheme of the root uri
|
* @param scheme the scheme of the root uri
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class BuildInfoMojo extends AbstractMojo {
|
||||||
}
|
}
|
||||||
catch (NullAdditionalPropertyValueException ex) {
|
catch (NullAdditionalPropertyValueException ex) {
|
||||||
throw new MojoFailureException(
|
throw new MojoFailureException(
|
||||||
"Failed to generated build-info.properties. " + ex.getMessage(), ex);
|
"Failed to generate build-info.properties. " + ex.getMessage(), ex);
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
throw new MojoExecutionException(ex.getMessage(), ex);
|
throw new MojoExecutionException(ex.getMessage(), ex);
|
||||||
|
|
Loading…
Reference in New Issue