mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
b9bb31cfd4
commit
b3ec2c9d1d
@ -63,7 +63,8 @@ import org.springframework.util.StringUtils;
|
|||||||
public abstract class AnnotationEndpointDiscoverer<K, T extends Operation>
|
public abstract class AnnotationEndpointDiscoverer<K, T extends Operation>
|
||||||
implements EndpointDiscoverer<T> {
|
implements EndpointDiscoverer<T> {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(AnnotationEndpointDiscoverer.class);
|
private static final Log logger = LogFactory
|
||||||
|
.getLog(AnnotationEndpointDiscoverer.class);
|
||||||
|
|
||||||
private final ApplicationContext applicationContext;
|
private final ApplicationContext applicationContext;
|
||||||
|
|
||||||
@ -280,7 +281,9 @@ public abstract class AnnotationEndpointDiscoverer<K, T extends Operation>
|
|||||||
// Possibly a lambda-defined EndpointFilter which we could not resolve the
|
// Possibly a lambda-defined EndpointFilter which we could not resolve the
|
||||||
// generic EndpointInfo type for
|
// generic EndpointInfo type for
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Non-matching EndpointInfo for EndpointFilter: " + filter, ex);
|
logger.debug(
|
||||||
|
"Non-matching EndpointInfo for EndpointFilter: " + filter,
|
||||||
|
ex);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -96,8 +96,8 @@ public class CacheMetricsRegistrar {
|
|||||||
catch (ClassCastException ex) {
|
catch (ClassCastException ex) {
|
||||||
String msg = ex.getMessage();
|
String msg = ex.getMessage();
|
||||||
if (msg == null || msg.startsWith(cache.getClass().getName())) {
|
if (msg == null || msg.startsWith(cache.getClass().getName())) {
|
||||||
// Possibly a lambda-defined CacheMeterBinderProvider which we could not resolve
|
// Possibly a lambda-defined CacheMeterBinderProvider which we
|
||||||
// the generic Cache type for
|
// could not resolve the generic Cache type for
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Non-matching Cache type for CacheMeterBinderProvider: "
|
"Non-matching Cache type for CacheMeterBinderProvider: "
|
||||||
|
@ -58,8 +58,8 @@ public class MessageSourceAutoConfigurationTests {
|
|||||||
public void propertiesBundleWithSlashIsDetected() {
|
public void propertiesBundleWithSlashIsDetected() {
|
||||||
this.contextRunner.withPropertyValues("spring.messages.basename:test/messages")
|
this.contextRunner.withPropertyValues("spring.messages.basename:test/messages")
|
||||||
.run((context) -> {
|
.run((context) -> {
|
||||||
assertThat(context).hasSingleBean(MessageSource.class); assertThat(
|
assertThat(context).hasSingleBean(MessageSource.class);
|
||||||
context.getMessage("foo", null, "Foo message", Locale.UK))
|
assertThat(context.getMessage("foo", null, "Foo message", Locale.UK))
|
||||||
.isEqualTo("bar");
|
.isEqualTo("bar");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -69,8 +69,7 @@ public class MessageSourceAutoConfigurationTests {
|
|||||||
this.contextRunner.withPropertyValues("spring.messages.basename:test.messages")
|
this.contextRunner.withPropertyValues("spring.messages.basename:test.messages")
|
||||||
.run((context) -> {
|
.run((context) -> {
|
||||||
assertThat(context).hasSingleBean(MessageSource.class);
|
assertThat(context).hasSingleBean(MessageSource.class);
|
||||||
assertThat(
|
assertThat(context.getMessage("foo", null, "Foo message", Locale.UK))
|
||||||
context.getMessage("foo", null, "Foo message", Locale.UK))
|
|
||||||
.isEqualTo("bar");
|
.isEqualTo("bar");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,8 @@ import org.springframework.util.Assert;
|
|||||||
public class WebServerFactoryCustomizerBeanPostProcessor
|
public class WebServerFactoryCustomizerBeanPostProcessor
|
||||||
implements BeanPostProcessor, BeanFactoryAware {
|
implements BeanPostProcessor, BeanFactoryAware {
|
||||||
|
|
||||||
private static final Log logger = LogFactory.getLog(WebServerFactoryCustomizerBeanPostProcessor.class);
|
private static final Log logger = LogFactory
|
||||||
|
.getLog(WebServerFactoryCustomizerBeanPostProcessor.class);
|
||||||
|
|
||||||
private ListableBeanFactory beanFactory;
|
private ListableBeanFactory beanFactory;
|
||||||
|
|
||||||
@ -94,7 +95,8 @@ public class WebServerFactoryCustomizerBeanPostProcessor
|
|||||||
catch (ClassCastException ex) {
|
catch (ClassCastException ex) {
|
||||||
String msg = ex.getMessage();
|
String msg = ex.getMessage();
|
||||||
if (msg == null || msg.startsWith(webServerFactory.getClass().getName())) {
|
if (msg == null || msg.startsWith(webServerFactory.getClass().getName())) {
|
||||||
// Possibly a lambda-defined WebServerFactoryCustomizer which we could not resolve the
|
// Possibly a lambda-defined WebServerFactoryCustomizer which we could not
|
||||||
|
// resolve the
|
||||||
// generic WebServerFactory type for
|
// generic WebServerFactory type for
|
||||||
logLambdaDebug(customizer, ex);
|
logLambdaDebug(customizer, ex);
|
||||||
}
|
}
|
||||||
@ -107,7 +109,10 @@ public class WebServerFactoryCustomizerBeanPostProcessor
|
|||||||
private void logLambdaDebug(WebServerFactoryCustomizer<?> customizer,
|
private void logLambdaDebug(WebServerFactoryCustomizer<?> customizer,
|
||||||
ClassCastException ex) {
|
ClassCastException ex) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Non-matching WebServerFactory type for WebServerFactoryCustomizer: " + customizer, ex);
|
logger.debug(
|
||||||
|
"Non-matching WebServerFactory type for WebServerFactoryCustomizer: "
|
||||||
|
+ customizer,
|
||||||
|
ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,17 +31,17 @@ import javax.ws.rs.client.Entity;
|
|||||||
import javax.ws.rs.client.WebTarget;
|
import javax.ws.rs.client.WebTarget;
|
||||||
|
|
||||||
import com.github.dockerjava.api.DockerClient;
|
import com.github.dockerjava.api.DockerClient;
|
||||||
|
import com.github.dockerjava.api.DockerClientException;
|
||||||
import com.github.dockerjava.api.command.DockerCmd;
|
import com.github.dockerjava.api.command.DockerCmd;
|
||||||
import com.github.dockerjava.api.exception.DockerClientException;
|
|
||||||
import com.github.dockerjava.api.model.BuildResponseItem;
|
import com.github.dockerjava.api.model.BuildResponseItem;
|
||||||
import com.github.dockerjava.api.model.Frame;
|
import com.github.dockerjava.api.model.Frame;
|
||||||
|
import com.github.dockerjava.core.CompressArchiveUtil;
|
||||||
import com.github.dockerjava.core.DefaultDockerClientConfig;
|
import com.github.dockerjava.core.DefaultDockerClientConfig;
|
||||||
import com.github.dockerjava.core.DockerClientBuilder;
|
import com.github.dockerjava.core.DockerClientBuilder;
|
||||||
import com.github.dockerjava.core.DockerClientConfig;
|
import com.github.dockerjava.core.DockerClientConfig;
|
||||||
import com.github.dockerjava.core.command.AttachContainerResultCallback;
|
import com.github.dockerjava.core.command.AttachContainerResultCallback;
|
||||||
import com.github.dockerjava.core.command.BuildImageResultCallback;
|
import com.github.dockerjava.core.command.BuildImageResultCallback;
|
||||||
import com.github.dockerjava.core.command.WaitContainerResultCallback;
|
import com.github.dockerjava.core.command.WaitContainerResultCallback;
|
||||||
import com.github.dockerjava.core.util.CompressArchiveUtil;
|
|
||||||
import com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec;
|
import com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec;
|
||||||
import com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory;
|
import com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory;
|
||||||
import org.assertj.core.api.Condition;
|
import org.assertj.core.api.Condition;
|
||||||
|
Loading…
Reference in New Issue
Block a user