Organize imports with new settings
See gh-4234
This commit is contained in:
@@ -19,6 +19,7 @@ package sample.activemq;
|
||||
import javax.jms.Queue;
|
||||
|
||||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -21,6 +21,7 @@ import javax.jms.JMSException;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
package sample.ant;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.cache;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.cache.CacheManager;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.cache;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.cache.Cache;
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package sample.data.cassandra;
|
||||
|
||||
import com.datastax.driver.core.utils.UUIDs;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
import com.datastax.driver.core.utils.UUIDs;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SampleCassandraApplication implements CommandLineRunner {
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package sample.data.cassandra;
|
||||
|
||||
import org.cassandraunit.spring.CassandraUnitDependencyInjectionTestExecutionListener;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
public class OrderedCassandraTestExecutionListener
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.cassandraunit.spring.EmbeddedCassandra;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.IntegrationTestPropertiesListener;
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
|
||||
@@ -19,6 +19,7 @@ package sample.data.mongo;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
package sample.data.rest.service;
|
||||
|
||||
import sample.data.rest.domain.City;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
||||
|
||||
import sample.data.rest.domain.City;
|
||||
|
||||
@RepositoryRestResource(collectionResourceRel = "citys", path = "cities")
|
||||
interface CityRepository extends PagingAndSortingRepository<City, Long> {
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
package sample.data.rest.service;
|
||||
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
||||
|
||||
import sample.data.rest.domain.City;
|
||||
import sample.data.rest.domain.Hotel;
|
||||
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
||||
|
||||
@RepositoryRestResource(collectionResourceRel = "hotels", path = "hotels")
|
||||
interface HotelRepository extends PagingAndSortingRepository<Hotel, Long> {
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ package sample.data.rest.service;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import sample.data.rest.SampleDataRestApplication;
|
||||
import sample.data.rest.domain.City;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import sample.data.rest.SampleDataRestApplication;
|
||||
import sample.data.rest.domain.City;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
package sample.hateoas.web;
|
||||
|
||||
import sample.hateoas.domain.Customer;
|
||||
import sample.hateoas.domain.CustomerRepository;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.hateoas.EntityLinks;
|
||||
import org.springframework.hateoas.ExposesResourceFor;
|
||||
@@ -29,9 +32,6 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import sample.hateoas.domain.Customer;
|
||||
import sample.hateoas.domain.CustomerRepository;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/customers")
|
||||
@ExposesResourceFor(Customer.class)
|
||||
|
||||
@@ -19,6 +19,7 @@ package sample.hypermedia.gson;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
@@ -19,6 +19,7 @@ package sample.hypermedia.jpa;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.hypermedia.jpa;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package sample.jetty.ssl.web;
|
||||
|
||||
import sample.jetty.ssl.service.HelloWorldService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import sample.jetty.ssl.service.HelloWorldService;
|
||||
|
||||
@Controller
|
||||
public class SampleController {
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package sample.jetty8.ssl.web;
|
||||
|
||||
import sample.jetty8.ssl.service.HelloWorldService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import sample.jetty8.ssl.service.HelloWorldService;
|
||||
|
||||
@Controller
|
||||
public class SampleController {
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package sample.jetty8.web;
|
||||
|
||||
import sample.jetty8.service.HelloWorldService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import sample.jetty8.service.HelloWorldService;
|
||||
|
||||
@Controller
|
||||
public class SampleController {
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package sample.jetty93.web;
|
||||
|
||||
import sample.jetty93.service.HelloWorldService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import sample.jetty93.service.HelloWorldService;
|
||||
|
||||
@Controller
|
||||
public class SampleController {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.zip.GZIPInputStream;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -8,7 +8,6 @@ import javax.annotation.Generated;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.AbstractKeys;
|
||||
|
||||
import sample.jooq.domain.tables.Author;
|
||||
import sample.jooq.domain.tables.Book;
|
||||
import sample.jooq.domain.tables.BookStore;
|
||||
|
||||
@@ -11,7 +11,6 @@ import javax.annotation.Generated;
|
||||
|
||||
import org.jooq.Table;
|
||||
import org.jooq.impl.SchemaImpl;
|
||||
|
||||
import sample.jooq.domain.tables.Author;
|
||||
import sample.jooq.domain.tables.Book;
|
||||
import sample.jooq.domain.tables.BookStore;
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import sample.jooq.domain.Keys;
|
||||
import sample.jooq.domain.Public;
|
||||
import sample.jooq.domain.tables.records.AuthorRecord;
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import sample.jooq.domain.Keys;
|
||||
import sample.jooq.domain.Public;
|
||||
import sample.jooq.domain.tables.records.BookRecord;
|
||||
|
||||
@@ -13,7 +13,6 @@ import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import sample.jooq.domain.Keys;
|
||||
import sample.jooq.domain.Public;
|
||||
import sample.jooq.domain.tables.records.BookStoreRecord;
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import sample.jooq.domain.Keys;
|
||||
import sample.jooq.domain.Public;
|
||||
import sample.jooq.domain.tables.records.BookToBookStoreRecord;
|
||||
|
||||
@@ -13,7 +13,6 @@ import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
import sample.jooq.domain.Keys;
|
||||
import sample.jooq.domain.Public;
|
||||
import sample.jooq.domain.tables.records.LanguageRecord;
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record6;
|
||||
import org.jooq.Row6;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import sample.jooq.domain.tables.Author;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record5;
|
||||
import org.jooq.Row5;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import sample.jooq.domain.tables.Book;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.Row1;
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
import sample.jooq.domain.tables.BookStore;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.jooq.Record2;
|
||||
import org.jooq.Record3;
|
||||
import org.jooq.Row3;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import sample.jooq.domain.tables.BookToBookStore;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.jooq.Record1;
|
||||
import org.jooq.Record3;
|
||||
import org.jooq.Row3;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
|
||||
import sample.jooq.domain.tables.Language;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.jooq.DSLContext;
|
||||
import org.jooq.Query;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Result;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.jooq;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
||||
@@ -20,6 +20,7 @@ import javax.annotation.PostConstruct;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.logback;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.test.OutputCapture;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.metrics.GaugeService;
|
||||
import org.springframework.context.annotation.Description;
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
package sample.metrics.dropwizard;
|
||||
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.metrics.GaugeService;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
@@ -26,8 +28,6 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Description;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.metrics.opentsdb;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Description;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.metrics.redis;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.junit.After;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
import org.springframework.boot.test.EnvironmentTestUtils;
|
||||
|
||||
@@ -2,10 +2,12 @@ package sample.secure.oauth2;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
@@ -19,8 +21,6 @@ import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.MvcResult;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
|
||||
@@ -19,6 +19,7 @@ package sample.secure.sso;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
|
||||
@@ -19,6 +19,7 @@ package sample.session.redis;
|
||||
import java.net.URI;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.web.ServerPortInfoApplicationContextInitializer;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.ssl.SSLContextBuilder;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import sample.tomcat.ssl.SampleTomcatSslApplication;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
@@ -35,8 +36,6 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import sample.tomcat.ssl.SampleTomcatSslApplication;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package sample.undertow.ssl.web;
|
||||
|
||||
import sample.undertow.ssl.service.HelloWorldService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import sample.undertow.ssl.service.HelloWorldService;
|
||||
|
||||
@Controller
|
||||
public class SampleController {
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import sample.groovytemplates.Message;
|
||||
import sample.groovytemplates.MessageRepository;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
@@ -32,9 +35,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import sample.groovytemplates.Message;
|
||||
import sample.groovytemplates.MessageRepository;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/")
|
||||
public class MessageController {
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import sample.web.secure.custom.SampleWebSecureCustomApplication;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
@@ -39,8 +40,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
|
||||
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;
|
||||
|
||||
@@ -19,6 +19,7 @@ package sample.web.secure.github;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
|
||||
@@ -18,6 +18,7 @@ package sample.webstatic;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import sample.web.staticcontent.SampleWebStaticApplication;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
@@ -30,8 +31,6 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
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;
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ package sample.web.ui.mvc;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import sample.web.ui.Message;
|
||||
import sample.web.ui.MessageRepository;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
@@ -25,9 +28,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import sample.web.ui.Message;
|
||||
import sample.web.ui.MessageRepository;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.hamcrest.TypeSafeMatcher;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import sample.web.ui.SampleWebUiApplication;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
@@ -32,8 +33,6 @@ import org.springframework.test.web.servlet.MockMvc;
|
||||
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;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.net.URI;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import sample.web.ui.SampleWebUiApplication;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
@@ -33,8 +34,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
|
||||
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;
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
|
||||
package samples.websocket.jetty;
|
||||
|
||||
import samples.websocket.jetty.client.GreetingService;
|
||||
import samples.websocket.jetty.client.SimpleGreetingService;
|
||||
import samples.websocket.jetty.echo.DefaultEchoService;
|
||||
import samples.websocket.jetty.echo.EchoService;
|
||||
import samples.websocket.jetty.echo.EchoWebSocketHandler;
|
||||
import samples.websocket.jetty.reverse.ReverseWebSocketEndpoint;
|
||||
import samples.websocket.jetty.snake.SnakeWebSocketHandler;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
@@ -29,14 +37,6 @@ import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry
|
||||
import org.springframework.web.socket.handler.PerConnectionWebSocketHandler;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
import samples.websocket.jetty.client.GreetingService;
|
||||
import samples.websocket.jetty.client.SimpleGreetingService;
|
||||
import samples.websocket.jetty.echo.DefaultEchoService;
|
||||
import samples.websocket.jetty.echo.EchoService;
|
||||
import samples.websocket.jetty.echo.EchoWebSocketHandler;
|
||||
import samples.websocket.jetty.reverse.ReverseWebSocketEndpoint;
|
||||
import samples.websocket.jetty.snake.SnakeWebSocketHandler;
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@EnableWebSocket
|
||||
|
||||
@@ -24,6 +24,10 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import samples.websocket.jetty.client.GreetingService;
|
||||
import samples.websocket.jetty.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.jetty.client.SimpleGreetingService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@@ -39,10 +43,6 @@ 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.client.GreetingService;
|
||||
import samples.websocket.jetty.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.jetty.client.SimpleGreetingService;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
@@ -24,6 +24,12 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import samples.websocket.jetty.SampleJettyWebSocketsApplication;
|
||||
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 org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@@ -42,12 +48,6 @@ import org.springframework.util.SocketUtils;
|
||||
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 samples.websocket.jetty.echo.CustomContainerWebSocketsApplicationTests.CustomContainerConfiguration;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
|
||||
package samples.websocket.tomcat;
|
||||
|
||||
import samples.websocket.tomcat.client.GreetingService;
|
||||
import samples.websocket.tomcat.client.SimpleGreetingService;
|
||||
import samples.websocket.tomcat.echo.DefaultEchoService;
|
||||
import samples.websocket.tomcat.echo.EchoService;
|
||||
import samples.websocket.tomcat.echo.EchoWebSocketHandler;
|
||||
import samples.websocket.tomcat.reverse.ReverseWebSocketEndpoint;
|
||||
import samples.websocket.tomcat.snake.SnakeWebSocketHandler;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
@@ -29,14 +37,6 @@ import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry
|
||||
import org.springframework.web.socket.handler.PerConnectionWebSocketHandler;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
import samples.websocket.tomcat.client.GreetingService;
|
||||
import samples.websocket.tomcat.client.SimpleGreetingService;
|
||||
import samples.websocket.tomcat.echo.DefaultEchoService;
|
||||
import samples.websocket.tomcat.echo.EchoService;
|
||||
import samples.websocket.tomcat.echo.EchoWebSocketHandler;
|
||||
import samples.websocket.tomcat.reverse.ReverseWebSocketEndpoint;
|
||||
import samples.websocket.tomcat.snake.SnakeWebSocketHandler;
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@EnableWebSocket
|
||||
|
||||
@@ -24,6 +24,10 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import samples.websocket.tomcat.client.GreetingService;
|
||||
import samples.websocket.tomcat.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.tomcat.client.SimpleGreetingService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@@ -39,10 +43,6 @@ 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.client.GreetingService;
|
||||
import samples.websocket.tomcat.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.tomcat.client.SimpleGreetingService;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
@@ -24,6 +24,12 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import samples.websocket.tomcat.SampleTomcatWebSocketApplication;
|
||||
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 org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@@ -42,12 +48,6 @@ import org.springframework.util.SocketUtils;
|
||||
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 samples.websocket.tomcat.echo.CustomContainerWebSocketsApplicationTests.CustomContainerConfiguration;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
|
||||
package samples.websocket.undertow;
|
||||
|
||||
import samples.websocket.undertow.client.GreetingService;
|
||||
import samples.websocket.undertow.client.SimpleGreetingService;
|
||||
import samples.websocket.undertow.echo.DefaultEchoService;
|
||||
import samples.websocket.undertow.echo.EchoService;
|
||||
import samples.websocket.undertow.echo.EchoWebSocketHandler;
|
||||
import samples.websocket.undertow.reverse.ReverseWebSocketEndpoint;
|
||||
import samples.websocket.undertow.snake.SnakeWebSocketHandler;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
@@ -29,14 +37,6 @@ import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry
|
||||
import org.springframework.web.socket.handler.PerConnectionWebSocketHandler;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
import samples.websocket.undertow.client.GreetingService;
|
||||
import samples.websocket.undertow.client.SimpleGreetingService;
|
||||
import samples.websocket.undertow.echo.DefaultEchoService;
|
||||
import samples.websocket.undertow.echo.EchoService;
|
||||
import samples.websocket.undertow.echo.EchoWebSocketHandler;
|
||||
import samples.websocket.undertow.reverse.ReverseWebSocketEndpoint;
|
||||
import samples.websocket.undertow.snake.SnakeWebSocketHandler;
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@EnableWebSocket
|
||||
|
||||
@@ -24,6 +24,10 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import samples.websocket.undertow.client.GreetingService;
|
||||
import samples.websocket.undertow.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.undertow.client.SimpleGreetingService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@@ -39,10 +43,6 @@ 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.client.GreetingService;
|
||||
import samples.websocket.undertow.client.SimpleClientWebSocketHandler;
|
||||
import samples.websocket.undertow.client.SimpleGreetingService;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
@@ -24,6 +24,12 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import samples.websocket.undertow.SampleUndertowWebSocketsApplication;
|
||||
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 org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@@ -42,12 +48,6 @@ import org.springframework.util.SocketUtils;
|
||||
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 samples.websocket.undertow.echo.CustomContainerWebSocketsApplicationTests.CustomContainerConfiguration;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
|
||||
Reference in New Issue
Block a user