pull/15325/head
Andy Wilkinson 6 years ago
parent dad6d4beca
commit 2dc8f49f8a

@ -30,6 +30,7 @@ import org.springframework.boot.origin.OriginTrackedValue;
* @see OriginTrackedValue
* @see #getConfigurationProperty(ConfigurationPropertyName)
*/
@FunctionalInterface
public interface ConfigurationPropertySource {
/**

@ -61,9 +61,8 @@ class TomcatEmbeddedContext extends StandardContext {
}
public void deferredLoadOnStartup() throws LifecycleException {
doWithThreadContextClassLoader(getLoader().getClassLoader(), () -> {
getLoadOnStartupWrappers(findChildren()).forEach(this::load);
});
doWithThreadContextClassLoader(getLoader().getClassLoader(),
() -> getLoadOnStartupWrappers(findChildren()).forEach(this::load));
}
private Stream<Wrapper> getLoadOnStartupWrappers(Container[] children) {

@ -29,9 +29,6 @@ import javax.servlet.FilterRegistration;
import javax.servlet.FilterRegistration.Dynamic;
import javax.servlet.ServletContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@ -55,8 +52,6 @@ public abstract class AbstractFilterRegistrationBean<T extends Filter>
@Deprecated
protected static final int REQUEST_WRAPPER_FILTER_MAX_ORDER = 0;
private final Log logger = LogFactory.getLog(getClass());
private static final String[] DEFAULT_URL_MAPPINGS = { "/*" };
private Set<ServletRegistrationBean<?>> servletRegistrationBeans = new LinkedHashSet<>();

@ -26,9 +26,6 @@ import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletRegistration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
@ -54,8 +51,6 @@ import org.springframework.util.StringUtils;
public class ServletRegistrationBean<T extends Servlet>
extends DynamicRegistrationBean<ServletRegistration.Dynamic> {
private static final Log logger = LogFactory.getLog(ServletRegistrationBean.class);
private static final String[] DEFAULT_MAPPINGS = { "/*" };
private T servlet;

@ -24,6 +24,7 @@ import org.springframework.ws.client.core.WebServiceTemplate;
* @author Dmytro Nosan
* @since 2.1.0
*/
@FunctionalInterface
public interface WebServiceTemplateCustomizer {
/**

@ -85,11 +85,9 @@ public class ServletComponentScanRegistrarTests {
@Test
public void packagesConfiguredWithBothValueAndBasePackages() {
assertThatExceptionOfType(AnnotationConfigurationException.class)
.isThrownBy(() -> {
this.context = new AnnotationConfigApplicationContext(
ValueAndBasePackages.class);
}).withMessageContaining("'value'")
.withMessageContaining("'basePackages'")
.isThrownBy(() -> this.context = new AnnotationConfigApplicationContext(
ValueAndBasePackages.class))
.withMessageContaining("'value'").withMessageContaining("'basePackages'")
.withMessageContaining("com.example.foo")
.withMessageContaining("com.example.bar");
}

@ -1049,9 +1049,8 @@ public abstract class AbstractServletWebServerFactoryTests {
@Test
public void exceptionThrownOnLoadFailureIsRethrown() {
AbstractServletWebServerFactory factory = getFactory();
this.webServer = factory.getWebServer((context) -> {
context.addServlet("failing", FailingServlet.class).setLoadOnStartup(0);
});
this.webServer = factory.getWebServer((context) -> context
.addServlet("failing", FailingServlet.class).setLoadOnStartup(0));
assertThatExceptionOfType(WebServerException.class)
.isThrownBy(this.webServer::start)
.satisfies(this::wrapsFailingServletException);

Loading…
Cancel
Save