Restructure web auto-configuration
Restructure `org.springframework.boot.autoconfigure.web` to better align with the new package structure in `spring-boot`. Auto-configuration is now split into client, servlet and reactive sub-packages. In addition a new `http` package now handles common HTTP concerns. Fixes gh-8616
This commit is contained in:
@@ -16,8 +16,13 @@
|
||||
|
||||
package org.springframework.boot.context.embedded;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.catalina.Context;
|
||||
import org.apache.catalina.webresources.TomcatURLStreamHandlerFactory;
|
||||
import org.apache.tomcat.util.http.LegacyCookieProcessor;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -28,6 +33,7 @@ import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostPro
|
||||
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -38,6 +44,14 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class TomcatLegacyCookieProcessorExampleTests {
|
||||
|
||||
@BeforeClass
|
||||
@AfterClass
|
||||
public static void uninstallUrlStreamHandlerFactory() {
|
||||
ReflectionTestUtils.setField(TomcatURLStreamHandlerFactory.class, "instance",
|
||||
null);
|
||||
ReflectionTestUtils.setField(URL.class, "factory", null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cookieProcessorIsCustomized() {
|
||||
ServletWebServerApplicationContext applicationContext = (ServletWebServerApplicationContext) new SpringApplication(
|
||||
|
||||
Reference in New Issue
Block a user