Polish formatting
This commit is contained in:
@@ -30,9 +30,9 @@ import org.springframework.context.annotation.Configuration;
|
||||
* standard {@code @Configuration} annotation so that configuration can be found
|
||||
* automatically (for example in tests).
|
||||
* <p>
|
||||
* Application should only ever include <em>one</em>
|
||||
* {@code @SpringBootConfiguration} and most idiomatic Spring Boot applications
|
||||
* will inherit it from {@code @SpringBootApplication}.
|
||||
* Application should only ever include <em>one</em> {@code @SpringBootConfiguration} and
|
||||
* most idiomatic Spring Boot applications will inherit it from
|
||||
* {@code @SpringBootApplication}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.4.0
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.core.env.PropertySources;
|
||||
* Convenience class for manipulating PropertySources.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
* @see PropertySource
|
||||
* @see PropertySources
|
||||
*/
|
||||
|
||||
@@ -224,6 +224,7 @@ public final class RelaxedNames implements Iterable<String> {
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -92,4 +92,5 @@ public class YamlJavaBeanPropertyConstructor extends Constructor {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,4 +77,5 @@ public class Compression {
|
||||
public void setExcludedUserAgents(String[] excludedUserAgents) {
|
||||
this.excludedUserAgents = excludedUserAgents;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -702,6 +702,7 @@ public class JettyEmbeddedServletContainerFactory
|
||||
serverConnector.setPort(port);
|
||||
return serverConnector;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,6 +96,7 @@ public class ServletContextInitializerConfiguration extends AbstractConfiguratio
|
||||
// Not available on Jetty 8
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ abstract class TomcatResources {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -482,4 +482,5 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ public class PoolingConnectionFactoryBean extends PoolingConnectionFactory
|
||||
/**
|
||||
* A {@link XAConnectionFactory} implementation that delegates to the
|
||||
* {@link ThreadLocal} {@link PoolingConnectionFactoryBean}.
|
||||
*
|
||||
* @see PoolingConnectionFactoryBean#setConnectionFactory(XAConnectionFactory)
|
||||
*/
|
||||
public static class DirectXAConnectionFactory implements XAConnectionFactory {
|
||||
|
||||
@@ -120,4 +120,5 @@ public class LogFile {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -85,7 +85,6 @@ public final class ColorConverter extends LogEventPatternConverter {
|
||||
|
||||
/**
|
||||
* Creates a new instance of the class. Required by Log4J2.
|
||||
*
|
||||
* @param config the configuration
|
||||
* @param options the options
|
||||
* @return a new instance, or {@code null} if the options are invalid
|
||||
|
||||
@@ -117,6 +117,7 @@ public class LevelRemappingAppender extends AppenderBase<ILoggingEvent> {
|
||||
this.logger.callAppenders(event);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.core.env.Environment;
|
||||
class SpringPropertyAction extends Action {
|
||||
|
||||
private static final String SOURCE_ATTRIBUTE = "source";
|
||||
|
||||
private static final String DEFAULT_VALUE_ATTRIBUTE = "defaultValue";
|
||||
|
||||
private final Environment environment;
|
||||
|
||||
@@ -463,7 +463,6 @@ public class RestTemplateBuilder {
|
||||
/**
|
||||
* Sets the connect timeout in milliseconds on the underlying
|
||||
* {@link ClientHttpRequestFactory}.
|
||||
*
|
||||
* @param connectTimeout the connect timeout in milliseconds
|
||||
* @return a new builder instance.
|
||||
*/
|
||||
@@ -479,7 +478,6 @@ public class RestTemplateBuilder {
|
||||
/**
|
||||
* Sets the read timeout in milliseconds on the underlying
|
||||
* {@link ClientHttpRequestFactory}.
|
||||
*
|
||||
* @param readTimeout the read timeout in milliseconds
|
||||
* @return a new builder instance.
|
||||
*/
|
||||
|
||||
@@ -107,7 +107,9 @@ public class SpringProfileDocumentMatcher implements DocumentMatcher {
|
||||
* Profile match types.
|
||||
*/
|
||||
enum ProfileType {
|
||||
|
||||
POSITIVE, NEGATIVE
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link ApplicationPid}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class ApplicationPidTests {
|
||||
|
||||
@@ -87,8 +87,10 @@ public class OverrideSourcesTests {
|
||||
}
|
||||
|
||||
protected static class Service {
|
||||
|
||||
@Autowired
|
||||
private TestBean bean;
|
||||
|
||||
}
|
||||
|
||||
protected static class TestBean {
|
||||
@@ -100,4 +102,5 @@ public class OverrideSourcesTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -177,4 +177,5 @@ public class ReproTests {
|
||||
public static class Config {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -293,10 +293,12 @@ public class SpringApplicationTests {
|
||||
final AtomicReference<SpringApplication> reference = new AtomicReference<SpringApplication>();
|
||||
class ApplicationReadyEventListener
|
||||
implements ApplicationListener<ApplicationReadyEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationReadyEvent event) {
|
||||
reference.set(event.getSpringApplication());
|
||||
}
|
||||
|
||||
}
|
||||
application.addListeners(new ApplicationReadyEventListener());
|
||||
this.context = application.run("--foo=bar");
|
||||
@@ -309,10 +311,12 @@ public class SpringApplicationTests {
|
||||
application.setWebEnvironment(false);
|
||||
final AtomicReference<ApplicationContext> reference = new AtomicReference<ApplicationContext>();
|
||||
class InitializerListener implements ApplicationListener<ContextRefreshedEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
reference.set(event.getApplicationContext());
|
||||
}
|
||||
|
||||
}
|
||||
application.setListeners(Arrays.asList(new InitializerListener()));
|
||||
this.context = application.run("--foo=bar");
|
||||
@@ -328,10 +332,12 @@ public class SpringApplicationTests {
|
||||
final List<ApplicationEvent> events = new ArrayList<ApplicationEvent>();
|
||||
class ApplicationRunningEventListener
|
||||
implements ApplicationListener<ApplicationEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationEvent event) {
|
||||
events.add((event));
|
||||
}
|
||||
|
||||
}
|
||||
application.addListeners(new ApplicationRunningEventListener());
|
||||
this.context = application.run();
|
||||
@@ -1064,6 +1070,7 @@ public class SpringApplicationTests {
|
||||
public void fail() {
|
||||
throw new RefreshFailureException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class ExitStatusException extends RuntimeException
|
||||
|
||||
@@ -233,6 +233,7 @@ public class BindingPreparationTests {
|
||||
}
|
||||
|
||||
public static class TargetWithNestedMap {
|
||||
|
||||
private Map<String, Object> nested;
|
||||
|
||||
public Map<String, Object> getNested() {
|
||||
@@ -242,9 +243,11 @@ public class BindingPreparationTests {
|
||||
public void setNested(Map<String, Object> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TargetWithNestedMapOfListOfString {
|
||||
|
||||
private Map<String, List<String>> nested;
|
||||
|
||||
public Map<String, List<String>> getNested() {
|
||||
@@ -254,9 +257,11 @@ public class BindingPreparationTests {
|
||||
public void setNested(Map<String, List<String>> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TargetWithNestedListOfMaps {
|
||||
|
||||
private List<Map<String, String>> nested;
|
||||
|
||||
public List<Map<String, String>> getNested() {
|
||||
@@ -266,9 +271,11 @@ public class BindingPreparationTests {
|
||||
public void setNested(List<Map<String, String>> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TargetWithNestedListOfLists {
|
||||
|
||||
private List<List<String>> nested;
|
||||
|
||||
public List<List<String>> getNested() {
|
||||
@@ -278,9 +285,11 @@ public class BindingPreparationTests {
|
||||
public void setNested(List<List<String>> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TargetWithNestedListOfBeansWithList {
|
||||
|
||||
private List<TargetWithList> nested;
|
||||
|
||||
public List<TargetWithList> getNested() {
|
||||
@@ -290,9 +299,11 @@ public class BindingPreparationTests {
|
||||
public void setNested(List<TargetWithList> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TargetWithList {
|
||||
|
||||
private List<VanillaTarget> list;
|
||||
|
||||
public List<VanillaTarget> getList() {
|
||||
@@ -306,6 +317,7 @@ public class BindingPreparationTests {
|
||||
}
|
||||
|
||||
public static class TargetWithNestedMapOfBean {
|
||||
|
||||
private Map<String, VanillaTarget> nested;
|
||||
|
||||
public Map<String, VanillaTarget> getNested() {
|
||||
@@ -315,6 +327,7 @@ public class BindingPreparationTests {
|
||||
public void setNested(Map<String, VanillaTarget> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class VanillaTarget {
|
||||
|
||||
@@ -113,6 +113,7 @@ public class PropertiesConfigurationFactoryMapTests {
|
||||
|
||||
// Foo needs to be public and to have setters for all properties
|
||||
public static class Foo {
|
||||
|
||||
private Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
public Map<String, Object> getMap() {
|
||||
@@ -122,6 +123,7 @@ public class PropertiesConfigurationFactoryMapTests {
|
||||
public void setMap(Map<String, Object> map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -228,6 +228,7 @@ public class PropertiesConfigurationFactoryTests {
|
||||
|
||||
// Foo needs to be public and to have setters for all properties
|
||||
public static class Foo {
|
||||
|
||||
@NotNull
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -96,10 +96,12 @@ public class PropertySourcesBindingTests {
|
||||
@PropertySources({ @PropertySource("classpath:/override.properties"),
|
||||
@PropertySource("classpath:/some.properties") })
|
||||
public static class SomeConfig {
|
||||
|
||||
}
|
||||
|
||||
@ConfigurationProperties
|
||||
public static class Wrapper {
|
||||
|
||||
private String foo;
|
||||
|
||||
private String bar;
|
||||
@@ -139,6 +141,7 @@ public class PropertySourcesBindingTests {
|
||||
public void setTheName(String theName) {
|
||||
this.theName = theName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -852,6 +852,7 @@ public class RelaxedDataBinderTests {
|
||||
public void setNested(Map<Bingo, Object> nested) {
|
||||
this.nested = nested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class TargetWithNestedMapOfListOfString {
|
||||
@@ -1101,7 +1102,9 @@ public class RelaxedDataBinderTests {
|
||||
}
|
||||
|
||||
enum Bingo {
|
||||
|
||||
THIS, or, THAT, THE_OTHER, THAT_OTHER
|
||||
|
||||
}
|
||||
|
||||
public static class ValidatedTarget {
|
||||
|
||||
@@ -100,13 +100,18 @@ public class YamlConfigurationFactoryTests {
|
||||
}
|
||||
|
||||
private static class Foo {
|
||||
|
||||
@NotNull
|
||||
public String name;
|
||||
|
||||
public String bar;
|
||||
|
||||
}
|
||||
|
||||
private static class Jee {
|
||||
|
||||
public Map<Object, Object> mymap;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -358,5 +358,7 @@ public class SpringApplicationBuilderTests {
|
||||
public ApplicationContext getParent() {
|
||||
return this.applicationContext.getParent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,4 +132,5 @@ public class CloudFoundryVcapEnvironmentPostProcessorTests {
|
||||
private String getProperty(String key) {
|
||||
return this.context.getEnvironment().getProperty(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ import org.springframework.test.context.support.TestPropertySourceUtils;
|
||||
public class FileEncodingApplicationListenerTests {
|
||||
|
||||
private final FileEncodingApplicationListener initializer = new FileEncodingApplicationListener();
|
||||
|
||||
private final ConfigurableEnvironment environment = new StandardEnvironment();
|
||||
|
||||
private final ApplicationEnvironmentPreparedEvent event = new ApplicationEnvironmentPreparedEvent(
|
||||
new SpringApplication(), new String[0], this.environment);
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ public class AnsiOutputApplicationListenerTests {
|
||||
|
||||
@Configuration
|
||||
public static class Config {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,12 +83,14 @@ public class DelegatingApplicationListenerTests {
|
||||
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
private static class MockInitA implements ApplicationListener<ContextRefreshedEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
ConfigurableApplicationContext applicationContext = (ConfigurableApplicationContext) event
|
||||
.getApplicationContext();
|
||||
applicationContext.getBeanFactory().registerSingleton("a", "a");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Order(Ordered.LOWEST_PRECEDENCE)
|
||||
@@ -102,6 +104,7 @@ public class DelegatingApplicationListenerTests {
|
||||
.isEqualTo("a");
|
||||
applicationContext.getBeanFactory().registerSingleton("b", "b");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class InDefaultPackageConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -23,4 +23,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ComponentScan(basePackageClasses = ExampleBean.class)
|
||||
public class InDefaultPackageWithBasePackageClassesConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = "org.springframework.boot.context.configwarnings.nested")
|
||||
public class InDefaultPackageWithBasePackagesConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@MetaComponentScan
|
||||
public class InDefaultPackageWithMetaAnnotationConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ComponentScan("org.springframework.boot.context.configwarnings.nested")
|
||||
public class InDefaultPackageWithValueConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -20,4 +20,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class InDefaultPackageWithoutScanConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class InOrgSpringPackageConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,5 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class InRealPackageConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -210,4 +210,5 @@ public class AnnotationConfigEmbeddedWebApplicationContextTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -121,28 +121,34 @@ public class EmbeddedServletContainerMvcIntegrationTests {
|
||||
@Configuration
|
||||
@Import(Config.class)
|
||||
public static class TomcatConfig {
|
||||
|
||||
@Bean
|
||||
public EmbeddedServletContainerFactory containerFactory() {
|
||||
return new TomcatEmbeddedServletContainerFactory(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Import(Config.class)
|
||||
public static class JettyConfig {
|
||||
|
||||
@Bean
|
||||
public EmbeddedServletContainerFactory containerFactory() {
|
||||
return new JettyEmbeddedServletContainerFactory(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Import(Config.class)
|
||||
public static class UndertowConfig {
|
||||
|
||||
@Bean
|
||||
public EmbeddedServletContainerFactory containerFactory() {
|
||||
return new UndertowEmbeddedServletContainerFactory(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -161,6 +167,7 @@ public class EmbeddedServletContainerMvcIntegrationTests {
|
||||
public HelloWorldController helloWorldController() {
|
||||
return new HelloWorldController();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -201,6 +208,7 @@ public class EmbeddedServletContainerMvcIntegrationTests {
|
||||
public HelloWorldController helloWorldController() {
|
||||
return new HelloWorldController();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Controller
|
||||
|
||||
@@ -47,4 +47,5 @@ public class ExampleFilter implements Filter {
|
||||
chain.doFilter(request, response);
|
||||
response.getWriter().write("]");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -200,6 +200,7 @@ public class MockEmbeddedServletContainerFactory
|
||||
}
|
||||
|
||||
private static class EmptyEnumeration<E> implements Enumeration<E> {
|
||||
|
||||
static final EmptyEnumeration<Object> EMPTY_ENUMERATION = new EmptyEnumeration<Object>();
|
||||
|
||||
@Override
|
||||
@@ -211,6 +212,7 @@ public class MockEmbeddedServletContainerFactory
|
||||
public E nextElement() {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -233,6 +235,7 @@ public class MockEmbeddedServletContainerFactory
|
||||
public Servlet getServlet() {
|
||||
return this.servlet;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class RegisteredFilter {
|
||||
@@ -253,5 +256,7 @@ public class MockEmbeddedServletContainerFactory
|
||||
public Filter getFilter() {
|
||||
return this.filter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -87,4 +87,5 @@ public class XmlEmbeddedWebApplicationContextTests {
|
||||
Servlet servlet = this.context.getBean(Servlet.class);
|
||||
verify(containerFactory.getServletContext()).addServlet("servlet", servlet);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -522,6 +522,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
|
||||
public void setFoo(String foo) {
|
||||
this.foo = foo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class CustomPropertyValidator implements Validator {
|
||||
@@ -600,7 +601,9 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
|
||||
}
|
||||
|
||||
enum FooEnum {
|
||||
|
||||
FOO, BAZ, BAR
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -755,6 +755,7 @@ public class EnableConfigurationPropertiesTests {
|
||||
}
|
||||
|
||||
// No getter - you should be able to bind to a write-only bean
|
||||
|
||||
}
|
||||
|
||||
// No annotation
|
||||
@@ -782,6 +783,7 @@ public class EnableConfigurationPropertiesTests {
|
||||
}
|
||||
|
||||
// No getter - you should be able to bind to a write-only bean
|
||||
|
||||
}
|
||||
|
||||
@EnableConfigurationProperties
|
||||
|
||||
@@ -94,6 +94,7 @@ public class FailureAnalyzersTests {
|
||||
public FailureAnalysis analyze(Throwable failure) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface BeanFactoryAwareFailureAnalyzer extends BeanFactoryAware, FailureAnalyzer {
|
||||
|
||||
@@ -82,6 +82,7 @@ public class BeanNotOfRequiredTypeFailureAnalyzerTests {
|
||||
public AsyncBean asyncBean() {
|
||||
return new AsyncBean();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -73,8 +73,7 @@ public class DatabaseDriverTests {
|
||||
.isEqualTo(DatabaseDriver.UNKNOWN);
|
||||
assertThat(DatabaseDriver.fromProductName("Apache Derby"))
|
||||
.isEqualTo(DatabaseDriver.DERBY);
|
||||
assertThat(DatabaseDriver.fromProductName("H2"))
|
||||
.isEqualTo(DatabaseDriver.H2);
|
||||
assertThat(DatabaseDriver.fromProductName("H2")).isEqualTo(DatabaseDriver.H2);
|
||||
assertThat(DatabaseDriver.fromProductName("HSQL Database Engine"))
|
||||
.isEqualTo(DatabaseDriver.HSQLDB);
|
||||
assertThat(DatabaseDriver.fromProductName("SQLite"))
|
||||
@@ -122,8 +121,9 @@ public class DatabaseDriverTests {
|
||||
.isEqualTo(DatabaseDriver.ORACLE);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:postgresql://127.0.0.1:5432/sample"))
|
||||
.isEqualTo(DatabaseDriver.POSTGRESQL);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:jtds:sqlserver://127.0.0.1:1433/sample"))
|
||||
.isEqualTo(DatabaseDriver.JTDS);
|
||||
assertThat(
|
||||
DatabaseDriver.fromJdbcUrl("jdbc:jtds:sqlserver://127.0.0.1:1433/sample"))
|
||||
.isEqualTo(DatabaseDriver.JTDS);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:sqlserver://127.0.0.1:1433"))
|
||||
.isEqualTo(DatabaseDriver.SQLSERVER);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:firebirdsql://localhost/sample"))
|
||||
@@ -134,8 +134,9 @@ public class DatabaseDriverTests {
|
||||
.isEqualTo(DatabaseDriver.DB2_AS400);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:teradata://localhost/SAMPLE"))
|
||||
.isEqualTo(DatabaseDriver.TERADATA);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:informix-sqli://localhost:1533/sample"))
|
||||
.isEqualTo(DatabaseDriver.INFORMIX);
|
||||
assertThat(
|
||||
DatabaseDriver.fromJdbcUrl("jdbc:informix-sqli://localhost:1533/sample"))
|
||||
.isEqualTo(DatabaseDriver.INFORMIX);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:informix-direct://sample"))
|
||||
.isEqualTo(DatabaseDriver.INFORMIX);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class ColorConverterTests {
|
||||
|
||||
private ColorConverter converter;
|
||||
|
||||
private LoggingEvent event;
|
||||
|
||||
private final String in = "in";
|
||||
|
||||
@BeforeClass
|
||||
@@ -132,4 +134,5 @@ public class ColorConverterTests {
|
||||
String out = this.converter.transform(this.event, this.in);
|
||||
assertThat(out).isEqualTo("\033[32min\033[0;39m");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -108,4 +108,5 @@ public class LevelRemappingAppenderTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -107,12 +107,14 @@ public class EntityScanTests {
|
||||
@EntityScan("com.mycorp.entity")
|
||||
@SuppressWarnings("deprecation")
|
||||
static class ValueConfig extends BaseConfig {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EntityScan("com.mycorp.entity")
|
||||
@SuppressWarnings("deprecation")
|
||||
static class MissingEntityManager {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -144,6 +146,7 @@ public class EntityScanTests {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TestLocalContainerEntityManagerFactoryBean
|
||||
|
||||
@@ -156,6 +156,7 @@ public class FilteredClassPathRunner extends BlockJUnit4ClassRunner {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,4 +44,5 @@ public class MockFilter implements Filter {
|
||||
@Override
|
||||
public void destroy() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -126,10 +126,12 @@ public class SpringBootServletInitializerTests {
|
||||
SpringApplicationBuilder application) {
|
||||
return application.sources(Config.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
public class WithConfigurationAnnotation extends MockSpringBootServletInitializer {
|
||||
|
||||
}
|
||||
|
||||
public class WithConfiguredSource extends MockSpringBootServletInitializer {
|
||||
|
||||
Reference in New Issue
Block a user