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
01607605
Commit
01607605
authored
Jan 21, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply latest eclipse cleanup rules
parent
0ac5a759
Changes
78
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
149 additions
and
158 deletions
+149
-158
AuditEventTests.java
...g/springframework/boot/actuate/audit/AuditEventTests.java
+0
-1
InMemoryAuditEventRepositoryTests.java
...boot/actuate/audit/InMemoryAuditEventRepositoryTests.java
+0
-2
AuditListenerTests.java
...ework/boot/actuate/audit/listener/AuditListenerTests.java
+0
-2
AuditAutoConfigurationTests.java
...ot/actuate/autoconfigure/AuditAutoConfigurationTests.java
+0
-1
ManagementServerPropertiesAutoConfigurationTests.java
...ure/ManagementServerPropertiesAutoConfigurationTests.java
+0
-1
MetricFilterAutoConfigurationTests.java
...ate/autoconfigure/MetricFilterAutoConfigurationTests.java
+0
-1
TraceRepositoryAutoConfigurationTests.java
.../autoconfigure/TraceRepositoryAutoConfigurationTests.java
+0
-1
TraceWebFilterAutoConfigurationTest.java
...te/autoconfigure/TraceWebFilterAutoConfigurationTest.java
+0
-2
EnvironmentMvcEndpointTests.java
...oot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java
+1
-1
JolokiaEndpointTests.java
...ework/boot/actuate/endpoint/mvc/JolokiaEndpointTests.java
+1
-1
VanillaHealthIndicatorTests.java
...work/boot/actuate/health/VanillaHealthIndicatorTests.java
+0
-1
InMemoryMetricRepositoryTests.java
...ate/metrics/repository/InMemoryMetricRepositoryTests.java
+0
-1
DefaultCounterServiceTests.java
...ot/actuate/metrics/writer/DefaultCounterServiceTests.java
+0
-3
InMemoryTraceRepositoryTests.java
...work/boot/actuate/trace/InMemoryTraceRepositoryTests.java
+0
-2
MessageSourceAutoConfigurationTests.java
...ot/autoconfigure/MessageSourceAutoConfigurationTests.java
+0
-2
BatchAutoConfigurationTests.java
...boot/autoconfigure/batch/BatchAutoConfigurationTests.java
+1
-1
JobExecutionExitCodeGeneratorTests.java
...toconfigure/batch/JobExecutionExitCodeGeneratorTests.java
+0
-2
JpaRepositoriesAutoConfigurationTests.java
...configure/data/JpaRepositoriesAutoConfigurationTests.java
+1
-1
JpaWebAutoConfigurationTests.java
...boot/autoconfigure/data/JpaWebAutoConfigurationTests.java
+1
-1
MongoRepositoriesAutoConfigurationTests.java
...nfigure/data/MongoRepositoriesAutoConfigurationTests.java
+1
-1
CommonsDataSourceConfigurationTests.java
...toconfigure/jdbc/CommonsDataSourceConfigurationTests.java
+0
-1
EmbeddedDataSourceConfigurationTests.java
...oconfigure/jdbc/EmbeddedDataSourceConfigurationTests.java
+0
-1
ReactorAutoConfigurationTests.java
.../autoconfigure/reactor/ReactorAutoConfigurationTests.java
+1
-1
SecurityAutoConfigurationTests.java
...utoconfigure/security/SecurityAutoConfigurationTests.java
+1
-1
SecurityPropertiesTests.java
.../boot/autoconfigure/security/SecurityPropertiesTests.java
+0
-1
CommandLineInvoker.java
...framework/boot/cli/infrastructure/CommandLineInvoker.java
+1
-0
SampleActuatorNoWebApplicationTests.java
.../sample/actuator/SampleActuatorNoWebApplicationTests.java
+2
-2
SampleActuatorUiApplicationPortTests.java
...ple/actuator/ui/SampleActuatorUiApplicationPortTests.java
+2
-3
SampleActuatorUiApplicationTests.java
.../sample/actuator/ui/SampleActuatorUiApplicationTests.java
+0
-1
EndpointsPropertiesSampleActuatorApplicationTests.java
...or/EndpointsPropertiesSampleActuatorApplicationTests.java
+0
-1
ManagementAddressSampleActuatorApplicationTests.java
...ator/ManagementAddressSampleActuatorApplicationTests.java
+2
-3
ManagementSampleActuatorApplicationTests.java
...le/actuator/ManagementSampleActuatorApplicationTests.java
+0
-1
NoManagementSampleActuatorApplicationTests.java
.../actuator/NoManagementSampleActuatorApplicationTests.java
+0
-1
SampleActuatorApplicationTests.java
.../java/sample/actuator/SampleActuatorApplicationTests.java
+5
-6
ShutdownSampleActuatorApplicationTests.java
...mple/actuator/ShutdownSampleActuatorApplicationTests.java
+0
-1
UnsecureManagementSampleActuatorApplicationTests.java
...tor/UnsecureManagementSampleActuatorApplicationTests.java
+4
-5
UnsecureSampleActuatorApplicationTests.java
...mple/actuator/UnsecureSampleActuatorApplicationTests.java
+0
-1
SampleAopApplication.java
...le-aop/src/main/java/sample/aop/SampleAopApplication.java
+2
-1
SampleAopApplicationTests.java
...p/src/test/java/sample/aop/SampleAopApplicationTests.java
+0
-1
CityRepository.java
...src/main/java/sample/data/jpa/service/CityRepository.java
+2
-1
CityService.java
...pa/src/main/java/sample/data/jpa/service/CityService.java
+3
-2
CityServiceImpl.java
...rc/main/java/sample/data/jpa/service/CityServiceImpl.java
+3
-2
HotelService.java
...a/src/main/java/sample/data/jpa/service/HotelService.java
+3
-2
HotelServiceImpl.java
...c/main/java/sample/data/jpa/service/HotelServiceImpl.java
+6
-5
ReviewRepository.java
...c/main/java/sample/data/jpa/service/ReviewRepository.java
+3
-2
SampleController.java
...a/src/main/java/sample/data/jpa/web/SampleController.java
+2
-1
SampleDataJpaApplicationTests.java
...t/java/sample/data/jpa/SampleDataJpaApplicationTests.java
+4
-4
CityRepositoryIntegrationTests.java
...mple/data/jpa/service/CityRepositoryIntegrationTests.java
+7
-6
HotelRepositoryIntegrationTests.java
...ple/data/jpa/service/HotelRepositoryIntegrationTests.java
+11
-10
SampleMongoApplicationTests.java
...t/java/sample/data/mongo/SampleMongoApplicationTests.java
+2
-2
SampleIntegrationApplicationTests.java
...tegration/consumer/SampleIntegrationApplicationTests.java
+3
-2
SampleController.java
...etty/src/main/java/sample/jetty/web/SampleController.java
+2
-1
SampleProfileApplication.java
...rc/main/java/sample/profile/SampleProfileApplication.java
+2
-1
SampleSecureApplicationTests.java
...test/java/sample/secure/SampleSecureApplicationTests.java
+2
-2
SampleServletApplicationTests.java
...st/java/sample/servlet/SampleServletApplicationTests.java
+2
-2
SampleSimpleApplication.java
.../src/main/java/sample/simple/SampleSimpleApplication.java
+2
-1
SampleController.java
...cat/src/main/java/sample/tomcat/web/SampleController.java
+2
-1
NonAutoConfigurationSampleTomcatApplicationTests.java
...cat/NonAutoConfigurationSampleTomcatApplicationTests.java
+3
-2
SampleWebJspApplicationTests.java
...rc/test/java/sample/jsp/SampleWebJspApplicationTests.java
+2
-1
SampleSecureApplicationTests.java
...test/java/sample/ops/ui/SampleSecureApplicationTests.java
+3
-3
SampleWebStaticApplicationTests.java
.../test/java/sample/ui/SampleWebStaticApplicationTests.java
+2
-1
MessageController.java
...web-ui/src/main/java/sample/ui/mvc/MessageController.java
+3
-2
MessageControllerWebTests.java
...ui/src/test/java/sample/ui/MessageControllerWebTests.java
+7
-7
SampleWebSocketsApplication.java
...samples/websocket/config/SampleWebSocketsApplication.java
+6
-5
Location.java
...ocket/src/main/java/samples/websocket/snake/Location.java
+8
-4
SampleWebSocketsApplicationTests.java
...ples/websocket/echo/SampleWebSocketsApplicationTests.java
+5
-4
SampleSpringXmlApplication.java
.../src/main/java/sample/xml/SampleSpringXmlApplication.java
+1
-0
ProjectLibraries.java
...rg/springframework/boot/gradle/task/ProjectLibraries.java
+3
-1
Repackage.java
...roovy/org/springframework/boot/gradle/task/Repackage.java
+8
-5
RunApp.java
...n/groovy/org/springframework/boot/gradle/task/RunApp.java
+6
-2
LayoutsTests.java
...a/org/springframework/boot/loader/tools/LayoutsTests.java
+0
-3
PropertiesMergingResourceTransformerTests.java
...boot/maven/PropertiesMergingResourceTransformerTests.java
+0
-1
RelaxedNames.java
...main/java/org/springframework/boot/bind/RelaxedNames.java
+2
-1
AnsiOutputTest.java
...st/java/org/springframework/boot/ansi/AnsiOutputTest.java
+2
-4
ArrayDocumentMatcherTests.java
...pringframework/boot/config/ArrayDocumentMatcherTests.java
+0
-1
MimeMappingsTests.java
...ingframework/boot/context/embedded/MimeMappingsTests.java
+0
-1
JettyEmbeddedServletContainerFactoryTests.java
...dded/jetty/JettyEmbeddedServletContainerFactoryTests.java
+0
-2
ColorConverterTests.java
...ngframework/boot/logging/logback/ColorConverterTests.java
+1
-1
No files found.
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventTests.java
View file @
01607605
...
@@ -19,7 +19,6 @@ package org.springframework.boot.actuate.audit;
...
@@ -19,7 +19,6 @@ package org.springframework.boot.actuate.audit;
import
java.util.Collections
;
import
java.util.Collections
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.audit.AuditEvent
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/InMemoryAuditEventRepositoryTests.java
View file @
01607605
...
@@ -19,8 +19,6 @@ package org.springframework.boot.actuate.audit;
...
@@ -19,8 +19,6 @@ package org.springframework.boot.actuate.audit;
import
java.util.Date
;
import
java.util.Date
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.audit.AuditEvent
;
import
org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/listener/AuditListenerTests.java
View file @
01607605
...
@@ -21,8 +21,6 @@ import java.util.Collections;
...
@@ -21,8 +21,6 @@ import java.util.Collections;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.audit.AuditEvent
;
import
org.springframework.boot.actuate.audit.AuditEvent
;
import
org.springframework.boot.actuate.audit.AuditEventRepository
;
import
org.springframework.boot.actuate.audit.AuditEventRepository
;
import
org.springframework.boot.actuate.audit.listener.AuditApplicationEvent
;
import
org.springframework.boot.actuate.audit.listener.AuditListener
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
verify
;
import
static
org
.
mockito
.
Mockito
.
verify
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/AuditAutoConfigurationTests.java
View file @
01607605
...
@@ -19,7 +19,6 @@ package org.springframework.boot.actuate.autoconfigure;
...
@@ -19,7 +19,6 @@ package org.springframework.boot.actuate.autoconfigure;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.audit.AuditEventRepository
;
import
org.springframework.boot.actuate.audit.AuditEventRepository
;
import
org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
;
import
org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
;
import
org.springframework.boot.actuate.autoconfigure.AuditAutoConfiguration
;
import
org.springframework.boot.actuate.security.AuthenticationAuditListener
;
import
org.springframework.boot.actuate.security.AuthenticationAuditListener
;
import
org.springframework.boot.actuate.security.AuthorizationAuditListener
;
import
org.springframework.boot.actuate.security.AuthorizationAuditListener
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementServerPropertiesAutoConfigurationTests.java
View file @
01607605
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
;
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration
;
import
org.springframework.boot.actuate.properties.ManagementServerProperties
;
import
org.springframework.boot.actuate.properties.ManagementServerProperties
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/MetricFilterAutoConfigurationTests.java
View file @
01607605
...
@@ -22,7 +22,6 @@ import javax.servlet.FilterChain;
...
@@ -22,7 +22,6 @@ import javax.servlet.FilterChain;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.stubbing.Answer
;
import
org.mockito.stubbing.Answer
;
import
org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration
;
import
org.springframework.boot.actuate.metrics.CounterService
;
import
org.springframework.boot.actuate.metrics.CounterService
;
import
org.springframework.boot.actuate.metrics.GaugeService
;
import
org.springframework.boot.actuate.metrics.GaugeService
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/TraceRepositoryAutoConfigurationTests.java
View file @
01607605
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
;
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.autoconfigure.TraceRepositoryAutoConfiguration
;
import
org.springframework.boot.actuate.trace.InMemoryTraceRepository
;
import
org.springframework.boot.actuate.trace.InMemoryTraceRepository
;
import
org.springframework.boot.actuate.trace.TraceRepository
;
import
org.springframework.boot.actuate.trace.TraceRepository
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/TraceWebFilterAutoConfigurationTest.java
View file @
01607605
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
;
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.autoconfigure.TraceRepositoryAutoConfiguration
;
import
org.springframework.boot.actuate.autoconfigure.TraceWebFilterAutoConfiguration
;
import
org.springframework.boot.actuate.trace.WebRequestTraceFilter
;
import
org.springframework.boot.actuate.trace.WebRequestTraceFilter
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java
View file @
01607605
...
@@ -24,8 +24,8 @@ import org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfigur
...
@@ -24,8 +24,8 @@ import org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfigur
import
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration
;
import
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration
;
import
org.springframework.boot.actuate.endpoint.EnvironmentEndpoint
;
import
org.springframework.boot.actuate.endpoint.EnvironmentEndpoint
;
import
org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpointTests.TestConfiguration
;
import
org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpointTests.TestConfiguration
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaEndpointTests.java
View file @
01607605
...
@@ -27,8 +27,8 @@ import org.springframework.boot.actuate.autoconfigure.JolokiaAutoConfiguration;
...
@@ -27,8 +27,8 @@ import org.springframework.boot.actuate.autoconfigure.JolokiaAutoConfiguration;
import
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration
;
import
org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration
;
import
org.springframework.boot.actuate.endpoint.mvc.JolokiaEndpointTests.Config
;
import
org.springframework.boot.actuate.endpoint.mvc.JolokiaEndpointTests.Config
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java
View file @
01607605
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
actuate
.
health
;
package
org
.
springframework
.
boot
.
actuate
.
health
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.health.VanillaHealthIndicator
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/repository/InMemoryMetricRepositoryTests.java
View file @
01607605
...
@@ -20,7 +20,6 @@ import java.util.Date;
...
@@ -20,7 +20,6 @@ import java.util.Date;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.metrics.Metric
;
import
org.springframework.boot.actuate.metrics.Metric
;
import
org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository
;
import
org.springframework.boot.actuate.metrics.writer.Delta
;
import
org.springframework.boot.actuate.metrics.writer.Delta
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/writer/DefaultCounterServiceTests.java
View file @
01607605
...
@@ -18,9 +18,6 @@ package org.springframework.boot.actuate.metrics.writer;
...
@@ -18,9 +18,6 @@ package org.springframework.boot.actuate.metrics.writer;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.mockito.ArgumentCaptor
;
import
org.mockito.ArgumentCaptor
;
import
org.springframework.boot.actuate.metrics.writer.DefaultCounterService
;
import
org.springframework.boot.actuate.metrics.writer.Delta
;
import
org.springframework.boot.actuate.metrics.writer.MetricWriter
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/InMemoryTraceRepositoryTests.java
View file @
01607605
...
@@ -20,8 +20,6 @@ import java.util.Collections;
...
@@ -20,8 +20,6 @@ import java.util.Collections;
import
java.util.List
;
import
java.util.List
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.actuate.trace.InMemoryTraceRepository
;
import
org.springframework.boot.actuate.trace.Trace
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationTests.java
View file @
01607605
...
@@ -21,8 +21,6 @@ import java.util.Locale;
...
@@ -21,8 +21,6 @@ import java.util.Locale;
import
java.util.Map
;
import
java.util.Map
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.MessageSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.MapPropertySource
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
View file @
01607605
...
@@ -39,8 +39,8 @@ import org.springframework.batch.core.launch.JobLauncher;
...
@@ -39,8 +39,8 @@ import org.springframework.batch.core.launch.JobLauncher;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.batch.core.repository.JobRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.test.City
;
import
org.springframework.boot.autoconfigure.orm.jpa.test.City
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGeneratorTests.java
View file @
01607605
...
@@ -19,8 +19,6 @@ package org.springframework.boot.autoconfigure.batch;
...
@@ -19,8 +19,6 @@ package org.springframework.boot.autoconfigure.batch;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.batch.core.BatchStatus
;
import
org.springframework.batch.core.BatchStatus
;
import
org.springframework.batch.core.JobExecution
;
import
org.springframework.batch.core.JobExecution
;
import
org.springframework.boot.autoconfigure.batch.JobExecutionEvent
;
import
org.springframework.boot.autoconfigure.batch.JobExecutionExitCodeGenerator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/JpaRepositoriesAutoConfigurationTests.java
View file @
01607605
...
@@ -19,8 +19,8 @@ package org.springframework.boot.autoconfigure.data;
...
@@ -19,8 +19,8 @@ package org.springframework.boot.autoconfigure.data;
import
javax.persistence.EntityManagerFactory
;
import
javax.persistence.EntityManagerFactory
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.jpa.City
;
import
org.springframework.boot.autoconfigure.data.jpa.City
;
import
org.springframework.boot.autoconfigure.data.jpa.CityRepository
;
import
org.springframework.boot.autoconfigure.data.jpa.CityRepository
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/JpaWebAutoConfigurationTests.java
View file @
01607605
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
data
;
package
org
.
springframework
.
boot
.
autoconfigure
.
data
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.jpa.City
;
import
org.springframework.boot.autoconfigure.data.jpa.City
;
import
org.springframework.boot.autoconfigure.data.jpa.CityRepository
;
import
org.springframework.boot.autoconfigure.data.jpa.CityRepository
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/MongoRepositoriesAutoConfigurationTests.java
View file @
01607605
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
data
;
package
org
.
springframework
.
boot
.
autoconfigure
.
data
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.data.mongo.City
;
import
org.springframework.boot.autoconfigure.data.mongo.City
;
import
org.springframework.boot.autoconfigure.data.mongo.CityRepository
;
import
org.springframework.boot.autoconfigure.data.mongo.CityRepository
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/CommonsDataSourceConfigurationTests.java
View file @
01607605
...
@@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.jdbc;
...
@@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.jdbc;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.jdbc.CommonsDataSourceConfiguration
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDataSourceConfigurationTests.java
View file @
01607605
...
@@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.jdbc;
...
@@ -19,7 +19,6 @@ package org.springframework.boot.autoconfigure.jdbc;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfigurationTests.java
View file @
01607605
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
reactor
;
package
org
.
springframework
.
boot
.
autoconfigure
.
reactor
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
reactor.core.Reactor
;
import
reactor.core.Reactor
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
/**
/**
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java
View file @
01607605
...
@@ -19,9 +19,9 @@ package org.springframework.boot.autoconfigure.security;
...
@@ -19,9 +19,9 @@ package org.springframework.boot.autoconfigure.security;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplicationBeforeRefreshEvent
;
import
org.springframework.boot.SpringApplicationBeforeRefreshEvent
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer
;
import
org.springframework.boot.autoconfigure.AutoConfigurationReportLoggingInitializer
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.TestAutoConfigurationPackage
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.test.City
;
import
org.springframework.boot.autoconfigure.orm.jpa.test.City
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityPropertiesTests.java
View file @
01607605
...
@@ -22,7 +22,6 @@ import java.util.Map;
...
@@ -22,7 +22,6 @@ import java.util.Map;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.MutablePropertyValues
;
import
org.springframework.beans.MutablePropertyValues
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.boot.bind.RelaxedDataBinder
;
import
org.springframework.boot.bind.RelaxedDataBinder
;
import
org.springframework.core.convert.support.DefaultConversionService
;
import
org.springframework.core.convert.support.DefaultConversionService
;
...
...
spring-boot-cli/src/it/java/org/springframework/boot/cli/infrastructure/CommandLineInvoker.java
View file @
01607605
...
@@ -132,6 +132,7 @@ public final class CommandLineInvoker {
...
@@ -132,6 +132,7 @@ public final class CommandLineInvoker {
this
.
output
=
buffer
;
this
.
output
=
buffer
;
}
}
@Override
public
void
run
()
{
public
void
run
()
{
int
read
;
int
read
;
try
{
try
{
...
...
spring-boot-samples/spring-boot-sample-actuator-noweb/src/test/java/sample/actuator/SampleActuatorNoWebApplicationTests.java
View file @
01607605
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
package
sample
.
actuator
;
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Future
;
import
java.util.concurrent.Future
;
...
@@ -30,6 +28,8 @@ import org.springframework.boot.SpringApplication;
...
@@ -30,6 +28,8 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.actuate.endpoint.MetricsEndpoint
;
import
org.springframework.boot.actuate.endpoint.MetricsEndpoint
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
/**
/**
* Basic integration tests for service demo application.
* Basic integration tests for service demo application.
*
*
...
...
spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java
View file @
01607605
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
package
sample
.
actuator
.
ui
;
package
sample
.
actuator
.
ui
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
...
@@ -29,7 +27,6 @@ import org.junit.AfterClass;
...
@@ -29,7 +27,6 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.actuator.ui.SampleActuatorUiApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
...
@@ -37,6 +34,8 @@ import org.springframework.http.client.ClientHttpResponse;
...
@@ -37,6 +34,8 @@ import org.springframework.http.client.ClientHttpResponse;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
/**
/**
* Integration tests for separate management and main service ports.
* Integration tests for separate management and main service ports.
*
*
...
...
spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java
View file @
01607605
...
@@ -28,7 +28,6 @@ import org.junit.AfterClass;
...
@@ -28,7 +28,6 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.actuator.ui.SampleActuatorUiApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/EndpointsPropertiesSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -28,7 +28,6 @@ import java.util.concurrent.TimeUnit;
...
@@ -28,7 +28,6 @@ import java.util.concurrent.TimeUnit;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
package
sample
.
actuator
;
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -32,7 +30,6 @@ import org.junit.BeforeClass;
...
@@ -32,7 +30,6 @@ import org.junit.BeforeClass;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
@@ -46,6 +43,8 @@ import org.springframework.security.crypto.codec.Base64;
...
@@ -46,6 +43,8 @@ import org.springframework.security.crypto.codec.Base64;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
/**
/**
* Integration tests for separate management and main service ports.
* Integration tests for separate management and main service ports.
*
*
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -27,7 +27,6 @@ import org.junit.AfterClass;
...
@@ -27,7 +27,6 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -30,7 +30,6 @@ import org.junit.BeforeClass;
...
@@ -30,7 +30,6 @@ import org.junit.BeforeClass;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java
View file @
01607605
...
@@ -16,11 +16,6 @@
...
@@ -16,11 +16,6 @@
package
sample
.
actuator
;
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -36,7 +31,6 @@ import org.junit.BeforeClass;
...
@@ -36,7 +31,6 @@ import org.junit.BeforeClass;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
...
@@ -54,6 +48,11 @@ import org.springframework.security.crypto.codec.Base64;
...
@@ -54,6 +48,11 @@ import org.springframework.security.crypto.codec.Base64;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
* Basic integration tests for service demo application.
* Basic integration tests for service demo application.
*
*
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -30,7 +30,6 @@ import org.junit.BeforeClass;
...
@@ -30,7 +30,6 @@ import org.junit.BeforeClass;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpRequest
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/UnsecureManagementSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -16,10 +16,6 @@
...
@@ -16,10 +16,6 @@
package
sample
.
actuator
;
package
sample
.
actuator
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
...
@@ -31,7 +27,6 @@ import org.junit.AfterClass;
...
@@ -31,7 +27,6 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
...
@@ -39,6 +34,10 @@ import org.springframework.http.client.ClientHttpResponse;
...
@@ -39,6 +34,10 @@ import org.springframework.http.client.ClientHttpResponse;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
* Integration tests for unsecured service endpoints (even with Spring Security on
* Integration tests for unsecured service endpoints (even with Spring Security on
* classpath).
* classpath).
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/UnsecureSampleActuatorApplicationTests.java
View file @
01607605
...
@@ -27,7 +27,6 @@ import org.junit.AfterClass;
...
@@ -27,7 +27,6 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.actuator.SampleActuatorApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
...
...
spring-boot-samples/spring-boot-sample-aop/src/main/java/sample/aop/SampleAopApplication.java
View file @
01607605
...
@@ -20,10 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -20,10 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
sample.aop.service.HelloWorldService
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
sample.aop.service.HelloWorldService
;
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@ComponentScan
@ComponentScan
...
...
spring-boot-samples/spring-boot-sample-aop/src/test/java/sample/aop/SampleAopApplicationTests.java
View file @
01607605
...
@@ -22,7 +22,6 @@ import org.junit.Rule;
...
@@ -22,7 +22,6 @@ import org.junit.Rule;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.test.OutputCapture
;
import
org.springframework.boot.test.OutputCapture
;
import
sample.aop.SampleAopApplication
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/service/CityRepository.java
View file @
01607605
...
@@ -16,11 +16,12 @@
...
@@ -16,11 +16,12 @@
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
sample.data.jpa.domain.City
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.repository.Repository
;
import
org.springframework.data.repository.Repository
;
import
sample.data.jpa.domain.City
;
interface
CityRepository
extends
Repository
<
City
,
Long
>
{
interface
CityRepository
extends
Repository
<
City
,
Long
>
{
Page
<
City
>
findAll
(
Pageable
pageable
);
Page
<
City
>
findAll
(
Pageable
pageable
);
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/service/CityService.java
View file @
01607605
...
@@ -16,11 +16,12 @@
...
@@ -16,11 +16,12 @@
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.HotelSummary
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.HotelSummary
;
public
interface
CityService
{
public
interface
CityService
{
Page
<
City
>
findCities
(
CitySearchCriteria
criteria
,
Pageable
pageable
);
Page
<
City
>
findCities
(
CitySearchCriteria
criteria
,
Pageable
pageable
);
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/service/CityServiceImpl.java
View file @
01607605
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.HotelSummary
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -26,6 +24,9 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -26,6 +24,9 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.HotelSummary
;
@Component
(
"cityService"
)
@Component
(
"cityService"
)
@Transactional
@Transactional
class
CityServiceImpl
implements
CityService
{
class
CityServiceImpl
implements
CityService
{
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/service/HotelService.java
View file @
01607605
...
@@ -16,12 +16,13 @@
...
@@ -16,12 +16,13 @@
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Review
;
import
sample.data.jpa.domain.Review
;
import
sample.data.jpa.domain.ReviewDetails
;
import
sample.data.jpa.domain.ReviewDetails
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
public
interface
HotelService
{
public
interface
HotelService
{
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/service/HotelServiceImpl.java
View file @
01607605
...
@@ -21,17 +21,18 @@ import java.util.List;
...
@@ -21,17 +21,18 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Rating
;
import
sample.data.jpa.domain.Rating
;
import
sample.data.jpa.domain.RatingCount
;
import
sample.data.jpa.domain.RatingCount
;
import
sample.data.jpa.domain.Review
;
import
sample.data.jpa.domain.Review
;
import
sample.data.jpa.domain.ReviewDetails
;
import
sample.data.jpa.domain.ReviewDetails
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
@Component
(
"hotelService"
)
@Component
(
"hotelService"
)
@Transactional
@Transactional
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/service/ReviewRepository.java
View file @
01607605
...
@@ -16,12 +16,13 @@
...
@@ -16,12 +16,13 @@
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Review
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.repository.Repository
;
import
org.springframework.data.repository.Repository
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Review
;
interface
ReviewRepository
extends
Repository
<
Review
,
Long
>
{
interface
ReviewRepository
extends
Repository
<
Review
,
Long
>
{
Page
<
Review
>
findByHotel
(
Hotel
hotel
,
Pageable
pageable
);
Page
<
Review
>
findByHotel
(
Hotel
hotel
,
Pageable
pageable
);
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/main/java/sample/data/jpa/web/SampleController.java
View file @
01607605
...
@@ -17,12 +17,13 @@
...
@@ -17,12 +17,13 @@
package
sample
.
data
.
jpa
.
web
;
package
sample
.
data
.
jpa
.
web
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sample.data.jpa.service.CityService
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
sample.data.jpa.service.CityService
;
@Controller
@Controller
public
class
SampleController
{
public
class
SampleController
{
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java
View file @
01607605
package
sample
.
data
.
jpa
;
package
sample
.
data
.
jpa
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
content
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
status
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
...
@@ -16,6 +12,10 @@ import org.springframework.test.web.servlet.MockMvc;
...
@@ -16,6 +12,10 @@ import org.springframework.test.web.servlet.MockMvc;
import
org.springframework.test.web.servlet.setup.MockMvcBuilders
;
import
org.springframework.test.web.servlet.setup.MockMvcBuilders
;
import
org.springframework.web.context.WebApplicationContext
;
import
org.springframework.web.context.WebApplicationContext
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
content
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
status
;
/**
/**
* Integration test to run the application.
* Integration test to run the application.
*
*
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/CityRepositoryIntegrationTests.java
View file @
01607605
...
@@ -15,20 +15,21 @@
...
@@ -15,20 +15,21 @@
*/
*/
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
static
org
.
hamcrest
.
Matchers
.
greaterThan
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sample.data.jpa.SampleDataJpaApplication
;
import
sample.data.jpa.domain.City
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
sample.data.jpa.SampleDataJpaApplication
;
import
sample.data.jpa.domain.City
;
import
static
org
.
hamcrest
.
Matchers
.
greaterThan
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
/**
/**
* Integration tests for {@link CityRepository}.
* Integration tests for {@link CityRepository}.
*
*
...
...
spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/HotelRepositoryIntegrationTests.java
View file @
01607605
...
@@ -15,27 +15,28 @@
...
@@ -15,27 +15,28 @@
*/
*/
package
sample
.
data
.
jpa
.
service
;
package
sample
.
data
.
jpa
.
service
;
import
static
org
.
hamcrest
.
Matchers
.
greaterThan
;
import
static
org
.
hamcrest
.
Matchers
.
hasSize
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
java.util.List
;
import
java.util.List
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Sort.Direction
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
sample.data.jpa.SampleDataJpaApplication
;
import
sample.data.jpa.SampleDataJpaApplication
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.City
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.Hotel
;
import
sample.data.jpa.domain.HotelSummary
;
import
sample.data.jpa.domain.HotelSummary
;
import
sample.data.jpa.domain.Rating
;
import
sample.data.jpa.domain.Rating
;
import
sample.data.jpa.domain.RatingCount
;
import
sample.data.jpa.domain.RatingCount
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.data.domain.Page
;
import
static
org
.
hamcrest
.
Matchers
.
greaterThan
;
import
org.springframework.data.domain.PageRequest
;
import
static
org
.
hamcrest
.
Matchers
.
hasSize
;
import
org.springframework.data.domain.Sort.Direction
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
static
org
.
junit
.
Assert
.
assertThat
;
/**
/**
* Integration tests for {@link HotelRepository}.
* Integration tests for {@link HotelRepository}.
...
...
spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/sample/data/mongo/SampleMongoApplicationTests.java
View file @
01607605
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
package
sample
.
data
.
mongo
;
package
sample
.
data
.
mongo
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.IOException
;
import
java.io.IOException
;
import
org.junit.Rule
;
import
org.junit.Rule
;
...
@@ -25,6 +23,8 @@ import org.junit.Test;
...
@@ -25,6 +23,8 @@ import org.junit.Test;
import
org.springframework.boot.test.OutputCapture
;
import
org.springframework.boot.test.OutputCapture
;
import
org.springframework.core.NestedCheckedException
;
import
org.springframework.core.NestedCheckedException
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
* Tests for {@link SampleMongoApplication}.
* Tests for {@link SampleMongoApplication}.
*
*
...
...
spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java
View file @
01607605
...
@@ -25,14 +25,15 @@ import org.junit.AfterClass;
...
@@ -25,14 +25,15 @@ import org.junit.AfterClass;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.integration.SampleIntegrationApplication
;
import
sample.integration.producer.ProducerApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.support.ResourcePatternUtils
;
import
org.springframework.core.io.support.ResourcePatternUtils
;
import
org.springframework.util.StreamUtils
;
import
org.springframework.util.StreamUtils
;
import
sample.integration.SampleIntegrationApplication
;
import
sample.integration.producer.ProducerApplication
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
...
...
spring-boot-samples/spring-boot-sample-jetty/src/main/java/sample/jetty/web/SampleController.java
View file @
01607605
...
@@ -17,11 +17,12 @@
...
@@ -17,11 +17,12 @@
package
sample
.
jetty
.
web
;
package
sample
.
jetty
.
web
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sample.jetty.service.HelloWorldService
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
sample.jetty.service.HelloWorldService
;
@Controller
@Controller
public
class
SampleController
{
public
class
SampleController
{
...
...
spring-boot-samples/spring-boot-sample-profile/src/main/java/sample/profile/SampleProfileApplication.java
View file @
01607605
...
@@ -20,10 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -20,10 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
sample.profile.service.MessageService
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
sample.profile.service.MessageService
;
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@ComponentScan
@ComponentScan
...
...
spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java
View file @
01607605
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
package
sample
.
secure
;
package
sample
.
secure
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
...
@@ -36,6 +34,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
...
@@ -36,6 +34,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import
sample.secure.SampleSecureApplicationTests.TestConfiguration
;
import
sample.secure.SampleSecureApplicationTests.TestConfiguration
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
/**
/**
* Basic integration tests for demo application.
* Basic integration tests for demo application.
*
*
...
...
spring-boot-samples/spring-boot-sample-servlet/src/test/java/sample/servlet/SampleServletApplicationTests.java
View file @
01607605
package
sample
.
servlet
;
package
sample
.
servlet
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -28,6 +26,8 @@ import org.springframework.security.crypto.codec.Base64;
...
@@ -28,6 +26,8 @@ import org.springframework.security.crypto.codec.Base64;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
/**
/**
* Basic integration tests for demo application.
* Basic integration tests for demo application.
*
*
...
...
spring-boot-samples/spring-boot-sample-simple/src/main/java/sample/simple/SampleSimpleApplication.java
View file @
01607605
...
@@ -20,10 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -20,10 +20,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
sample.simple.service.HelloWorldService
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
sample.simple.service.HelloWorldService
;
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@ComponentScan
@ComponentScan
...
...
spring-boot-samples/spring-boot-sample-tomcat/src/main/java/sample/tomcat/web/SampleController.java
View file @
01607605
...
@@ -17,11 +17,12 @@
...
@@ -17,11 +17,12 @@
package
sample
.
tomcat
.
web
;
package
sample
.
tomcat
.
web
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sample.tomcat.service.HelloWorldService
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
sample.tomcat.service.HelloWorldService
;
@Controller
@Controller
public
class
SampleController
{
public
class
SampleController
{
...
...
spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java
View file @
01607605
...
@@ -31,8 +31,6 @@ import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfigura
...
@@ -31,8 +31,6 @@ import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfigura
import
org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
;
import
sample.tomcat.service.HelloWorldService
;
import
sample.tomcat.web.SampleController
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
@@ -43,6 +41,9 @@ import org.springframework.http.client.ClientHttpResponse;
...
@@ -43,6 +41,9 @@ import org.springframework.http.client.ClientHttpResponse;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
sample.tomcat.service.HelloWorldService
;
import
sample.tomcat.web.SampleController
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
/**
/**
...
...
spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java
View file @
01607605
...
@@ -17,7 +17,8 @@ import org.springframework.http.client.ClientHttpResponse;
...
@@ -17,7 +17,8 @@ import org.springframework.http.client.ClientHttpResponse;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
* Basic integration tests for JSP application.
* Basic integration tests for JSP application.
...
...
spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ops/ui/SampleSecureApplicationTests.java
View file @
01607605
...
@@ -16,9 +16,6 @@
...
@@ -16,9 +16,6 @@
package
sample
.
ops
.
ui
;
package
sample
.
ops
.
ui
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
...
@@ -41,6 +38,9 @@ import org.springframework.http.client.ClientHttpResponse;
...
@@ -41,6 +38,9 @@ import org.springframework.http.client.ClientHttpResponse;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
/**
* Basic integration tests for demo application.
* Basic integration tests for demo application.
*
*
...
...
spring-boot-samples/spring-boot-sample-web-static/src/test/java/sample/ui/SampleWebStaticApplicationTests.java
View file @
01607605
...
@@ -63,7 +63,8 @@ public class SampleWebStaticApplicationTests {
...
@@ -63,7 +63,8 @@ public class SampleWebStaticApplicationTests {
@Test
@Test
public
void
testCss
()
throws
Exception
{
public
void
testCss
()
throws
Exception
{
ResponseEntity
<
String
>
entity
=
getRestTemplate
().
getForEntity
(
ResponseEntity
<
String
>
entity
=
getRestTemplate
().
getForEntity
(
"http://localhost:8080/webjars/bootstrap/3.0.3/css/bootstrap.min.css"
,
String
.
class
);
"http://localhost:8080/webjars/bootstrap/3.0.3/css/bootstrap.min.css"
,
String
.
class
);
assertEquals
(
HttpStatus
.
OK
,
entity
.
getStatusCode
());
assertEquals
(
HttpStatus
.
OK
,
entity
.
getStatusCode
());
assertTrue
(
"Wrong body:\n"
+
entity
.
getBody
(),
entity
.
getBody
().
contains
(
"body"
));
assertTrue
(
"Wrong body:\n"
+
entity
.
getBody
(),
entity
.
getBody
().
contains
(
"body"
));
assertEquals
(
"Wrong content type:\n"
+
entity
.
getHeaders
().
getContentType
(),
assertEquals
(
"Wrong content type:\n"
+
entity
.
getHeaders
().
getContentType
(),
...
...
spring-boot-samples/spring-boot-sample-web-ui/src/main/java/sample/ui/mvc/MessageController.java
View file @
01607605
...
@@ -16,8 +16,6 @@ package sample.ui.mvc;
...
@@ -16,8 +16,6 @@ package sample.ui.mvc;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
sample.ui.Message
;
import
sample.ui.MessageRepository
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
...
@@ -27,6 +25,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -27,6 +25,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.mvc.support.RedirectAttributes
;
import
org.springframework.web.servlet.mvc.support.RedirectAttributes
;
import
sample.ui.Message
;
import
sample.ui.MessageRepository
;
/**
/**
* @author Rob Winch
* @author Rob Winch
*/
*/
...
...
spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/ui/MessageControllerWebTests.java
View file @
01607605
package
sample
.
ui
;
package
sample
.
ui
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
post
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
content
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
header
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
status
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
org.hamcrest.Description
;
import
org.hamcrest.Description
;
...
@@ -22,6 +15,13 @@ import org.springframework.test.web.servlet.MockMvc;
...
@@ -22,6 +15,13 @@ import org.springframework.test.web.servlet.MockMvc;
import
org.springframework.test.web.servlet.setup.MockMvcBuilders
;
import
org.springframework.test.web.servlet.setup.MockMvcBuilders
;
import
org.springframework.web.context.WebApplicationContext
;
import
org.springframework.web.context.WebApplicationContext
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
post
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
content
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
header
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
status
;
/**
/**
* A Basic Spring MVC Test for the Sample Controller"
* A Basic Spring MVC Test for the Sample Controller"
*
*
...
...
spring-boot-samples/spring-boot-sample-websocket/src/main/java/samples/websocket/config/SampleWebSocketsApplication.java
View file @
01607605
...
@@ -19,17 +19,18 @@ package samples.websocket.config;
...
@@ -19,17 +19,18 @@ package samples.websocket.config;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.SpringBootServletInitializer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.socket.WebSocketHandler
;
import
org.springframework.web.socket.handler.PerConnectionWebSocketHandler
;
import
samples.websocket.client.GreetingService
;
import
samples.websocket.client.GreetingService
;
import
samples.websocket.client.SimpleGreetingService
;
import
samples.websocket.client.SimpleGreetingService
;
import
samples.websocket.echo.DefaultEchoService
;
import
samples.websocket.echo.DefaultEchoService
;
import
samples.websocket.echo.EchoService
;
import
samples.websocket.echo.EchoService
;
import
samples.websocket.echo.EchoWebSocketHandler
;
import
samples.websocket.echo.EchoWebSocketHandler
;
import
samples.websocket.snake.SnakeWebSocketHandler
;
import
samples.websocket.snake.SnakeWebSocketHandler
;
import
org.springframework.boot.web.SpringBootServletInitializer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.socket.WebSocketHandler
;
import
org.springframework.web.socket.handler.PerConnectionWebSocketHandler
;
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
...
...
spring-boot-samples/spring-boot-sample-websocket/src/main/java/samples/websocket/snake/Location.java
View file @
01607605
...
@@ -49,17 +49,21 @@ public class Location {
...
@@ -49,17 +49,21 @@ public class Location {
@Override
@Override
public
boolean
equals
(
Object
o
)
{
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
if
(
this
==
o
)
{
return
true
;
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
return
false
;
}
Location
location
=
(
Location
)
o
;
Location
location
=
(
Location
)
o
;
if
(
this
.
x
!=
location
.
x
)
if
(
this
.
x
!=
location
.
x
)
{
return
false
;
return
false
;
if
(
this
.
y
!=
location
.
y
)
}
if
(
this
.
y
!=
location
.
y
)
{
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
...
...
spring-boot-samples/spring-boot-sample-websocket/src/test/java/samples/websocket/echo/SampleWebSocketsApplicationTests.java
View file @
01607605
...
@@ -29,16 +29,17 @@ import org.junit.BeforeClass;
...
@@ -29,16 +29,17 @@ import org.junit.BeforeClass;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
samples.websocket.client.GreetingService
;
import
samples.websocket.client.SimpleClientWebSocketHandler
;
import
samples.websocket.client.SimpleGreetingService
;
import
samples.websocket.config.SampleWebSocketsApplication
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.socket.client.WebSocketConnectionManager
;
import
org.springframework.web.socket.client.WebSocketConnectionManager
;
import
org.springframework.web.socket.client.standard.StandardWebSocketClient
;
import
org.springframework.web.socket.client.standard.StandardWebSocketClient
;
import
samples.websocket.client.GreetingService
;
import
samples.websocket.client.SimpleClientWebSocketHandler
;
import
samples.websocket.client.SimpleGreetingService
;
import
samples.websocket.config.SampleWebSocketsApplication
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
public
class
SampleWebSocketsApplicationTests
{
public
class
SampleWebSocketsApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-xml/src/main/java/sample/xml/SampleSpringXmlApplication.java
View file @
01607605
...
@@ -19,6 +19,7 @@ package sample.xml;
...
@@ -19,6 +19,7 @@ package sample.xml;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
sample.xml.service.HelloWorldService
;
import
sample.xml.service.HelloWorldService
;
public
class
SampleSpringXmlApplication
implements
CommandLineRunner
{
public
class
SampleSpringXmlApplication
implements
CommandLineRunner
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/ProjectLibraries.java
View file @
01607605
...
@@ -28,7 +28,7 @@ import org.springframework.boot.loader.tools.LibraryScope;
...
@@ -28,7 +28,7 @@ import org.springframework.boot.loader.tools.LibraryScope;
/**
/**
* Expose Gradle {@link Configuration}s as {@link Libraries}.
* Expose Gradle {@link Configuration}s as {@link Libraries}.
*
*
* @author Phillip Webb
* @author Phillip Webb
*/
*/
class
ProjectLibraries
implements
Libraries
{
class
ProjectLibraries
implements
Libraries
{
...
@@ -41,6 +41,7 @@ class ProjectLibraries implements Libraries {
...
@@ -41,6 +41,7 @@ class ProjectLibraries implements Libraries {
/**
/**
* Create a new {@link ProjectLibraries} instance of the specified {@link Project}.
* Create a new {@link ProjectLibraries} instance of the specified {@link Project}.
*
* @param project the gradle project
* @param project the gradle project
*/
*/
public
ProjectLibraries
(
Project
project
)
{
public
ProjectLibraries
(
Project
project
)
{
...
@@ -49,6 +50,7 @@ class ProjectLibraries implements Libraries {
...
@@ -49,6 +50,7 @@ class ProjectLibraries implements Libraries {
/**
/**
* Set the name of the provided configuration. Defaults to 'providedRuntime'.
* Set the name of the provided configuration. Defaults to 'providedRuntime'.
*
* @param providedConfigurationName the providedConfigurationName to set
* @param providedConfigurationName the providedConfigurationName to set
*/
*/
public
void
setProvidedConfigurationName
(
String
providedConfigurationName
)
{
public
void
setProvidedConfigurationName
(
String
providedConfigurationName
)
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/Repackage.java
View file @
01607605
...
@@ -30,7 +30,7 @@ import org.springframework.boot.loader.tools.Repackager;
...
@@ -30,7 +30,7 @@ import org.springframework.boot.loader.tools.Repackager;
/**
/**
* Repackage task.
* Repackage task.
*
*
* @author Phillip Webb
* @author Phillip Webb
*/
*/
public
class
Repackage
extends
DefaultTask
{
public
class
Repackage
extends
DefaultTask
{
...
@@ -78,13 +78,16 @@ public class Repackage extends DefaultTask {
...
@@ -78,13 +78,16 @@ public class Repackage extends DefaultTask {
File
file
=
archive
.
getArchivePath
();
File
file
=
archive
.
getArchivePath
();
if
(
file
.
exists
())
{
if
(
file
.
exists
())
{
Repackager
repackager
=
new
Repackager
(
file
)
{
Repackager
repackager
=
new
Repackager
(
file
)
{
protected
String
findMainMethod
(
java
.
util
.
jar
.
JarFile
source
)
throws
IOException
{
@Override
protected
String
findMainMethod
(
java
.
util
.
jar
.
JarFile
source
)
throws
IOException
{
long
startTime
=
System
.
currentTimeMillis
();
long
startTime
=
System
.
currentTimeMillis
();
try
{
try
{
return
super
.
findMainMethod
(
source
);
return
super
.
findMainMethod
(
source
);
}
}
finally
{
finally
{
long
duration
=
System
.
currentTimeMillis
()
long
duration
=
System
.
currentTimeMillis
()
-
startTime
;
-
startTime
;
if
(
duration
>
FIND_WARNING_TIMEOUT
)
{
if
(
duration
>
FIND_WARNING_TIMEOUT
)
{
getLogger
().
warn
(
getLogger
().
warn
(
"Searching for the main-class is taking some time, "
"Searching for the main-class is taking some time, "
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/RunApp.java
View file @
01607605
...
@@ -50,6 +50,8 @@ public class RunApp extends DefaultTask {
...
@@ -50,6 +50,8 @@ public class RunApp extends DefaultTask {
JavaPluginConvention
javaConvention
=
project
.
getConvention
().
getPlugin
(
JavaPluginConvention
javaConvention
=
project
.
getConvention
().
getPlugin
(
JavaPluginConvention
.
class
);
JavaPluginConvention
.
class
);
javaConvention
.
getSourceSets
().
all
(
new
Action
<
SourceSet
>()
{
javaConvention
.
getSourceSets
().
all
(
new
Action
<
SourceSet
>()
{
@Override
public
void
execute
(
SourceSet
set
)
{
public
void
execute
(
SourceSet
set
)
{
if
(
SourceSet
.
MAIN_SOURCE_SET_NAME
.
equals
(
set
.
getName
()))
{
if
(
SourceSet
.
MAIN_SOURCE_SET_NAME
.
equals
(
set
.
getName
()))
{
main
=
set
;
main
=
set
;
...
@@ -64,10 +66,11 @@ public class RunApp extends DefaultTask {
...
@@ -64,10 +66,11 @@ public class RunApp extends DefaultTask {
}
}
project
.
getTasks
().
withType
(
JavaExec
.
class
,
new
Action
<
JavaExec
>()
{
project
.
getTasks
().
withType
(
JavaExec
.
class
,
new
Action
<
JavaExec
>()
{
@Override
@Override
public
void
execute
(
JavaExec
exec
)
{
public
void
execute
(
JavaExec
exec
)
{
ArrayList
<
File
>
files
=
new
ArrayList
<
File
>(
exec
.
getClasspath
()
ArrayList
<
File
>
files
=
new
ArrayList
<
File
>(
.
getFiles
());
exec
.
getClasspath
()
.
getFiles
());
files
.
addAll
(
0
,
allResources
);
files
.
addAll
(
0
,
allResources
);
getLogger
().
info
(
"Adding classpath: "
+
allResources
);
getLogger
().
info
(
"Adding classpath: "
+
allResources
);
exec
.
setClasspath
(
new
SimpleFileCollection
(
files
));
exec
.
setClasspath
(
new
SimpleFileCollection
(
files
));
...
@@ -75,6 +78,7 @@ public class RunApp extends DefaultTask {
...
@@ -75,6 +78,7 @@ public class RunApp extends DefaultTask {
final
String
mainClass
=
findMainClass
(
main
);
final
String
mainClass
=
findMainClass
(
main
);
exec
.
setMain
(
mainClass
);
exec
.
setMain
(
mainClass
);
exec
.
getConventionMapping
().
map
(
"main"
,
new
Callable
<
String
>()
{
exec
.
getConventionMapping
().
map
(
"main"
,
new
Callable
<
String
>()
{
@Override
@Override
public
String
call
()
throws
Exception
{
public
String
call
()
throws
Exception
{
return
mainClass
;
return
mainClass
;
...
...
spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/LayoutsTests.java
View file @
01607605
...
@@ -21,9 +21,6 @@ import java.io.File;
...
@@ -21,9 +21,6 @@ import java.io.File;
import
org.junit.Rule
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.boot.loader.tools.Layout
;
import
org.springframework.boot.loader.tools.Layouts
;
import
org.springframework.boot.loader.tools.LibraryScope
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
instanceOf
;
import
static
org
.
hamcrest
.
Matchers
.
instanceOf
;
...
...
spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/PropertiesMergingResourceTransformerTests.java
View file @
01607605
...
@@ -21,7 +21,6 @@ import java.io.ByteArrayOutputStream;
...
@@ -21,7 +21,6 @@ import java.io.ByteArrayOutputStream;
import
java.util.jar.JarOutputStream
;
import
java.util.jar.JarOutputStream
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.maven.PropertiesMergingResourceTransformer
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
...
...
spring-boot/src/main/java/org/springframework/boot/bind/RelaxedNames.java
View file @
01607605
...
@@ -139,10 +139,11 @@ public final class RelaxedNames implements Iterable<String> {
...
@@ -139,10 +139,11 @@ public final class RelaxedNames implements Iterable<String> {
builder
.
append
(
builder
.
length
()
==
0
?
field
:
StringUtils
builder
.
append
(
builder
.
length
()
==
0
?
field
:
StringUtils
.
capitalize
(
field
));
.
capitalize
(
field
));
}
}
for
(
String
suffix
:
new
String
[]
{
"_"
,
"-"
,
"."
})
for
(
String
suffix
:
new
String
[]
{
"_"
,
"-"
,
"."
})
{
if
(
value
.
endsWith
(
suffix
))
{
if
(
value
.
endsWith
(
suffix
))
{
builder
.
append
(
suffix
);
builder
.
append
(
suffix
);
}
}
}
return
builder
.
toString
();
return
builder
.
toString
();
}
}
};
};
...
...
spring-boot/src/test/java/org/springframework/boot/ansi/AnsiOutputTest.java
View file @
01607605
...
@@ -19,18 +19,16 @@ package org.springframework.boot.ansi;
...
@@ -19,18 +19,16 @@ package org.springframework.boot.ansi;
import
org.junit.AfterClass
;
import
org.junit.AfterClass
;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.ansi.AnsiOutput
;
import
org.springframework.boot.ansi.AnsiOutput.Enabled
;
import
org.springframework.boot.ansi.AnsiOutput.Enabled
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
BOLD
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
BOLD
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
FAINT
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
FAINT
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
GREEN
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
GREEN
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
NORMAL
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
NORMAL
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
RED
;
import
static
org
.
springframework
.
boot
.
ansi
.
AnsiElement
.
RED
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
junit
.
Assert
.
assertThat
;
/**
/**
* Tests for {@link AnsiOutput}.
* Tests for {@link AnsiOutput}.
*
*
...
...
spring-boot/src/test/java/org/springframework/boot/config/ArrayDocumentMatcherTests.java
View file @
01607605
...
@@ -20,7 +20,6 @@ import java.io.IOException;
...
@@ -20,7 +20,6 @@ import java.io.IOException;
import
java.util.Properties
;
import
java.util.Properties
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.config.ArrayDocumentMatcher
;
import
org.springframework.boot.config.YamlProcessor.MatchStatus
;
import
org.springframework.boot.config.YamlProcessor.MatchStatus
;
import
org.springframework.core.io.ByteArrayResource
;
import
org.springframework.core.io.ByteArrayResource
;
import
org.springframework.core.io.support.PropertiesLoaderUtils
;
import
org.springframework.core.io.support.PropertiesLoaderUtils
;
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/MimeMappingsTests.java
View file @
01607605
...
@@ -29,7 +29,6 @@ import org.junit.Test;
...
@@ -29,7 +29,6 @@ import org.junit.Test;
import
org.junit.rules.ExpectedException
;
import
org.junit.rules.ExpectedException
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.stubbing.Answer
;
import
org.mockito.stubbing.Answer
;
import
org.springframework.boot.context.embedded.MimeMappings
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
nullValue
;
import
static
org
.
hamcrest
.
Matchers
.
nullValue
;
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java
View file @
01607605
...
@@ -25,8 +25,6 @@ import org.eclipse.jetty.webapp.WebAppContext;
...
@@ -25,8 +25,6 @@ import org.eclipse.jetty.webapp.WebAppContext;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.mockito.InOrder
;
import
org.mockito.InOrder
;
import
org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactoryTests
;
import
org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactoryTests
;
import
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer
;
import
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
spring-boot/src/test/java/org/springframework/boot/logging/logback/ColorConverterTests.java
View file @
01607605
...
@@ -23,10 +23,10 @@ import org.junit.Before;
...
@@ -23,10 +23,10 @@ import org.junit.Before;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.ansi.AnsiOutput
;
import
org.springframework.boot.ansi.AnsiOutput
;
import
org.springframework.boot.logging.logback.ColorConverter
;
import
ch.qos.logback.classic.Level
;
import
ch.qos.logback.classic.Level
;
import
ch.qos.logback.classic.spi.LoggingEvent
;
import
ch.qos.logback.classic.spi.LoggingEvent
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
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