Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
f875b74e
Commit
f875b74e
authored
Apr 03, 2019
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat samples with spring-javaformat 0.0.8
See gh-16418
parent
07c000c5
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
114 additions
and
87 deletions
+114
-87
ManagementPortAndPathSampleActuatorApplicationTests.java
.../ManagementPortAndPathSampleActuatorApplicationTests.java
+4
-4
SampleActuatorUiApplicationPortTests.java
...ple/actuator/ui/SampleActuatorUiApplicationPortTests.java
+3
-3
ManagementAddressActuatorApplicationTests.java
...e/actuator/ManagementAddressActuatorApplicationTests.java
+4
-4
ManagementPathSampleActuatorApplicationTests.java
...ctuator/ManagementPathSampleActuatorApplicationTests.java
+3
-3
ManagementPortAndPathSampleActuatorApplicationTests.java
.../ManagementPortAndPathSampleActuatorApplicationTests.java
+5
-4
NoManagementSampleActuatorApplicationTests.java
.../actuator/NoManagementSampleActuatorApplicationTests.java
+3
-3
ServletPathSampleActuatorApplicationTests.java
...e/actuator/ServletPathSampleActuatorApplicationTests.java
+3
-3
ShutdownSampleActuatorApplicationTests.java
...mple/actuator/ShutdownSampleActuatorApplicationTests.java
+5
-4
ChatService.java
...mosphere/src/main/java/sample/atmosphere/ChatService.java
+3
-2
SampleAtmosphereApplicationTests.java
...a/sample/atmosphere/SampleAtmosphereApplicationTests.java
+3
-2
SampleCassandraApplicationTests.java
...ample/data/cassandra/SampleCassandraApplicationTests.java
+3
-3
Customer.java
...rch/src/main/java/sample/data/elasticsearch/Customer.java
+3
-2
City.java
...e-data-jpa/src/main/java/sample/data/jpa/domain/City.java
+3
-2
Hotel.java
...-data-jpa/src/main/java/sample/data/jpa/domain/Hotel.java
+3
-2
Review.java
...data-jpa/src/main/java/sample/data/jpa/domain/Review.java
+3
-2
SampleDataJpaApplicationTests.java
...t/java/sample/data/jpa/SampleDataJpaApplicationTests.java
+3
-3
City.java
...data-rest/src/main/java/sample/data/rest/domain/City.java
+3
-2
Hotel.java
...ata-rest/src/main/java/sample/data/rest/domain/Hotel.java
+3
-2
Person.java
...oot-sample-flyway/src/main/java/sample/flyway/Person.java
+3
-2
Note.java
...boot-sample-jpa/src/main/java/sample/jpa/domain/Note.java
+3
-2
Tag.java
...-boot-sample-jpa/src/main/java/sample/jpa/domain/Tag.java
+3
-2
SampleKafkaApplicationTests.java
...c/test/java/sample/kafka/SampleKafkaApplicationTests.java
+3
-2
SampleSecureWebFluxApplicationTests.java
...e/secure/webflux/SampleSecureWebFluxApplicationTests.java
+3
-2
SampleSecureWebFluxCustomSecurityTests.java
...ecure/webflux/SampleSecureWebFluxCustomSecurityTests.java
+4
-4
SampleSessionWebFluxApplicationTests.java
.../sample/session/SampleSessionWebFluxApplicationTests.java
+3
-2
NonAutoConfigurationSampleTomcatApplicationTests.java
...cat/NonAutoConfigurationSampleTomcatApplicationTests.java
+3
-3
ExampleController.java
...bflux/src/main/java/sample/webflux/ExampleController.java
+5
-3
SampleWebSocketsApplicationTests.java
...les/websocket/jetty/SampleWebSocketsApplicationTests.java
+3
-2
CustomContainerWebSocketsApplicationTests.java
...jetty/echo/CustomContainerWebSocketsApplicationTests.java
+5
-3
SampleWebSocketsApplicationTests.java
...es/websocket/tomcat/SampleWebSocketsApplicationTests.java
+3
-2
CustomContainerWebSocketsApplicationTests.java
...omcat/echo/CustomContainerWebSocketsApplicationTests.java
+5
-3
SampleWebSocketsApplicationTests.java
.../websocket/undertow/SampleWebSocketsApplicationTests.java
+3
-2
CustomContainerWebSocketsApplicationTests.java
...ertow/echo/CustomContainerWebSocketsApplicationTests.java
+5
-3
No files found.
spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -37,9 +37,9 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"management.server.port=0"
,
properties
=
{
"management.server.port=0"
,
"management.server.servlet.context-path=/management"
})
"management.server.servlet.context-path=/management"
})
public
class
ManagementPortAndPathSampleActuatorApplicationTests
{
public
class
ManagementPortAndPathSampleActuatorApplicationTests
{
@LocalServerPort
@LocalServerPort
...
...
spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -38,8 +38,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"management.server.port:0"
})
properties
=
{
"management.server.port:0"
})
public
class
SampleActuatorUiApplicationPortTests
{
public
class
SampleActuatorUiApplicationPortTests
{
@LocalServerPort
@LocalServerPort
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -38,9 +38,9 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"management.server.port=0"
,
"management.server.address=127.0.0.1"
,
properties
=
{
"management.server.port=0"
,
"management.server.address=127.0.0.1"
,
"management.server.servlet.context-path:/admin"
})
"management.server.servlet.context-path:/admin"
})
public
class
ManagementAddressActuatorApplicationTests
{
public
class
ManagementAddressActuatorApplicationTests
{
@LocalServerPort
@LocalServerPort
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -37,8 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"management.endpoints.web.base-path=/admin"
})
properties
=
{
"management.endpoints.web.base-path=/admin"
})
public
class
ManagementPathSampleActuatorApplicationTests
{
public
class
ManagementPathSampleActuatorApplicationTests
{
@Autowired
@Autowired
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -40,9 +40,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"management.server.port=0"
,
"management.endpoints.web.base-path=/admin"
,
properties
=
{
"management.server.port=0"
,
"management.endpoint.health.show-details=never"
})
"management.endpoints.web.base-path=/admin"
,
"management.endpoint.health.show-details=never"
})
public
class
ManagementPortAndPathSampleActuatorApplicationTests
{
public
class
ManagementPortAndPathSampleActuatorApplicationTests
{
@LocalServerPort
@LocalServerPort
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -37,8 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"management.server.port=-1"
})
properties
=
{
"management.server.port=-1"
})
public
class
NoManagementSampleActuatorApplicationTests
{
public
class
NoManagementSampleActuatorApplicationTests
{
@Autowired
@Autowired
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -37,8 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
,
"server.servlet.path=/spring"
})
properties
=
{
"server.servlet.path=/spring"
})
public
class
ServletPathSampleActuatorApplicationTests
{
public
class
ServletPathSampleActuatorApplicationTests
{
@Autowired
@Autowired
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -41,9 +41,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
* @author Dave Syer
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
{
@SpringBootTest
(
ShutdownSampleActuatorApplicationTests
.
SecurityConfiguration
.
class
,
classes
=
{
ShutdownSampleActuatorApplicationTests
.
SecurityConfiguration
.
class
,
SampleActuatorApplication
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
SampleActuatorApplication
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
ShutdownSampleActuatorApplicationTests
{
public
class
ShutdownSampleActuatorApplicationTests
{
@Autowired
@Autowired
...
...
spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/atmosphere/ChatService.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -45,7 +45,8 @@ public class ChatService {
...
@@ -45,7 +45,8 @@ public class ChatService {
event
.
isCancelled
()
?
"cancelled"
:
"closed"
);
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
{
public
Message
onMessage
(
Message
message
)
throws
IOException
{
this
.
logger
.
info
(
"Author {} sent message {}"
,
message
.
getAuthor
(),
this
.
logger
.
info
(
"Author {} sent message {}"
,
message
.
getAuthor
(),
message
.
getMessage
());
message
.
getMessage
());
...
...
spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -45,7 +45,8 @@ import org.springframework.web.socket.handler.TextWebSocketHandler;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
SampleAtmosphereApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
@SpringBootTest
(
classes
=
SampleAtmosphereApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
SampleAtmosphereApplicationTests
{
public
class
SampleAtmosphereApplicationTests
{
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleAtmosphereApplicationTests
.
class
);
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleAtmosphereApplicationTests
.
class
);
...
...
spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -39,8 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* Tests for {@link SampleCassandraApplication}.
* Tests for {@link SampleCassandraApplication}.
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@TestExecutionListeners
(
mergeMode
=
MergeMode
.
MERGE_WITH_DEFAULTS
,
listeners
=
{
@TestExecutionListeners
(
mergeMode
=
MergeMode
.
MERGE_WITH_DEFAULTS
,
OrderedCassandraTestExecutionListener
.
class
})
listeners
=
{
OrderedCassandraTestExecutionListener
.
class
})
@SpringBootTest
@SpringBootTest
@CassandraDataSet
(
keyspace
=
"mykeyspace"
,
value
=
"setup.cql"
)
@CassandraDataSet
(
keyspace
=
"mykeyspace"
,
value
=
"setup.cql"
)
@EmbeddedCassandra
(
timeout
=
60000
)
@EmbeddedCassandra
(
timeout
=
60000
)
...
...
spring-boot-samples/spring-boot-sample-data-elasticsearch/src/main/java/sample/data/elasticsearch/Customer.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
3
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -19,7 +19,8 @@ package sample.data.elasticsearch;
...
@@ -19,7 +19,8 @@ package sample.data.elasticsearch;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.elasticsearch.annotations.Document
;
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
{
public
class
Customer
{
@Id
@Id
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/City.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -30,7 +30,8 @@ public class City implements Serializable {
...
@@ -30,7 +30,8 @@ public class City implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
@SequenceGenerator
(
name
=
"city_generator"
,
sequenceName
=
"city_sequence"
,
initialValue
=
23
)
@SequenceGenerator
(
name
=
"city_generator"
,
sequenceName
=
"city_sequence"
,
initialValue
=
23
)
@GeneratedValue
(
generator
=
"city_generator"
)
@GeneratedValue
(
generator
=
"city_generator"
)
private
Long
id
;
private
Long
id
;
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Hotel.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -36,7 +36,8 @@ public class Hotel implements Serializable {
...
@@ -36,7 +36,8 @@ public class Hotel implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
@SequenceGenerator
(
name
=
"hotel_generator"
,
sequenceName
=
"hotel_sequence"
,
initialValue
=
28
)
@SequenceGenerator
(
name
=
"hotel_generator"
,
sequenceName
=
"hotel_sequence"
,
initialValue
=
28
)
@GeneratedValue
(
generator
=
"hotel_generator"
)
@GeneratedValue
(
generator
=
"hotel_generator"
)
private
Long
id
;
private
Long
id
;
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/domain/Review.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -38,7 +38,8 @@ public class Review implements Serializable {
...
@@ -38,7 +38,8 @@ public class Review implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
@SequenceGenerator
(
name
=
"review_generator"
,
sequenceName
=
"review_sequence"
,
initialValue
=
64
)
@SequenceGenerator
(
name
=
"review_generator"
,
sequenceName
=
"review_sequence"
,
initialValue
=
64
)
@GeneratedValue
(
generator
=
"review_generator"
)
@GeneratedValue
(
generator
=
"review_generator"
)
private
Long
id
;
private
Long
id
;
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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.
...
@@ -45,8 +45,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
// Enable JMX so we can test the MBeans (you can't do this in a properties file)
// Enable JMX so we can test the MBeans (you can't do this in a properties file)
@SpringBootTest
(
properties
=
{
"spring.jmx.enabled:true"
,
@SpringBootTest
(
"spring.datasource.jmx-enabled:true"
})
properties
=
{
"spring.jmx.enabled:true"
,
"spring.datasource.jmx-enabled:true"
})
@ActiveProfiles
(
"scratch"
)
@ActiveProfiles
(
"scratch"
)
// Separate profile for web tests to avoid clashing databases
// Separate profile for web tests to avoid clashing databases
public
class
SampleDataJpaApplicationTests
{
public
class
SampleDataJpaApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/City.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -30,7 +30,8 @@ public class City implements Serializable {
...
@@ -30,7 +30,8 @@ public class City implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
@SequenceGenerator
(
name
=
"city_generator"
,
sequenceName
=
"city_sequence"
,
initialValue
=
23
)
@SequenceGenerator
(
name
=
"city_generator"
,
sequenceName
=
"city_sequence"
,
initialValue
=
23
)
@GeneratedValue
(
generator
=
"city_generator"
)
@GeneratedValue
(
generator
=
"city_generator"
)
private
Long
id
;
private
Long
id
;
...
...
spring-boot-samples/spring-boot-sample-data-rest/src/main/java/sample/data/rest/domain/Hotel.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -33,7 +33,8 @@ public class Hotel implements Serializable {
...
@@ -33,7 +33,8 @@ public class Hotel implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Id
@SequenceGenerator
(
name
=
"hotel_generator"
,
sequenceName
=
"hotel_sequence"
,
initialValue
=
28
)
@SequenceGenerator
(
name
=
"hotel_generator"
,
sequenceName
=
"hotel_sequence"
,
initialValue
=
28
)
@GeneratedValue
(
generator
=
"hotel_generator"
)
@GeneratedValue
(
generator
=
"hotel_generator"
)
private
Long
id
;
private
Long
id
;
...
...
spring-boot-samples/spring-boot-sample-flyway/src/main/java/sample/flyway/Person.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -25,7 +25,8 @@ import javax.persistence.SequenceGenerator;
...
@@ -25,7 +25,8 @@ import javax.persistence.SequenceGenerator;
public
class
Person
{
public
class
Person
{
@Id
@Id
@SequenceGenerator
(
name
=
"person_generator"
,
sequenceName
=
"person_sequence"
,
allocationSize
=
1
)
@SequenceGenerator
(
name
=
"person_generator"
,
sequenceName
=
"person_sequence"
,
allocationSize
=
1
)
@GeneratedValue
(
generator
=
"person_generator"
)
@GeneratedValue
(
generator
=
"person_generator"
)
private
Long
id
;
private
Long
id
;
...
...
spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Note.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -28,7 +28,8 @@ import javax.persistence.SequenceGenerator;
...
@@ -28,7 +28,8 @@ import javax.persistence.SequenceGenerator;
public
class
Note
{
public
class
Note
{
@Id
@Id
@SequenceGenerator
(
name
=
"note_generator"
,
sequenceName
=
"note_sequence"
,
initialValue
=
5
)
@SequenceGenerator
(
name
=
"note_generator"
,
sequenceName
=
"note_sequence"
,
initialValue
=
5
)
@GeneratedValue
(
generator
=
"note_generator"
)
@GeneratedValue
(
generator
=
"note_generator"
)
private
long
id
;
private
long
id
;
...
...
spring-boot-samples/spring-boot-sample-jpa/src/main/java/sample/jpa/domain/Tag.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -28,7 +28,8 @@ import javax.persistence.SequenceGenerator;
...
@@ -28,7 +28,8 @@ import javax.persistence.SequenceGenerator;
public
class
Tag
{
public
class
Tag
{
@Id
@Id
@SequenceGenerator
(
name
=
"tag_generator"
,
sequenceName
=
"tag_sequence"
,
initialValue
=
4
)
@SequenceGenerator
(
name
=
"tag_generator"
,
sequenceName
=
"tag_sequence"
,
initialValue
=
4
)
@GeneratedValue
(
generator
=
"tag_generator"
)
@GeneratedValue
(
generator
=
"tag_generator"
)
private
long
id
;
private
long
id
;
...
...
spring-boot-samples/spring-boot-sample-kafka/src/test/java/sample/kafka/SampleKafkaApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -39,7 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
properties
=
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}"
)
@SpringBootTest
(
properties
=
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}"
)
@EmbeddedKafka
@EmbeddedKafka
public
class
SampleKafkaApplicationTests
{
public
class
SampleKafkaApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -34,7 +34,8 @@ import org.springframework.test.web.reactive.server.WebTestClient;
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
@RunWith
(
SpringRunner
.
class
)
@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
{
public
class
SampleSecureWebFluxApplicationTests
{
@Autowired
@Autowired
...
...
spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxCustomSecurityTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -43,9 +43,9 @@ import org.springframework.test.web.reactive.server.WebTestClient;
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
classes
=
{
@SpringBootTest
(
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
SampleSecureWebFluxCustomSecurityTests
.
SecurityConfiguration
.
class
,
classes
=
{
SampleSecureWebFluxCustomSecurityTests
.
SecurityConfiguration
.
class
,
SampleSecureWebFluxApplication
.
class
})
SampleSecureWebFluxApplication
.
class
})
public
class
SampleSecureWebFluxCustomSecurityTests
{
public
class
SampleSecureWebFluxCustomSecurityTests
{
@Autowired
@Autowired
...
...
spring-boot-samples/spring-boot-sample-session-webflux/src/test/java/sample/session/SampleSessionWebFluxApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -39,7 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Vedran Pavic
* @author Vedran Pavic
*/
*/
@RunWith
(
SpringRunner
.
class
)
@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
{
public
class
SampleSessionWebFluxApplicationTests
{
@LocalServerPort
@LocalServerPort
...
...
spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -64,8 +64,8 @@ public class NonAutoConfigurationSampleTomcatApplicationTests {
...
@@ -64,8 +64,8 @@ public class NonAutoConfigurationSampleTomcatApplicationTests {
DispatcherServletAutoConfiguration
.
class
,
WebMvcAutoConfiguration
.
class
,
DispatcherServletAutoConfiguration
.
class
,
WebMvcAutoConfiguration
.
class
,
HttpMessageConvertersAutoConfiguration
.
class
,
HttpMessageConvertersAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
})
PropertyPlaceholderAutoConfiguration
.
class
})
@ComponentScan
(
basePackageClasses
=
{
SampleController
.
class
,
@ComponentScan
(
HelloWorldService
.
class
})
basePackageClasses
=
{
SampleController
.
class
,
HelloWorldService
.
class
})
public
static
class
NonAutoConfigurationSampleTomcatApplication
{
public
static
class
NonAutoConfigurationSampleTomcatApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
spring-boot-samples/spring-boot-sample-webflux/src/main/java/sample/webflux/ExampleController.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -23,8 +23,10 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RestController
public
class
ExampleController
{
public
class
ExampleController
{
@PostMapping
(
path
=
"/"
,
consumes
=
{
MediaType
.
APPLICATION_JSON_VALUE
,
@PostMapping
(
path
=
"/"
,
"!application/xml"
},
produces
=
MediaType
.
TEXT_PLAIN_VALUE
,
headers
=
"X-Custom=Foo"
,
params
=
"a!=alpha"
)
consumes
=
{
MediaType
.
APPLICATION_JSON_VALUE
,
"!application/xml"
},
produces
=
MediaType
.
TEXT_PLAIN_VALUE
,
headers
=
"X-Custom=Foo"
,
params
=
"a!=alpha"
)
public
String
example
()
{
public
String
example
()
{
return
"Hello World"
;
return
"Hello World"
;
}
}
...
...
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -45,7 +45,8 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
SampleJettyWebSocketsApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
@SpringBootTest
(
classes
=
SampleJettyWebSocketsApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
SampleWebSocketsApplicationTests
{
public
class
SampleWebSocketsApplicationTests
{
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleWebSocketsApplicationTests
.
class
);
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleWebSocketsApplicationTests
.
class
);
...
...
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -49,8 +49,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
{
SampleJettyWebSocketsApplication
.
class
,
@SpringBootTest
(
CustomContainerConfiguration
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
classes
=
{
SampleJettyWebSocketsApplication
.
class
,
CustomContainerConfiguration
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
CustomContainerWebSocketsApplicationTests
{
public
class
CustomContainerWebSocketsApplicationTests
{
private
static
Log
logger
=
LogFactory
private
static
Log
logger
=
LogFactory
...
...
spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -45,7 +45,8 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
SampleTomcatWebSocketApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
@SpringBootTest
(
classes
=
SampleTomcatWebSocketApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
SampleWebSocketsApplicationTests
{
public
class
SampleWebSocketsApplicationTests
{
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleWebSocketsApplicationTests
.
class
);
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleWebSocketsApplicationTests
.
class
);
...
...
spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -49,8 +49,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
{
SampleTomcatWebSocketApplication
.
class
,
@SpringBootTest
(
CustomContainerConfiguration
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
classes
=
{
SampleTomcatWebSocketApplication
.
class
,
CustomContainerConfiguration
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
CustomContainerWebSocketsApplicationTests
{
public
class
CustomContainerWebSocketsApplicationTests
{
private
static
Log
logger
=
LogFactory
private
static
Log
logger
=
LogFactory
...
...
spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -45,7 +45,8 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
SampleUndertowWebSocketsApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
@SpringBootTest
(
classes
=
SampleUndertowWebSocketsApplication
.
class
,
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
SampleWebSocketsApplicationTests
{
public
class
SampleWebSocketsApplicationTests
{
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleWebSocketsApplicationTests
.
class
);
private
static
Log
logger
=
LogFactory
.
getLog
(
SampleWebSocketsApplicationTests
.
class
);
...
...
spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java
View file @
f875b74e
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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;
...
@@ -49,8 +49,10 @@ import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
{
SampleUndertowWebSocketsApplication
.
class
,
@SpringBootTest
(
CustomContainerConfiguration
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
classes
=
{
SampleUndertowWebSocketsApplication
.
class
,
CustomContainerConfiguration
.
class
},
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
public
class
CustomContainerWebSocketsApplicationTests
{
public
class
CustomContainerWebSocketsApplicationTests
{
private
static
Log
logger
=
LogFactory
private
static
Log
logger
=
LogFactory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment