Organize imports

This commit is contained in:
Phillip Webb 2015-09-08 14:40:35 -07:00
parent 0335053139
commit 2615990ffb
90 changed files with 87 additions and 182 deletions

View File

@ -16,9 +16,6 @@
package org.springframework.boot.actuate.hypermedia;
import groovy.text.Template;
import groovy.text.TemplateEngine;
import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
@ -53,6 +50,9 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.util.StringUtils;
import org.springframework.web.context.WebApplicationContext;
import groovy.text.Template;
import groovy.text.TemplateEngine;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;

View File

@ -16,13 +16,13 @@
package org.springframework.boot.actuate.hypermedia;
import groovy.text.GStringTemplateEngine;
import groovy.text.TemplateEngine;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import groovy.text.GStringTemplateEngine;
import groovy.text.TemplateEngine;
@SpringBootApplication
public class SpringBootHypermediaApplication {

View File

@ -18,8 +18,6 @@ package org.springframework.boot.actuate.autoconfigure;
import javax.cache.Caching;
import net.sf.ehcache.Ehcache;
import org.infinispan.spring.provider.SpringCache;
import org.springframework.boot.actuate.cache.CacheStatistics;
import org.springframework.boot.actuate.cache.CacheStatisticsProvider;
@ -46,6 +44,8 @@ import org.springframework.context.annotation.Configuration;
import com.hazelcast.core.IMap;
import com.hazelcast.spring.cache.HazelcastCache;
import net.sf.ehcache.Ehcache;
/**
* {@link EnableAutoConfiguration Auto-configuration} for {@link CacheStatisticsProvider}
* beans.

View File

@ -25,8 +25,6 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import liquibase.integration.spring.SpringLiquibase;
import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -69,6 +67,8 @@ import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.web.servlet.handler.AbstractHandlerMethodMapping;
import liquibase.integration.spring.SpringLiquibase;
/**
* {@link EnableAutoConfiguration Auto-configuration} for common management
* {@link Endpoint}s.

View File

@ -16,11 +16,11 @@
package org.springframework.boot.actuate.cache;
import net.sf.ehcache.statistics.StatisticsGateway;
import org.springframework.cache.CacheManager;
import org.springframework.cache.ehcache.EhCacheCache;
import net.sf.ehcache.statistics.StatisticsGateway;
/**
* {@link CacheStatisticsProvider} implementation for EhCache.
*

View File

@ -21,15 +21,15 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.Assert;
import liquibase.changelog.StandardChangeLogHistoryService;
import liquibase.database.Database;
import liquibase.database.DatabaseFactory;
import liquibase.database.jvm.JdbcConnection;
import liquibase.integration.spring.SpringLiquibase;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.Assert;
/**
* {@link Endpoint} to expose liquibase info.
*

View File

@ -16,8 +16,6 @@
package org.springframework.boot.actuate.endpoint;
import liquibase.integration.spring.SpringLiquibase;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
@ -26,6 +24,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import liquibase.integration.spring.SpringLiquibase;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

View File

@ -16,16 +16,16 @@
package org.springframework.boot.actuate.metrics.writer;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.runners.MockitoJUnitRunner;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
/**
* Tests for {@link DefaultCounterService}.
*/

View File

@ -16,9 +16,6 @@
package org.springframework.boot.autoconfigure.cache;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@ -30,6 +27,9 @@ import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
/**
* EhCache cache configuration. Only kick in if a configuration file location is set or if
* a default configuration file exists.

View File

@ -26,8 +26,6 @@ import javax.cache.configuration.MutableConfiguration;
import javax.cache.expiry.CreatedExpiryPolicy;
import javax.cache.expiry.Duration;
import net.sf.ehcache.Status;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.jcache.embedded.JCachingProvider;
import org.infinispan.spring.provider.SpringEmbeddedCacheManager;
@ -69,6 +67,8 @@ import com.hazelcast.cache.HazelcastCachingProvider;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.spring.cache.HazelcastCacheManager;
import net.sf.ehcache.Status;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.Matchers.contains;

View File

@ -16,8 +16,6 @@
package org.springframework.boot.cli.compiler;
import groovy.grape.Grape;
import java.net.MalformedURLException;
import java.net.URI;
import java.util.ArrayList;
@ -54,6 +52,8 @@ import org.springframework.boot.groovy.DependencyManagementBom;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import groovy.grape.Grape;
/**
* {@link ASTTransformation} for processing {@link DependencyManagementBom} annotations
*

View File

@ -33,8 +33,8 @@ import org.springframework.boot.devtools.classpath.ClassPathChangedEvent;
import org.springframework.boot.devtools.filewatch.ChangedFile;
import org.springframework.boot.devtools.filewatch.ChangedFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.context.ApplicationListener;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;

View File

@ -28,8 +28,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.devtools.restart.Restarter;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles.SourceFolder;
import org.springframework.util.Assert;
import org.springframework.util.FileCopyUtils;

View File

@ -17,7 +17,6 @@
package org.springframework.boot.devtools.autoconfigure;
import org.junit.Test;
import org.springframework.boot.devtools.autoconfigure.OptionalLiveReloadServer;
import org.springframework.boot.devtools.livereload.LiveReloadServer;
import static org.mockito.BDDMockito.willThrow;

View File

@ -22,7 +22,6 @@ import java.util.Set;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.classpath.ClassPathChangedEvent;
import org.springframework.boot.devtools.filewatch.ChangedFiles;
import static org.hamcrest.Matchers.equalTo;

View File

@ -26,7 +26,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.env.DevToolsHomePropertiesPostProcessor;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.mock.env.MockEnvironment;

View File

@ -22,7 +22,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.filewatch.ChangedFile;
import org.springframework.boot.devtools.filewatch.ChangedFile.Type;
import static org.hamcrest.Matchers.equalTo;

View File

@ -25,7 +25,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.filewatch.FileSnapshot;
import org.springframework.util.FileCopyUtils;
import static org.hamcrest.Matchers.equalTo;

View File

@ -17,7 +17,6 @@
package org.springframework.boot.devtools.livereload;
import org.junit.Test;
import org.springframework.boot.devtools.livereload.Base64Encoder;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -24,7 +24,6 @@ import java.io.InputStream;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.livereload.ConnectionInputStream;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -21,7 +21,6 @@ import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import org.junit.Test;
import org.springframework.boot.devtools.livereload.ConnectionOutputStream;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -23,8 +23,6 @@ import java.util.Arrays;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.livereload.ConnectionInputStream;
import org.springframework.boot.devtools.livereload.Frame;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -36,9 +36,6 @@ import org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.boot.devtools.livereload.Connection;
import org.springframework.boot.devtools.livereload.ConnectionClosedException;
import org.springframework.boot.devtools.livereload.LiveReloadServer;
import org.springframework.util.SocketUtils;
import org.springframework.web.client.RestTemplate;

View File

@ -32,12 +32,11 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.classpath.ClassPathChangedEvent;
import org.springframework.boot.devtools.filewatch.ChangedFile;
import org.springframework.boot.devtools.filewatch.ChangedFiles;
import org.springframework.boot.devtools.filewatch.ChangedFile.Type;
import org.springframework.boot.devtools.remote.client.ClassPathChangeUploader;
import org.springframework.boot.devtools.filewatch.ChangedFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles.SourceFolder;
import org.springframework.boot.devtools.test.MockClientHttpRequestFactory;
import org.springframework.http.HttpStatus;

View File

@ -26,7 +26,6 @@ import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.devtools.autoconfigure.OptionalLiveReloadServer;
import org.springframework.boot.devtools.remote.client.DelayedLiveReloadTrigger;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpRequest;

View File

@ -25,7 +25,6 @@ import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.boot.devtools.remote.client.HttpHeaderInterceptor;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpResponse;

View File

@ -30,8 +30,6 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.devtools.remote.server.Dispatcher;
import org.springframework.boot.devtools.remote.server.DispatcherFilter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.http.server.ServletServerHttpRequest;

View File

@ -27,10 +27,6 @@ import org.junit.rules.ExpectedException;
import org.mockito.InOrder;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.devtools.remote.server.AccessManager;
import org.springframework.boot.devtools.remote.server.Dispatcher;
import org.springframework.boot.devtools.remote.server.Handler;
import org.springframework.boot.devtools.remote.server.HandlerMapper;
import org.springframework.core.Ordered;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;

View File

@ -20,7 +20,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.remote.server.HttpHeaderAccessManager;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.mock.web.MockHttpServletRequest;

View File

@ -20,7 +20,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.remote.server.HttpStatusHandler;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;

View File

@ -21,8 +21,6 @@ import javax.servlet.http.HttpServletRequest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.remote.server.Handler;
import org.springframework.boot.devtools.remote.server.UrlHandlerMapper;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.mock.web.MockHttpServletRequest;

View File

@ -23,7 +23,6 @@ import java.net.URL;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.restart.ChangeableUrls;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -19,7 +19,6 @@ package org.springframework.boot.devtools.restart;
import java.net.URL;
import org.junit.Test;
import org.springframework.boot.devtools.restart.DefaultRestartInitializer;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;

View File

@ -22,7 +22,6 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.restart.MainMethod;
import org.springframework.util.ReflectionUtils;
import static org.hamcrest.Matchers.equalTo;

View File

@ -18,8 +18,6 @@ package org.springframework.boot.devtools.restart;
import java.net.URL;
import org.springframework.boot.devtools.restart.RestartInitializer;
/**
* Simple mock {@link RestartInitializer} that returns an empty array of URLs.
*

View File

@ -27,7 +27,6 @@ import org.junit.runners.model.Statement;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.boot.devtools.restart.Restarter;
import static org.mockito.BDDMockito.given;
import static org.mockito.Matchers.any;

View File

@ -21,10 +21,6 @@ import java.net.URL;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.boot.devtools.restart.ConditionalOnInitializedRestarter;
import org.springframework.boot.devtools.restart.OnInitializedRestarterCondition;
import org.springframework.boot.devtools.restart.RestartInitializer;
import org.springframework.boot.devtools.restart.Restarter;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

View File

@ -20,8 +20,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.devtools.restart.RestartScope;
import org.springframework.boot.devtools.restart.RestartScopeInitializer;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

View File

@ -17,7 +17,6 @@
package org.springframework.boot.devtools.restart;
import org.junit.Test;
import org.springframework.boot.devtools.restart.SilentExitExceptionHandler;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;

View File

@ -19,7 +19,6 @@ package org.springframework.boot.devtools.restart.classloader;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import static org.hamcrest.Matchers.equalTo;

View File

@ -27,8 +27,6 @@ import java.util.Iterator;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles.SourceFolder;

View File

@ -34,9 +34,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.RestartClassLoader;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.util.FileCopyUtils;
import org.springframework.util.StreamUtils;

View File

@ -23,7 +23,6 @@ import java.util.Collections;
import java.util.List;
import org.junit.Test;
import org.springframework.boot.devtools.restart.server.DefaultSourceFolderUrlFilter;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -19,8 +19,6 @@ package org.springframework.boot.devtools.restart.server;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.restart.server.HttpRestartServer;
import org.springframework.boot.devtools.restart.server.HttpRestartServerHandler;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;

View File

@ -29,11 +29,8 @@ import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.server.HttpRestartServer;
import org.springframework.boot.devtools.restart.server.RestartServer;
import org.springframework.boot.devtools.restart.server.SourceFolderUrlFilter;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.http.server.ServletServerHttpResponse;
import org.springframework.mock.web.MockHttpServletRequest;

View File

@ -29,11 +29,8 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFile.Kind;
import org.springframework.boot.devtools.restart.server.DefaultSourceFolderUrlFilter;
import org.springframework.boot.devtools.restart.server.RestartServer;
import org.springframework.boot.devtools.restart.server.SourceFolderUrlFilter;
import org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles;
import org.springframework.util.FileCopyUtils;
import static org.hamcrest.Matchers.equalTo;

View File

@ -31,7 +31,6 @@ import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.devtools.test.MockClientHttpRequestFactory;
import org.springframework.boot.devtools.tunnel.client.HttpTunnelConnection;
import org.springframework.boot.devtools.tunnel.client.HttpTunnelConnection.TunnelChannel;
import org.springframework.http.HttpStatus;
import org.springframework.util.SocketUtils;

View File

@ -28,9 +28,6 @@ import java.nio.channels.WritableByteChannel;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.tunnel.client.TunnelClient;
import org.springframework.boot.devtools.tunnel.client.TunnelClientListener;
import org.springframework.boot.devtools.tunnel.client.TunnelConnection;
import org.springframework.util.SocketUtils;
import static org.hamcrest.Matchers.equalTo;

View File

@ -24,8 +24,6 @@ import java.nio.channels.WritableByteChannel;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.tunnel.payload.HttpTunnelPayload;
import org.springframework.boot.devtools.tunnel.payload.HttpTunnelPayloadForwarder;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -28,7 +28,6 @@ import java.nio.channels.WritableByteChannel;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.tunnel.payload.HttpTunnelPayload;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.server.ServletServerHttpRequest;

View File

@ -19,8 +19,6 @@ package org.springframework.boot.devtools.tunnel.server;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.tunnel.server.HttpTunnelServer;
import org.springframework.boot.devtools.tunnel.server.HttpTunnelServerHandler;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;

View File

@ -36,8 +36,6 @@ import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.springframework.boot.devtools.tunnel.payload.HttpTunnelPayload;
import org.springframework.boot.devtools.tunnel.server.HttpTunnelServer;
import org.springframework.boot.devtools.tunnel.server.TargetServerConnection;
import org.springframework.boot.devtools.tunnel.server.HttpTunnelServer.HttpConnection;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.ServerHttpAsyncRequestControl;

View File

@ -26,8 +26,6 @@ import java.nio.channels.SocketChannel;
import org.junit.Before;
import org.junit.Test;
import org.springframework.boot.devtools.tunnel.server.SocketTargetServerConnection;
import org.springframework.boot.devtools.tunnel.server.StaticPortProvider;
import org.springframework.util.SocketUtils;
import static org.hamcrest.Matchers.equalTo;

View File

@ -19,7 +19,6 @@ package org.springframework.boot.devtools.tunnel.server;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.devtools.tunnel.server.StaticPortProvider;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -24,7 +24,6 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import sample.actuator.noweb.SampleActuatorNoWebApplication;
import static org.junit.Assert.assertNotNull;
/**

View File

@ -41,7 +41,6 @@ import org.springframework.web.socket.client.WebSocketConnectionManager;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.handler.TextWebSocketHandler;
import sample.atmosphere.SampleAtmosphereApplication;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

View File

@ -24,9 +24,6 @@ import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import sample.cache.Country;
import sample.cache.CountryRepository;
import sample.cache.SampleCacheApplication;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

View File

@ -28,7 +28,6 @@ import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import sample.data.rest.SampleDataRestApplication;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;

View File

@ -28,7 +28,6 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import sample.hateoas.SampleHateoasApplication;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.startsWith;

View File

@ -29,7 +29,6 @@ import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import sample.hypermedia.gson.SampleHypermediaGsonApplication;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

View File

@ -19,9 +19,6 @@ import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.web.context.WebApplicationContext;
import sample.secure.oauth2.SampleSecureOAuth2Application;
import sample.secure.oauth2.Flight;
import com.fasterxml.jackson.databind.ObjectMapper;
import static org.hamcrest.CoreMatchers.is;

View File

@ -28,7 +28,6 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import sample.tomcat.jsp.SampleTomcatJspApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -42,7 +42,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.client.RestTemplate;
import sample.tomcat.multiconnector.SampleTomcatTwoConnectorsApplication;
import static org.junit.Assert.assertEquals;
/**

View File

@ -28,7 +28,6 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import sample.tomcat7.jsp.SampleTomcat7JspApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -32,7 +32,6 @@ import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import sample.groovytemplates.SampleGroovyTemplateApplication;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;

View File

@ -32,7 +32,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import sample.groovytemplates.SampleGroovyTemplateApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

View File

@ -38,7 +38,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import sample.security.method.SampleMethodSecurityApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -39,6 +39,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import sample.web.secure.custom.SampleWebSecureCustomApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

View File

@ -30,7 +30,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.context.WebApplicationContext;
import sample.web.secure.github.SampleGithubSecureApplication;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirectedUrlPattern;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

View File

@ -38,7 +38,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import sample.web.secure.jdbc.SampleWebSecureCustomApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

View File

@ -38,7 +38,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import sample.web.secure.SampleWebSecureApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

View File

@ -30,6 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import sample.web.staticcontent.SampleWebStaticApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -32,6 +32,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import sample.web.ui.SampleWebUiApplication;
import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;

View File

@ -33,6 +33,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import sample.web.ui.SampleWebUiApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

View File

@ -34,7 +34,6 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import sample.web.velocity.SampleWebVelocityApplication;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -39,10 +39,10 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.socket.client.WebSocketConnectionManager;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import samples.websocket.jetty.SampleJettyWebSocketsApplication;
import samples.websocket.jetty.client.GreetingService;
import samples.websocket.jetty.client.SimpleClientWebSocketHandler;
import samples.websocket.jetty.client.SimpleGreetingService;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@ -47,6 +47,7 @@ import samples.websocket.jetty.client.GreetingService;
import samples.websocket.jetty.client.SimpleClientWebSocketHandler;
import samples.websocket.jetty.client.SimpleGreetingService;
import samples.websocket.jetty.echo.CustomContainerWebSocketsApplicationTests.CustomContainerConfiguration;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@ -20,8 +20,6 @@ import java.io.IOException;
import org.junit.Test;
import samples.websocket.jetty.snake.Snake;
import samples.websocket.jetty.snake.SnakeTimer;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.BDDMockito.willThrow;

View File

@ -39,10 +39,10 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.socket.client.WebSocketConnectionManager;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import samples.websocket.tomcat.SampleTomcatWebSocketApplication;
import samples.websocket.tomcat.client.GreetingService;
import samples.websocket.tomcat.client.SimpleClientWebSocketHandler;
import samples.websocket.tomcat.client.SimpleGreetingService;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@ -47,6 +47,7 @@ import samples.websocket.tomcat.client.GreetingService;
import samples.websocket.tomcat.client.SimpleClientWebSocketHandler;
import samples.websocket.tomcat.client.SimpleGreetingService;
import samples.websocket.tomcat.echo.CustomContainerWebSocketsApplicationTests.CustomContainerConfiguration;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@ -20,8 +20,6 @@ import java.io.IOException;
import org.junit.Test;
import samples.websocket.tomcat.snake.Snake;
import samples.websocket.tomcat.snake.SnakeTimer;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.BDDMockito.willThrow;

View File

@ -39,10 +39,10 @@ import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.socket.client.WebSocketConnectionManager;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import samples.websocket.undertow.SampleUndertowWebSocketsApplication;
import samples.websocket.undertow.client.GreetingService;
import samples.websocket.undertow.client.SimpleClientWebSocketHandler;
import samples.websocket.undertow.client.SimpleGreetingService;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@ -47,6 +47,7 @@ import samples.websocket.undertow.client.GreetingService;
import samples.websocket.undertow.client.SimpleClientWebSocketHandler;
import samples.websocket.undertow.client.SimpleGreetingService;
import samples.websocket.undertow.echo.CustomContainerWebSocketsApplicationTests.CustomContainerConfiguration;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@ -20,8 +20,6 @@ import java.io.IOException;
import org.junit.Test;
import samples.websocket.undertow.snake.Snake;
import samples.websocket.undertow.snake.SnakeTimer;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.BDDMockito.willThrow;

View File

@ -19,12 +19,6 @@ package org.springframework.boot.dependency.tools;
import java.util.Collections;
import java.util.Iterator;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
/**
* Tests for {@link ManagedDependenciesDelegate}.
*

View File

@ -16,9 +16,6 @@
package org.springframework.boot.context.embedded.undertow;
import io.undertow.servlet.UndertowServletLogger;
import io.undertow.servlet.api.SessionPersistenceManager;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@ -30,6 +27,9 @@ import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;
import io.undertow.servlet.UndertowServletLogger;
import io.undertow.servlet.api.SessionPersistenceManager;
/**
* {@link SessionPersistenceManager} that stores session information in a file.
*

View File

@ -16,20 +16,6 @@
package org.springframework.boot.context.embedded.undertow;
import io.undertow.Handlers;
import io.undertow.Undertow;
import io.undertow.Undertow.Builder;
import io.undertow.attribute.RequestHeaderAttribute;
import io.undertow.predicate.Predicate;
import io.undertow.predicate.Predicates;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.handlers.encoding.ContentEncodingRepository;
import io.undertow.server.handlers.encoding.EncodingHandler;
import io.undertow.server.handlers.encoding.GzipEncodingProvider;
import io.undertow.servlet.api.DeploymentManager;
import io.undertow.util.HttpString;
import java.lang.reflect.Field;
import java.net.ServerSocket;
import java.util.ArrayList;
@ -48,6 +34,20 @@ import org.springframework.util.MimeTypeUtils;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
import io.undertow.Handlers;
import io.undertow.Undertow;
import io.undertow.Undertow.Builder;
import io.undertow.attribute.RequestHeaderAttribute;
import io.undertow.predicate.Predicate;
import io.undertow.predicate.Predicates;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.handlers.encoding.ContentEncodingRepository;
import io.undertow.server.handlers.encoding.EncodingHandler;
import io.undertow.server.handlers.encoding.GzipEncodingProvider;
import io.undertow.servlet.api.DeploymentManager;
import io.undertow.util.HttpString;
/**
* {@link EmbeddedServletContainer} that can be used to control an embedded Undertow
* server. Typically this class should be created using

View File

@ -16,30 +16,6 @@
package org.springframework.boot.context.embedded.undertow;
import io.undertow.Undertow;
import io.undertow.Undertow.Builder;
import io.undertow.UndertowMessages;
import io.undertow.server.HandlerWrapper;
import io.undertow.server.HttpHandler;
import io.undertow.server.handlers.accesslog.AccessLogHandler;
import io.undertow.server.handlers.accesslog.AccessLogReceiver;
import io.undertow.server.handlers.accesslog.DefaultAccessLogReceiver;
import io.undertow.server.handlers.resource.ClassPathResourceManager;
import io.undertow.server.handlers.resource.FileResourceManager;
import io.undertow.server.handlers.resource.Resource;
import io.undertow.server.handlers.resource.ResourceChangeListener;
import io.undertow.server.handlers.resource.ResourceManager;
import io.undertow.server.handlers.resource.URLResource;
import io.undertow.server.session.SessionManager;
import io.undertow.servlet.Servlets;
import io.undertow.servlet.api.DeploymentInfo;
import io.undertow.servlet.api.DeploymentManager;
import io.undertow.servlet.api.MimeMapping;
import io.undertow.servlet.api.ServletContainerInitializerInfo;
import io.undertow.servlet.api.ServletStackTraces;
import io.undertow.servlet.handlers.DefaultServlet;
import io.undertow.servlet.util.ImmediateInstanceFactory;
import java.io.File;
import java.io.IOException;
import java.net.URL;
@ -81,6 +57,30 @@ import org.xnio.SslClientAuthMode;
import org.xnio.Xnio;
import org.xnio.XnioWorker;
import io.undertow.Undertow;
import io.undertow.Undertow.Builder;
import io.undertow.UndertowMessages;
import io.undertow.server.HandlerWrapper;
import io.undertow.server.HttpHandler;
import io.undertow.server.handlers.accesslog.AccessLogHandler;
import io.undertow.server.handlers.accesslog.AccessLogReceiver;
import io.undertow.server.handlers.accesslog.DefaultAccessLogReceiver;
import io.undertow.server.handlers.resource.ClassPathResourceManager;
import io.undertow.server.handlers.resource.FileResourceManager;
import io.undertow.server.handlers.resource.Resource;
import io.undertow.server.handlers.resource.ResourceChangeListener;
import io.undertow.server.handlers.resource.ResourceManager;
import io.undertow.server.handlers.resource.URLResource;
import io.undertow.server.session.SessionManager;
import io.undertow.servlet.Servlets;
import io.undertow.servlet.api.DeploymentInfo;
import io.undertow.servlet.api.DeploymentManager;
import io.undertow.servlet.api.MimeMapping;
import io.undertow.servlet.api.ServletContainerInitializerInfo;
import io.undertow.servlet.api.ServletStackTraces;
import io.undertow.servlet.handlers.DefaultServlet;
import io.undertow.servlet.util.ImmediateInstanceFactory;
/**
* {@link EmbeddedServletContainerFactory} that can be used to create
* {@link UndertowEmbeddedServletContainer}s.

View File

@ -16,8 +16,6 @@
package org.springframework.boot.context.embedded.undertow;
import io.undertow.servlet.api.SessionPersistenceManager.PersistentSession;
import java.io.File;
import java.io.IOException;
import java.util.Date;
@ -29,6 +27,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import io.undertow.servlet.api.SessionPersistenceManager.PersistentSession;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;

View File

@ -17,7 +17,6 @@
package org.springframework.boot.test;
import org.junit.Test;
import org.springframework.boot.test.Base64Encoder;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;