From f875b74e67e733ccaf07aec4d4a7e18ab38b7a84 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 2 Apr 2019 19:38:51 -0700 Subject: [PATCH] Reformat samples with spring-javaformat 0.0.8 See gh-16418 --- ...agementPortAndPathSampleActuatorApplicationTests.java | 8 ++++---- .../ui/SampleActuatorUiApplicationPortTests.java | 6 +++--- .../ManagementAddressActuatorApplicationTests.java | 8 ++++---- .../ManagementPathSampleActuatorApplicationTests.java | 6 +++--- ...agementPortAndPathSampleActuatorApplicationTests.java | 9 +++++---- .../NoManagementSampleActuatorApplicationTests.java | 6 +++--- .../ServletPathSampleActuatorApplicationTests.java | 6 +++--- .../actuator/ShutdownSampleActuatorApplicationTests.java | 9 +++++---- .../src/main/java/sample/atmosphere/ChatService.java | 5 +++-- .../atmosphere/SampleAtmosphereApplicationTests.java | 5 +++-- .../data/cassandra/SampleCassandraApplicationTests.java | 6 +++--- .../main/java/sample/data/elasticsearch/Customer.java | 5 +++-- .../src/main/java/sample/data/jpa/domain/City.java | 5 +++-- .../src/main/java/sample/data/jpa/domain/Hotel.java | 5 +++-- .../src/main/java/sample/data/jpa/domain/Review.java | 5 +++-- .../sample/data/jpa/SampleDataJpaApplicationTests.java | 6 +++--- .../src/main/java/sample/data/rest/domain/City.java | 5 +++-- .../src/main/java/sample/data/rest/domain/Hotel.java | 5 +++-- .../src/main/java/sample/flyway/Person.java | 5 +++-- .../src/main/java/sample/jpa/domain/Note.java | 5 +++-- .../src/main/java/sample/jpa/domain/Tag.java | 5 +++-- .../java/sample/kafka/SampleKafkaApplicationTests.java | 5 +++-- .../webflux/SampleSecureWebFluxApplicationTests.java | 5 +++-- .../webflux/SampleSecureWebFluxCustomSecurityTests.java | 8 ++++---- .../session/SampleSessionWebFluxApplicationTests.java | 5 +++-- ...NonAutoConfigurationSampleTomcatApplicationTests.java | 6 +++--- .../src/main/java/sample/webflux/ExampleController.java | 8 +++++--- .../jetty/SampleWebSocketsApplicationTests.java | 5 +++-- .../echo/CustomContainerWebSocketsApplicationTests.java | 8 +++++--- .../tomcat/SampleWebSocketsApplicationTests.java | 5 +++-- .../echo/CustomContainerWebSocketsApplicationTests.java | 8 +++++--- .../undertow/SampleWebSocketsApplicationTests.java | 5 +++-- .../echo/CustomContainerWebSocketsApplicationTests.java | 8 +++++--- 33 files changed, 114 insertions(+), 87 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java index fe30251f7b9..10a2fe46fdf 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,9 +37,9 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Madhura Bhave */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "management.server.port=0", - "management.server.servlet.context-path=/management" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "management.server.port=0", + "management.server.servlet.context-path=/management" }) public class ManagementPortAndPathSampleActuatorApplicationTests { @LocalServerPort diff --git a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java index f3fe36a137b..bd143f51b71 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "management.server.port:0" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "management.server.port:0" }) public class SampleActuatorUiApplicationPortTests { @LocalServerPort diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java index fdc5dbb04bc..251d8d2ae05 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,9 +38,9 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "management.server.port=0", "management.server.address=127.0.0.1", - "management.server.servlet.context-path:/admin" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "management.server.port=0", "management.server.address=127.0.0.1", + "management.server.servlet.context-path:/admin" }) public class ManagementAddressActuatorApplicationTests { @LocalServerPort diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java index 9efea948696..8ee4826540d 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,8 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "management.endpoints.web.base-path=/admin" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "management.endpoints.web.base-path=/admin" }) public class ManagementPathSampleActuatorApplicationTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java index 49b3fa84fbb..e3c88ba778b 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,9 +40,10 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "management.server.port=0", "management.endpoints.web.base-path=/admin", - "management.endpoint.health.show-details=never" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "management.server.port=0", + "management.endpoints.web.base-path=/admin", + "management.endpoint.health.show-details=never" }) public class ManagementPortAndPathSampleActuatorApplicationTests { @LocalServerPort diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java index 03c562711de..0efc29d3ccc 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,8 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "management.server.port=-1" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "management.server.port=-1" }) public class NoManagementSampleActuatorApplicationTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java index d1d821bb131..9b83e640757 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,8 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { - "server.servlet.path=/spring" }) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, + properties = { "server.servlet.path=/spring" }) public class ServletPathSampleActuatorApplicationTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java index c2c25d3c40f..ed322a01fc8 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,9 +41,10 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @RunWith(SpringRunner.class) -@SpringBootTest(classes = { - ShutdownSampleActuatorApplicationTests.SecurityConfiguration.class, - SampleActuatorApplication.class }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = { ShutdownSampleActuatorApplicationTests.SecurityConfiguration.class, + SampleActuatorApplication.class }, + webEnvironment = WebEnvironment.RANDOM_PORT) public class ShutdownSampleActuatorApplicationTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java index 307bbe1b2f2..9d3d6b12554 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,8 @@ public class ChatService { event.isCancelled() ? "cancelled" : "closed"); } - @org.atmosphere.config.service.Message(encoders = JacksonEncoderDecoder.class, decoders = JacksonEncoderDecoder.class) + @org.atmosphere.config.service.Message(encoders = JacksonEncoderDecoder.class, + decoders = JacksonEncoderDecoder.class) public Message onMessage(Message message) throws IOException { this.logger.info("Author {} sent message {}", message.getAuthor(), message.getMessage()); diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java index d554c358162..75d268093e0 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,8 @@ import org.springframework.web.socket.handler.TextWebSocketHandler; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = SampleAtmosphereApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest(classes = SampleAtmosphereApplication.class, + webEnvironment = WebEnvironment.RANDOM_PORT) public class SampleAtmosphereApplicationTests { private static Log logger = LogFactory.getLog(SampleAtmosphereApplicationTests.class); diff --git a/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java index 2c5a336e431..3ff5a021dd7 100644 --- a/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,8 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat; * Tests for {@link SampleCassandraApplication}. */ @RunWith(SpringRunner.class) -@TestExecutionListeners(mergeMode = MergeMode.MERGE_WITH_DEFAULTS, listeners = { - OrderedCassandraTestExecutionListener.class }) +@TestExecutionListeners(mergeMode = MergeMode.MERGE_WITH_DEFAULTS, + listeners = { OrderedCassandraTestExecutionListener.class }) @SpringBootTest @CassandraDataSet(keyspace = "mykeyspace", value = "setup.cql") @EmbeddedCassandra(timeout = 60000) diff --git a/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/main/java/sample/data/elasticsearch/Customer.java b/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/main/java/sample/data/elasticsearch/Customer.java index d3baded5099..c214eac59f7 100644 --- a/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/main/java/sample/data/elasticsearch/Customer.java +++ b/spring-boot-samples/spring-boot-sample-data-elasticsearch/src/main/java/sample/data/elasticsearch/Customer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,8 @@ package sample.data.elasticsearch; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; -@Document(indexName = "customer", type = "customer", shards = 1, replicas = 0, refreshInterval = "-1") +@Document(indexName = "customer", type = "customer", shards = 1, replicas = 0, + refreshInterval = "-1") public class Customer { @Id diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/City.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/City.java index ad439ffe8a1..dd62c7a6d10 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/City.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/City.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,8 @@ public class City implements Serializable { private static final long serialVersionUID = 1L; @Id - @SequenceGenerator(name = "city_generator", sequenceName = "city_sequence", initialValue = 23) + @SequenceGenerator(name = "city_generator", sequenceName = "city_sequence", + initialValue = 23) @GeneratedValue(generator = "city_generator") private Long id; diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Hotel.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Hotel.java index 78683e7d710..3743a3a0b74 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Hotel.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Hotel.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +36,8 @@ public class Hotel implements Serializable { private static final long serialVersionUID = 1L; @Id - @SequenceGenerator(name = "hotel_generator", sequenceName = "hotel_sequence", initialValue = 28) + @SequenceGenerator(name = "hotel_generator", sequenceName = "hotel_sequence", + initialValue = 28) @GeneratedValue(generator = "hotel_generator") private Long id; diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Review.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Review.java index 1a66b9072e6..36ad46e16be 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Review.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Review.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,8 @@ public class Review implements Serializable { private static final long serialVersionUID = 1L; @Id - @SequenceGenerator(name = "review_generator", sequenceName = "review_sequence", initialValue = 64) + @SequenceGenerator(name = "review_generator", sequenceName = "review_sequence", + initialValue = 64) @GeneratedValue(generator = "review_generator") private Long id; diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java index 4b34b358fa0..5b22832d7a7 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,8 +45,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ @RunWith(SpringRunner.class) // Enable JMX so we can test the MBeans (you can't do this in a properties file) -@SpringBootTest(properties = { "spring.jmx.enabled:true", - "spring.datasource.jmx-enabled:true" }) +@SpringBootTest( + properties = { "spring.jmx.enabled:true", "spring.datasource.jmx-enabled:true" }) @ActiveProfiles("scratch") // Separate profile for web tests to avoid clashing databases public class SampleDataJpaApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/City.java b/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/City.java index 22634114c3f..71776d03ecd 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/City.java +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/City.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,8 @@ public class City implements Serializable { private static final long serialVersionUID = 1L; @Id - @SequenceGenerator(name = "city_generator", sequenceName = "city_sequence", initialValue = 23) + @SequenceGenerator(name = "city_generator", sequenceName = "city_sequence", + initialValue = 23) @GeneratedValue(generator = "city_generator") private Long id; diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/Hotel.java b/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/Hotel.java index 5036196c469..3f135c59c02 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/Hotel.java +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/Hotel.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,8 @@ public class Hotel implements Serializable { private static final long serialVersionUID = 1L; @Id - @SequenceGenerator(name = "hotel_generator", sequenceName = "hotel_sequence", initialValue = 28) + @SequenceGenerator(name = "hotel_generator", sequenceName = "hotel_sequence", + initialValue = 28) @GeneratedValue(generator = "hotel_generator") private Long id; diff --git a/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/Person.java b/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/Person.java index 9d7e1a33c7d..0371889556f 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/Person.java +++ b/spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/Person.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,8 @@ import javax.persistence.SequenceGenerator; public class Person { @Id - @SequenceGenerator(name = "person_generator", sequenceName = "person_sequence", allocationSize = 1) + @SequenceGenerator(name = "person_generator", sequenceName = "person_sequence", + allocationSize = 1) @GeneratedValue(generator = "person_generator") private Long id; diff --git a/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Note.java b/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Note.java index 0fa74ddf378..5079ba175f3 100644 --- a/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Note.java +++ b/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Note.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,8 @@ import javax.persistence.SequenceGenerator; public class Note { @Id - @SequenceGenerator(name = "note_generator", sequenceName = "note_sequence", initialValue = 5) + @SequenceGenerator(name = "note_generator", sequenceName = "note_sequence", + initialValue = 5) @GeneratedValue(generator = "note_generator") private long id; diff --git a/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Tag.java b/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Tag.java index 83b156a39a0..d5255f240d7 100644 --- a/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Tag.java +++ b/spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Tag.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,8 @@ import javax.persistence.SequenceGenerator; public class Tag { @Id - @SequenceGenerator(name = "tag_generator", sequenceName = "tag_sequence", initialValue = 4) + @SequenceGenerator(name = "tag_generator", sequenceName = "tag_sequence", + initialValue = 4) @GeneratedValue(generator = "tag_generator") private long id; diff --git a/spring-boot-samples/spring-boot-sample-kafka/src/test/java/sample/kafka/SampleKafkaApplicationTests.java b/spring-boot-samples/spring-boot-sample-kafka/src/test/java/sample/kafka/SampleKafkaApplicationTests.java index 65b7188d58a..8d3c446109c 100644 --- a/spring-boot-samples/spring-boot-sample-kafka/src/test/java/sample/kafka/SampleKafkaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-kafka/src/test/java/sample/kafka/SampleKafkaApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Stephane Nicoll */ @RunWith(SpringRunner.class) -@SpringBootTest(properties = "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}") +@SpringBootTest( + properties = "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}") @EmbeddedKafka public class SampleKafkaApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java b/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java index e1cbefcdfce..2b45cb07413 100644 --- a/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,8 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @author Madhura Bhave */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = "management.endpoint.health.show-details=never") +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, + properties = "management.endpoint.health.show-details=never") public class SampleSecureWebFluxApplicationTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java b/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java index 7e6a9612026..ec796fc0b17 100644 --- a/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java +++ b/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,9 +43,9 @@ import org.springframework.test.web.reactive.server.WebTestClient; * @author Madhura Bhave */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { - SampleSecureWebFluxCustomSecurityTests.SecurityConfiguration.class, - SampleSecureWebFluxApplication.class }) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, + classes = { SampleSecureWebFluxCustomSecurityTests.SecurityConfiguration.class, + SampleSecureWebFluxApplication.class }) public class SampleSecureWebFluxCustomSecurityTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-session-webflux/src/test/java/sample/session/SampleSessionWebFluxApplicationTests.java b/spring-boot-samples/spring-boot-sample-session-webflux/src/test/java/sample/session/SampleSessionWebFluxApplicationTests.java index e6b5f3e7f9c..5ec39bba84c 100644 --- a/spring-boot-samples/spring-boot-sample-session-webflux/src/test/java/sample/session/SampleSessionWebFluxApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-session-webflux/src/test/java/sample/session/SampleSessionWebFluxApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Vedran Pavic */ @RunWith(SpringRunner.class) -@SpringBootTest(properties = "server.servlet.session.timeout:2", webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@SpringBootTest(properties = "server.servlet.session.timeout:2", + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class SampleSessionWebFluxApplicationTests { @LocalServerPort diff --git a/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java index d7721721ccc..dbe0ae95c7f 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,8 +64,8 @@ public class NonAutoConfigurationSampleTomcatApplicationTests { DispatcherServletAutoConfiguration.class, WebMvcAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class }) - @ComponentScan(basePackageClasses = { SampleController.class, - HelloWorldService.class }) + @ComponentScan( + basePackageClasses = { SampleController.class, HelloWorldService.class }) public static class NonAutoConfigurationSampleTomcatApplication { public static void main(String[] args) { diff --git a/spring-boot-samples/spring-boot-sample-webflux/src/main/java/sample/webflux/ExampleController.java b/spring-boot-samples/spring-boot-sample-webflux/src/main/java/sample/webflux/ExampleController.java index 5936b46505c..a42266d67e2 100644 --- a/spring-boot-samples/spring-boot-sample-webflux/src/main/java/sample/webflux/ExampleController.java +++ b/spring-boot-samples/spring-boot-sample-webflux/src/main/java/sample/webflux/ExampleController.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,8 +23,10 @@ import org.springframework.web.bind.annotation.RestController; @RestController public class ExampleController { - @PostMapping(path = "/", consumes = { MediaType.APPLICATION_JSON_VALUE, - "!application/xml" }, produces = MediaType.TEXT_PLAIN_VALUE, headers = "X-Custom=Foo", params = "a!=alpha") + @PostMapping(path = "/", + consumes = { MediaType.APPLICATION_JSON_VALUE, "!application/xml" }, + produces = MediaType.TEXT_PLAIN_VALUE, headers = "X-Custom=Foo", + params = "a!=alpha") public String example() { return "Hello World"; } diff --git a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java index 21df0ac3a22..3141227d4c0 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,8 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = SampleJettyWebSocketsApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest(classes = SampleJettyWebSocketsApplication.class, + webEnvironment = WebEnvironment.RANDOM_PORT) public class SampleWebSocketsApplicationTests { private static Log logger = LogFactory.getLog(SampleWebSocketsApplicationTests.class); diff --git a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java index df789d4bf6e..50308d1a95b 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,8 +49,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = { SampleJettyWebSocketsApplication.class, - CustomContainerConfiguration.class }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = { SampleJettyWebSocketsApplication.class, + CustomContainerConfiguration.class }, + webEnvironment = WebEnvironment.RANDOM_PORT) public class CustomContainerWebSocketsApplicationTests { private static Log logger = LogFactory diff --git a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java index 3955e07904b..121bd6b0bbd 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,8 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = SampleTomcatWebSocketApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest(classes = SampleTomcatWebSocketApplication.class, + webEnvironment = WebEnvironment.RANDOM_PORT) public class SampleWebSocketsApplicationTests { private static Log logger = LogFactory.getLog(SampleWebSocketsApplicationTests.class); diff --git a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java index 875768cae0b..5fa9de394b7 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,8 +49,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = { SampleTomcatWebSocketApplication.class, - CustomContainerConfiguration.class }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = { SampleTomcatWebSocketApplication.class, + CustomContainerConfiguration.class }, + webEnvironment = WebEnvironment.RANDOM_PORT) public class CustomContainerWebSocketsApplicationTests { private static Log logger = LogFactory diff --git a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java index afc31918fe3..6c4c2b26271 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,8 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = SampleUndertowWebSocketsApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest(classes = SampleUndertowWebSocketsApplication.class, + webEnvironment = WebEnvironment.RANDOM_PORT) public class SampleWebSocketsApplicationTests { private static Log logger = LogFactory.getLog(SampleWebSocketsApplicationTests.class); diff --git a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java index 83a42f7b269..905fc52e646 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,8 +49,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) -@SpringBootTest(classes = { SampleUndertowWebSocketsApplication.class, - CustomContainerConfiguration.class }, webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = { SampleUndertowWebSocketsApplication.class, + CustomContainerConfiguration.class }, + webEnvironment = WebEnvironment.RANDOM_PORT) public class CustomContainerWebSocketsApplicationTests { private static Log logger = LogFactory