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
798522d8
Commit
798522d8
authored
Feb 08, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format with Eclipse Oxygen SR2
parent
1f8bc391
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
138 additions
and
144 deletions
+138
-144
CrshAutoConfiguration.java
...ork/boot/actuate/autoconfigure/CrshAutoConfiguration.java
+1
-1
MetricsFilter.java
...ngframework/boot/actuate/autoconfigure/MetricsFilter.java
+1
-1
PublicMetricsAutoConfiguration.java
...actuate/autoconfigure/PublicMetricsAutoConfiguration.java
+3
-4
CloudFoundryActuatorAutoConfiguration.java
...e/cloudfoundry/CloudFoundryActuatorAutoConfiguration.java
+2
-3
HeapdumpMvcEndpoint.java
...mework/boot/actuate/endpoint/mvc/HeapdumpMvcEndpoint.java
+2
-2
WebRequestTraceFilter.java
...ngframework/boot/actuate/trace/WebRequestTraceFilter.java
+1
-1
MetricFilterAutoConfigurationTests.java
...ate/autoconfigure/MetricFilterAutoConfigurationTests.java
+2
-2
EndpointMBeanExporterTests.java
...boot/actuate/endpoint/jmx/EndpointMBeanExporterTests.java
+1
-1
AuditEventsMvcEndpointTests.java
...oot/actuate/endpoint/mvc/AuditEventsMvcEndpointTests.java
+2
-2
BatchAutoConfiguration.java
...work/boot/autoconfigure/batch/BatchAutoConfiguration.java
+1
-1
CacheType.java
...g/springframework/boot/autoconfigure/cache/CacheType.java
+2
-1
CouchbaseCacheConfiguration.java
...boot/autoconfigure/cache/CouchbaseCacheConfiguration.java
+2
-3
BeanTypeRegistry.java
...mework/boot/autoconfigure/condition/BeanTypeRegistry.java
+1
-1
OnBeanCondition.java
...amework/boot/autoconfigure/condition/OnBeanCondition.java
+1
-1
OnPropertyCondition.java
...ork/boot/autoconfigure/condition/OnPropertyCondition.java
+1
-1
SearchStrategy.java
...ramework/boot/autoconfigure/condition/SearchStrategy.java
+2
-1
RedisAutoConfiguration.java
...boot/autoconfigure/data/redis/RedisAutoConfiguration.java
+2
-2
FlywayAutoConfiguration.java
...rk/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
+2
-3
ActiveMQConnectionFactoryFactory.java
...figure/jms/activemq/ActiveMQConnectionFactoryFactory.java
+1
-1
ArtemisXAConnectionFactoryConfiguration.java
.../jms/artemis/ArtemisXAConnectionFactoryConfiguration.java
+1
-1
EnableOAuth2SsoCondition.java
...gure/security/oauth2/client/EnableOAuth2SsoCondition.java
+2
-2
WebMvcAutoConfiguration.java
...ework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
+4
-5
NoSuchBeanDefinitionFailureAnalyzerTests.java
...cs/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java
+8
-6
JacksonAutoConfigurationTests.java
.../autoconfigure/jackson/JacksonAutoConfigurationTests.java
+1
-1
DataSourceInitializerTests.java
...k/boot/autoconfigure/jdbc/DataSourceInitializerTests.java
+9
-10
SecurityAutoConfigurationTests.java
...utoconfigure/security/SecurityAutoConfigurationTests.java
+8
-4
BasicErrorControllerIntegrationTests.java
...toconfigure/web/BasicErrorControllerIntegrationTests.java
+1
-1
BasicErrorControllerMockMvcTests.java
...t/autoconfigure/web/BasicErrorControllerMockMvcTests.java
+1
-1
WebMvcAutoConfigurationTests.java
.../boot/autoconfigure/web/WebMvcAutoConfigurationTests.java
+1
-1
ArchiveCommand.java
...ingframework/boot/cli/command/archive/ArchiveCommand.java
+1
-1
CompilerAutoConfiguration.java
...ramework/boot/cli/compiler/CompilerAutoConfiguration.java
+1
-1
SpringSecurityCompilerAutoConfiguration.java
...utoconfigure/SpringSecurityCompilerAutoConfiguration.java
+2
-3
SpringTestCompilerAutoConfiguration.java
...er/autoconfigure/SpringTestCompilerAutoConfiguration.java
+1
-1
SpringWebsocketCompilerAutoConfiguration.java
...toconfigure/SpringWebsocketCompilerAutoConfiguration.java
+2
-3
AetherGrapeEngine.java
...gframework/boot/cli/compiler/grape/AetherGrapeEngine.java
+2
-3
DependencyResolutionContext.java
.../boot/cli/compiler/grape/DependencyResolutionContext.java
+2
-3
GroovyTemplate.java
.../java/org/springframework/boot/groovy/GroovyTemplate.java
+2
-2
TomcatLegacyCookieProcessorExample.java
.../context/embedded/TomcatLegacyCookieProcessorExample.java
+6
-5
RestTemplateProxyCustomizationExample.java
...oot/web/client/RestTemplateProxyCustomizationExample.java
+1
-1
SampleDataRestApplicationTests.java
...java/sample/data/rest/SampleDataRestApplicationTests.java
+4
-4
AnnotationCustomizableTypeExcludeFilter.java
...igure/filter/AnnotationCustomizableTypeExcludeFilter.java
+1
-1
ExampleJsonComponent.java
...oot/test/autoconfigure/json/app/ExampleJsonComponent.java
+1
-1
MockitoPostProcessor.java
...ramework/boot/test/mock/mockito/MockitoPostProcessor.java
+1
-1
TestRestTemplate.java
...pringframework/boot/test/web/client/TestRestTemplate.java
+6
-6
TestRestTemplateTests.java
...framework/boot/test/web/client/TestRestTemplateTests.java
+2
-2
JSONStringer.java
...mework/boot/configurationprocessor/json/JSONStringer.java
+2
-2
JSONTokener.java
...amework/boot/configurationprocessor/json/JSONTokener.java
+2
-2
ConfigurationMetadataAnnotationProcessorTests.java
...cessor/ConfigurationMetadataAnnotationProcessorTests.java
+8
-12
JsonMarshallerTests.java
.../configurationprocessor/metadata/JsonMarshallerTests.java
+1
-1
SpringBootPluginExtension.java
...pringframework/boot/gradle/SpringBootPluginExtension.java
+2
-1
Repackager.java
...ava/org/springframework/boot/loader/tools/Repackager.java
+1
-1
RandomAccessDataFile.java
...pringframework/boot/loader/data/RandomAccessDataFile.java
+2
-2
JarFile.java
...ain/java/org/springframework/boot/loader/jar/JarFile.java
+1
-1
JarFileArchiveTests.java
...ingframework/boot/loader/archive/JarFileArchiveTests.java
+3
-5
RepackageMojo.java
...in/java/org/springframework/boot/maven/RepackageMojo.java
+2
-1
JsonObjectDeserializer.java
.../springframework/boot/jackson/JsonObjectDeserializer.java
+1
-1
ApplicationContextHeaderFilter.java
...ework/boot/web/filter/ApplicationContextHeaderFilter.java
+1
-1
ErrorPageFilter.java
...org/springframework/boot/web/support/ErrorPageFilter.java
+4
-4
AbstractEmbeddedServletContainerFactoryTests.java
...mbedded/AbstractEmbeddedServletContainerFactoryTests.java
+3
-3
JsonObjectDeserializerTests.java
...ngframework/boot/jackson/JsonObjectDeserializerTests.java
+1
-1
NameAndAgeJsonComponent.java
...springframework/boot/jackson/NameAndAgeJsonComponent.java
+1
-1
TestServlet.java
...ramework/boot/web/servlet/testcomponents/TestServlet.java
+2
-3
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java
View file @
798522d8
...
@@ -377,7 +377,7 @@ public class CrshAutoConfiguration {
...
@@ -377,7 +377,7 @@ public class CrshAutoConfiguration {
BeanFactoryFilteringPluginDiscovery
(
ClassLoader
classLoader
,
BeanFactoryFilteringPluginDiscovery
(
ClassLoader
classLoader
,
ListableBeanFactory
beanFactory
,
String
[]
disabledPlugins
)
ListableBeanFactory
beanFactory
,
String
[]
disabledPlugins
)
throws
NullPointerException
{
throws
NullPointerException
{
super
(
classLoader
);
super
(
classLoader
);
this
.
beanFactory
=
beanFactory
;
this
.
beanFactory
=
beanFactory
;
this
.
disabledPlugins
=
disabledPlugins
;
this
.
disabledPlugins
=
disabledPlugins
;
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricsFilter.java
View file @
798522d8
...
@@ -98,7 +98,7 @@ final class MetricsFilter extends OncePerRequestFilter {
...
@@ -98,7 +98,7 @@ final class MetricsFilter extends OncePerRequestFilter {
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
chain
)
HttpServletResponse
response
,
FilterChain
chain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
StopWatch
stopWatch
=
createStopWatchIfNecessary
(
request
);
StopWatch
stopWatch
=
createStopWatchIfNecessary
(
request
);
String
path
=
new
UrlPathHelper
().
getPathWithinApplication
(
request
);
String
path
=
new
UrlPathHelper
().
getPathWithinApplication
(
request
);
int
status
=
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
();
int
status
=
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
();
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/PublicMetricsAutoConfiguration.java
View file @
798522d8
...
@@ -89,10 +89,9 @@ public class PublicMetricsAutoConfiguration {
...
@@ -89,10 +89,9 @@ public class PublicMetricsAutoConfiguration {
@Bean
@Bean
public
MetricReaderPublicMetrics
metricReaderPublicMetrics
()
{
public
MetricReaderPublicMetrics
metricReaderPublicMetrics
()
{
return
new
MetricReaderPublicMetrics
(
return
new
MetricReaderPublicMetrics
(
new
CompositeMetricReader
(
new
CompositeMetricReader
(
this
.
metricReaders
==
null
?
new
MetricReader
[
0
]
this
.
metricReaders
==
null
?
new
MetricReader
[
0
]
:
this
.
metricReaders
:
this
.
metricReaders
.
toArray
(
new
MetricReader
[
this
.
metricReaders
.
size
()])));
.
toArray
(
new
MetricReader
[
this
.
metricReaders
.
size
()])));
}
}
@Bean
@Bean
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cloudfoundry/CloudFoundryActuatorAutoConfiguration.java
View file @
798522d8
...
@@ -89,9 +89,8 @@ public class CloudFoundryActuatorAutoConfiguration {
...
@@ -89,9 +89,8 @@ public class CloudFoundryActuatorAutoConfiguration {
String
cloudControllerUrl
=
environment
.
getProperty
(
"vcap.application.cf_api"
);
String
cloudControllerUrl
=
environment
.
getProperty
(
"vcap.application.cf_api"
);
boolean
skipSslValidation
=
cloudFoundryProperties
boolean
skipSslValidation
=
cloudFoundryProperties
.
getProperty
(
"skip-ssl-validation"
,
Boolean
.
class
,
false
);
.
getProperty
(
"skip-ssl-validation"
,
Boolean
.
class
,
false
);
return
cloudControllerUrl
==
null
?
null
return
cloudControllerUrl
==
null
?
null
:
new
CloudFoundrySecurityService
(
:
new
CloudFoundrySecurityService
(
restTemplateBuilder
,
cloudControllerUrl
,
restTemplateBuilder
,
cloudControllerUrl
,
skipSslValidation
);
skipSslValidation
);
}
}
private
CorsConfiguration
getCorsConfiguration
()
{
private
CorsConfiguration
getCorsConfiguration
()
{
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HeapdumpMvcEndpoint.java
View file @
798522d8
...
@@ -76,7 +76,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
...
@@ -76,7 +76,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
)
public
void
invoke
(
@RequestParam
(
defaultValue
=
"true"
)
boolean
live
,
public
void
invoke
(
@RequestParam
(
defaultValue
=
"true"
)
boolean
live
,
HttpServletRequest
request
,
HttpServletResponse
response
)
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
IOException
,
ServletException
{
throws
IOException
,
ServletException
{
if
(!
isEnabled
())
{
if
(!
isEnabled
())
{
response
.
setStatus
(
HttpStatus
.
NOT_FOUND
.
value
());
response
.
setStatus
(
HttpStatus
.
NOT_FOUND
.
value
());
return
;
return
;
...
@@ -100,7 +100,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
...
@@ -100,7 +100,7 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
private
void
dumpHeap
(
boolean
live
,
HttpServletRequest
request
,
private
void
dumpHeap
(
boolean
live
,
HttpServletRequest
request
,
HttpServletResponse
response
)
HttpServletResponse
response
)
throws
IOException
,
ServletException
,
InterruptedException
{
throws
IOException
,
ServletException
,
InterruptedException
{
if
(
this
.
heapDumper
==
null
)
{
if
(
this
.
heapDumper
==
null
)
{
this
.
heapDumper
=
createHeapDumper
();
this
.
heapDumper
=
createHeapDumper
();
}
}
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/trace/WebRequestTraceFilter.java
View file @
798522d8
...
@@ -101,7 +101,7 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
...
@@ -101,7 +101,7 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
long
startTime
=
System
.
nanoTime
();
long
startTime
=
System
.
nanoTime
();
Map
<
String
,
Object
>
trace
=
getTrace
(
request
);
Map
<
String
,
Object
>
trace
=
getTrace
(
request
);
logTrace
(
request
,
trace
);
logTrace
(
request
,
trace
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/MetricFilterAutoConfigurationTests.java
View file @
798522d8
...
@@ -548,7 +548,7 @@ public class MetricFilterAutoConfigurationTests {
...
@@ -548,7 +548,7 @@ public class MetricFilterAutoConfigurationTests {
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
chain
)
HttpServletResponse
response
,
FilterChain
chain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
// send redirect before filter chain is executed, like Spring Security sending
// send redirect before filter chain is executed, like Spring Security sending
// us back to a login page
// us back to a login page
response
.
sendRedirect
(
"http://example.com"
);
response
.
sendRedirect
(
"http://example.com"
);
...
@@ -563,7 +563,7 @@ public class MetricFilterAutoConfigurationTests {
...
@@ -563,7 +563,7 @@ public class MetricFilterAutoConfigurationTests {
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
chain
)
HttpServletResponse
response
,
FilterChain
chain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
response
.
sendError
(
HttpStatus
.
SERVICE_UNAVAILABLE
.
value
());
response
.
sendError
(
HttpStatus
.
SERVICE_UNAVAILABLE
.
value
());
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporterTests.java
View file @
798522d8
...
@@ -306,7 +306,7 @@ public class EndpointMBeanExporterTests {
...
@@ -306,7 +306,7 @@ public class EndpointMBeanExporterTests {
private
ObjectName
getObjectName
(
String
domain
,
String
beanKey
,
private
ObjectName
getObjectName
(
String
domain
,
String
beanKey
,
boolean
includeIdentity
,
ApplicationContext
applicationContext
)
boolean
includeIdentity
,
ApplicationContext
applicationContext
)
throws
MalformedObjectNameException
{
throws
MalformedObjectNameException
{
if
(
includeIdentity
)
{
if
(
includeIdentity
)
{
return
ObjectNameManager
.
getInstance
(
String
.
format
(
return
ObjectNameManager
.
getInstance
(
String
.
format
(
"%s:type=Endpoint,name=%s,identity=%s"
,
domain
,
beanKey
,
ObjectUtils
"%s:type=Endpoint,name=%s,identity=%s"
,
domain
,
beanKey
,
ObjectUtils
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/AuditEventsMvcEndpointTests.java
View file @
798522d8
...
@@ -104,8 +104,8 @@ public class AuditEventsMvcEndpointTests {
...
@@ -104,8 +104,8 @@ public class AuditEventsMvcEndpointTests {
@Test
@Test
public
void
invokeFilterByPrincipalAndDateAfter
()
throws
Exception
{
public
void
invokeFilterByPrincipalAndDateAfter
()
throws
Exception
{
this
.
mvc
.
perform
(
get
(
"/auditevents"
)
.
param
(
"principal"
,
"user"
).
param
(
"after"
,
this
.
mvc
.
perform
(
get
(
"/auditevents"
)
"2016-11-01T10:00:00+0000"
))
.
param
(
"principal"
,
"user"
).
param
(
"after"
,
"2016-11-01T10:00:00+0000"
))
.
andExpect
(
status
().
isOk
())
.
andExpect
(
status
().
isOk
())
.
andExpect
(
content
().
string
(
.
andExpect
(
content
().
string
(
containsString
(
"\"principal\":\"user\",\"type\":\"login\""
)))
containsString
(
"\"principal\":\"user\",\"type\":\"login\""
)))
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java
View file @
798522d8
...
@@ -124,7 +124,7 @@ public class BatchAutoConfiguration {
...
@@ -124,7 +124,7 @@ public class BatchAutoConfiguration {
@ConditionalOnMissingBean
(
JobOperator
.
class
)
@ConditionalOnMissingBean
(
JobOperator
.
class
)
public
SimpleJobOperator
jobOperator
(
JobExplorer
jobExplorer
,
JobLauncher
jobLauncher
,
public
SimpleJobOperator
jobOperator
(
JobExplorer
jobExplorer
,
JobLauncher
jobLauncher
,
ListableJobLocator
jobRegistry
,
JobRepository
jobRepository
)
ListableJobLocator
jobRegistry
,
JobRepository
jobRepository
)
throws
Exception
{
throws
Exception
{
SimpleJobOperator
factory
=
new
SimpleJobOperator
();
SimpleJobOperator
factory
=
new
SimpleJobOperator
();
factory
.
setJobExplorer
(
jobExplorer
);
factory
.
setJobExplorer
(
jobExplorer
);
factory
.
setJobLauncher
(
jobLauncher
);
factory
.
setJobLauncher
(
jobLauncher
);
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheType.java
View file @
798522d8
...
@@ -69,7 +69,8 @@ public enum CacheType {
...
@@ -69,7 +69,8 @@ public enum CacheType {
/**
/**
* Guava backed caching.
* Guava backed caching.
*/
*/
@Deprecated
GUAVA
,
@Deprecated
GUAVA
,
/**
/**
* Simple in-memory caching.
* Simple in-memory caching.
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CouchbaseCacheConfiguration.java
View file @
798522d8
...
@@ -60,9 +60,8 @@ public class CouchbaseCacheConfiguration {
...
@@ -60,9 +60,8 @@ public class CouchbaseCacheConfiguration {
public
CouchbaseCacheManager
cacheManager
()
{
public
CouchbaseCacheManager
cacheManager
()
{
List
<
String
>
cacheNames
=
this
.
cacheProperties
.
getCacheNames
();
List
<
String
>
cacheNames
=
this
.
cacheProperties
.
getCacheNames
();
CouchbaseCacheManager
cacheManager
=
new
CouchbaseCacheManager
(
CouchbaseCacheManager
cacheManager
=
new
CouchbaseCacheManager
(
CacheBuilder
.
newInstance
(
this
.
bucket
)
CacheBuilder
.
newInstance
(
this
.
bucket
).
withExpiration
(
.
withExpiration
(
this
.
cacheProperties
.
getCouchbase
()
this
.
cacheProperties
.
getCouchbase
().
getExpirationSeconds
()),
.
getExpirationSeconds
()),
cacheNames
.
toArray
(
new
String
[
cacheNames
.
size
()]));
cacheNames
.
toArray
(
new
String
[
cacheNames
.
size
()]));
return
this
.
customizers
.
customize
(
cacheManager
);
return
this
.
customizers
.
customize
(
cacheManager
);
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java
View file @
798522d8
...
@@ -231,7 +231,7 @@ final class BeanTypeRegistry implements SmartInitializingSingleton {
...
@@ -231,7 +231,7 @@ final class BeanTypeRegistry implements SmartInitializingSingleton {
private
Class
<?>
doGetFactoryBeanGeneric
(
ConfigurableListableBeanFactory
beanFactory
,
private
Class
<?>
doGetFactoryBeanGeneric
(
ConfigurableListableBeanFactory
beanFactory
,
BeanDefinition
definition
,
String
name
)
BeanDefinition
definition
,
String
name
)
throws
Exception
,
ClassNotFoundException
,
LinkageError
{
throws
Exception
,
ClassNotFoundException
,
LinkageError
{
if
(
StringUtils
.
hasLength
(
definition
.
getFactoryBeanName
())
if
(
StringUtils
.
hasLength
(
definition
.
getFactoryBeanName
())
&&
StringUtils
.
hasLength
(
definition
.
getFactoryMethodName
()))
{
&&
StringUtils
.
hasLength
(
definition
.
getFactoryMethodName
()))
{
return
getConfigurationClassFactoryBeanGeneric
(
beanFactory
,
definition
,
name
);
return
getConfigurationClassFactoryBeanGeneric
(
beanFactory
,
definition
,
name
);
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java
View file @
798522d8
...
@@ -165,7 +165,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
...
@@ -165,7 +165,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
private
Collection
<
String
>
getBeanNamesForType
(
ListableBeanFactory
beanFactory
,
private
Collection
<
String
>
getBeanNamesForType
(
ListableBeanFactory
beanFactory
,
String
type
,
ClassLoader
classLoader
,
boolean
considerHierarchy
)
String
type
,
ClassLoader
classLoader
,
boolean
considerHierarchy
)
throws
LinkageError
{
throws
LinkageError
{
try
{
try
{
Set
<
String
>
result
=
new
LinkedHashSet
<
String
>();
Set
<
String
>
result
=
new
LinkedHashSet
<
String
>();
collectBeanNamesForType
(
result
,
beanFactory
,
collectBeanNamesForType
(
result
,
beanFactory
,
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java
View file @
798522d8
...
@@ -108,7 +108,7 @@ class OnPropertyCondition extends SpringBootCondition {
...
@@ -108,7 +108,7 @@ class OnPropertyCondition extends SpringBootCondition {
ConditionMessage
.
forCondition
(
ConditionalOnProperty
.
class
,
spec
)
ConditionMessage
.
forCondition
(
ConditionalOnProperty
.
class
,
spec
)
.
found
(
"different value in property"
,
.
found
(
"different value in property"
,
"different value in properties"
)
"different value in properties"
)
.
items
(
Style
.
QUOTE
,
nonMatchingProperties
));
.
items
(
Style
.
QUOTE
,
nonMatchingProperties
));
}
}
return
ConditionOutcome
.
match
(
ConditionMessage
return
ConditionOutcome
.
match
(
ConditionMessage
.
forCondition
(
ConditionalOnProperty
.
class
,
spec
).
because
(
"matched"
));
.
forCondition
(
ConditionalOnProperty
.
class
,
spec
).
because
(
"matched"
));
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SearchStrategy.java
View file @
798522d8
...
@@ -32,7 +32,8 @@ public enum SearchStrategy {
...
@@ -32,7 +32,8 @@ public enum SearchStrategy {
* Search all parents and ancestors, but not the current context.
* Search all parents and ancestors, but not the current context.
* @deprecated as of 1.5 in favor of {@link SearchStrategy#ANCESTORS}
* @deprecated as of 1.5 in favor of {@link SearchStrategy#ANCESTORS}
*/
*/
@Deprecated
PARENTS
,
@Deprecated
PARENTS
,
/**
/**
* Search all ancestors, but not the current context.
* Search all ancestors, but not the current context.
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.java
View file @
798522d8
...
@@ -229,7 +229,7 @@ public class RedisAutoConfiguration {
...
@@ -229,7 +229,7 @@ public class RedisAutoConfiguration {
@ConditionalOnMissingBean
(
name
=
"redisTemplate"
)
@ConditionalOnMissingBean
(
name
=
"redisTemplate"
)
public
RedisTemplate
<
Object
,
Object
>
redisTemplate
(
public
RedisTemplate
<
Object
,
Object
>
redisTemplate
(
RedisConnectionFactory
redisConnectionFactory
)
RedisConnectionFactory
redisConnectionFactory
)
throws
UnknownHostException
{
throws
UnknownHostException
{
RedisTemplate
<
Object
,
Object
>
template
=
new
RedisTemplate
<
Object
,
Object
>();
RedisTemplate
<
Object
,
Object
>
template
=
new
RedisTemplate
<
Object
,
Object
>();
template
.
setConnectionFactory
(
redisConnectionFactory
);
template
.
setConnectionFactory
(
redisConnectionFactory
);
return
template
;
return
template
;
...
@@ -239,7 +239,7 @@ public class RedisAutoConfiguration {
...
@@ -239,7 +239,7 @@ public class RedisAutoConfiguration {
@ConditionalOnMissingBean
(
StringRedisTemplate
.
class
)
@ConditionalOnMissingBean
(
StringRedisTemplate
.
class
)
public
StringRedisTemplate
stringRedisTemplate
(
public
StringRedisTemplate
stringRedisTemplate
(
RedisConnectionFactory
redisConnectionFactory
)
RedisConnectionFactory
redisConnectionFactory
)
throws
UnknownHostException
{
throws
UnknownHostException
{
StringRedisTemplate
template
=
new
StringRedisTemplate
();
StringRedisTemplate
template
=
new
StringRedisTemplate
();
template
.
setConnectionFactory
(
redisConnectionFactory
);
template
.
setConnectionFactory
(
redisConnectionFactory
);
return
template
;
return
template
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
View file @
798522d8
...
@@ -109,9 +109,8 @@ public class FlywayAutoConfiguration {
...
@@ -109,9 +109,8 @@ public class FlywayAutoConfiguration {
Assert
.
state
(!
this
.
properties
.
getLocations
().
isEmpty
(),
Assert
.
state
(!
this
.
properties
.
getLocations
().
isEmpty
(),
"Migration script locations not configured"
);
"Migration script locations not configured"
);
boolean
exists
=
hasAtLeastOneLocation
();
boolean
exists
=
hasAtLeastOneLocation
();
Assert
.
state
(
exists
,
Assert
.
state
(
exists
,
"Cannot find migrations location in: "
"Cannot find migrations location in: "
+
this
.
properties
+
this
.
properties
.
getLocations
()
.
getLocations
()
+
" (please add migrations or check your Flyway configuration)"
);
+
" (please add migrations or check your Flyway configuration)"
);
}
}
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQConnectionFactoryFactory.java
View file @
798522d8
...
@@ -82,7 +82,7 @@ class ActiveMQConnectionFactoryFactory {
...
@@ -82,7 +82,7 @@ class ActiveMQConnectionFactoryFactory {
private
<
T
extends
ActiveMQConnectionFactory
>
T
createConnectionFactoryInstance
(
private
<
T
extends
ActiveMQConnectionFactory
>
T
createConnectionFactoryInstance
(
Class
<
T
>
factoryClass
)
throws
InstantiationException
,
IllegalAccessException
,
Class
<
T
>
factoryClass
)
throws
InstantiationException
,
IllegalAccessException
,
InvocationTargetException
,
NoSuchMethodException
{
InvocationTargetException
,
NoSuchMethodException
{
String
brokerUrl
=
determineBrokerUrl
();
String
brokerUrl
=
determineBrokerUrl
();
String
user
=
this
.
properties
.
getUser
();
String
user
=
this
.
properties
.
getUser
();
String
password
=
this
.
properties
.
getPassword
();
String
password
=
this
.
properties
.
getPassword
();
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisXAConnectionFactoryConfiguration.java
View file @
798522d8
...
@@ -47,7 +47,7 @@ class ArtemisXAConnectionFactoryConfiguration {
...
@@ -47,7 +47,7 @@ class ArtemisXAConnectionFactoryConfiguration {
@Bean
(
name
=
{
"jmsConnectionFactory"
,
"xaJmsConnectionFactory"
})
@Bean
(
name
=
{
"jmsConnectionFactory"
,
"xaJmsConnectionFactory"
})
public
ConnectionFactory
jmsConnectionFactory
(
ListableBeanFactory
beanFactory
,
public
ConnectionFactory
jmsConnectionFactory
(
ListableBeanFactory
beanFactory
,
ArtemisProperties
properties
,
XAConnectionFactoryWrapper
wrapper
)
ArtemisProperties
properties
,
XAConnectionFactoryWrapper
wrapper
)
throws
Exception
{
throws
Exception
{
return
wrapper
.
wrapConnectionFactory
(
return
wrapper
.
wrapConnectionFactory
(
new
ArtemisConnectionFactoryFactory
(
beanFactory
,
properties
)
new
ArtemisConnectionFactoryFactory
(
beanFactory
,
properties
)
.
createConnectionFactory
(
ActiveMQXAConnectionFactory
.
class
));
.
createConnectionFactory
(
ActiveMQXAConnectionFactory
.
class
));
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/EnableOAuth2SsoCondition.java
View file @
798522d8
...
@@ -41,8 +41,8 @@ class EnableOAuth2SsoCondition extends SpringBootCondition {
...
@@ -41,8 +41,8 @@ class EnableOAuth2SsoCondition extends SpringBootCondition {
for
(
String
name
:
enablers
)
{
for
(
String
name
:
enablers
)
{
if
(
context
.
getBeanFactory
().
isTypeMatch
(
name
,
if
(
context
.
getBeanFactory
().
isTypeMatch
(
name
,
WebSecurityConfigurerAdapter
.
class
))
{
WebSecurityConfigurerAdapter
.
class
))
{
return
ConditionOutcome
.
match
(
message
return
ConditionOutcome
.
match
(
message
.
found
(
.
found
(
"@EnableOAuth2Sso annotation on WebSecurityConfigurerAdapter"
)
"@EnableOAuth2Sso annotation on WebSecurityConfigurerAdapter"
)
.
items
(
name
));
.
items
(
name
));
}
}
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
View file @
798522d8
...
@@ -288,10 +288,9 @@ public class WebMvcAutoConfiguration {
...
@@ -288,10 +288,9 @@ public class WebMvcAutoConfiguration {
}
}
Integer
cachePeriod
=
this
.
resourceProperties
.
getCachePeriod
();
Integer
cachePeriod
=
this
.
resourceProperties
.
getCachePeriod
();
if
(!
registry
.
hasMappingForPattern
(
"/webjars/**"
))
{
if
(!
registry
.
hasMappingForPattern
(
"/webjars/**"
))
{
customizeResourceHandlerRegistration
(
customizeResourceHandlerRegistration
(
registry
registry
.
addResourceHandler
(
"/webjars/**"
)
.
addResourceHandler
(
"/webjars/**"
)
.
addResourceLocations
(
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
)
"classpath:/META-INF/resources/webjars/"
)
.
setCachePeriod
(
cachePeriod
));
.
setCachePeriod
(
cachePeriod
));
}
}
String
staticPathPattern
=
this
.
mvcProperties
.
getStaticPathPattern
();
String
staticPathPattern
=
this
.
mvcProperties
.
getStaticPathPattern
();
...
@@ -300,7 +299,7 @@ public class WebMvcAutoConfiguration {
...
@@ -300,7 +299,7 @@ public class WebMvcAutoConfiguration {
registry
.
addResourceHandler
(
staticPathPattern
)
registry
.
addResourceHandler
(
staticPathPattern
)
.
addResourceLocations
(
.
addResourceLocations
(
this
.
resourceProperties
.
getStaticLocations
())
this
.
resourceProperties
.
getStaticLocations
())
.
setCachePeriod
(
cachePeriod
));
.
setCachePeriod
(
cachePeriod
));
}
}
}
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzerTests.java
View file @
798522d8
...
@@ -194,15 +194,17 @@ public class NoSuchBeanDefinitionFailureAnalyzerTests {
...
@@ -194,15 +194,17 @@ public class NoSuchBeanDefinitionFailureAnalyzerTests {
}
}
private
void
assertActionMissingType
(
FailureAnalysis
analysis
,
Class
<?>
type
)
{
private
void
assertActionMissingType
(
FailureAnalysis
analysis
,
Class
<?>
type
)
{
assertThat
(
analysis
.
getAction
()).
startsWith
(
String
assertThat
(
analysis
.
getAction
()).
startsWith
(
String
.
format
(
.
format
(
"Consider revisiting the conditions above or defining a bean of type '%s' "
"Consider revisiting the conditions above or defining a bean of type '%s' "
+
"in your configuration."
,
type
.
getName
()));
+
"in your configuration."
,
type
.
getName
()));
}
}
private
void
assertActionMissingName
(
FailureAnalysis
analysis
,
String
name
)
{
private
void
assertActionMissingName
(
FailureAnalysis
analysis
,
String
name
)
{
assertThat
(
analysis
.
getAction
()).
startsWith
(
String
assertThat
(
analysis
.
getAction
()).
startsWith
(
String
.
format
(
.
format
(
"Consider revisiting the conditions above or defining a bean named '%s' "
"Consider revisiting the conditions above or defining a bean named '%s' "
+
"in your configuration."
,
name
));
+
"in your configuration."
,
name
));
}
}
private
void
assertBeanMethodDisabled
(
FailureAnalysis
analysis
,
String
description
,
private
void
assertBeanMethodDisabled
(
FailureAnalysis
analysis
,
String
description
,
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java
View file @
798522d8
...
@@ -492,7 +492,7 @@ public class JacksonAutoConfigurationTests {
...
@@ -492,7 +492,7 @@ public class JacksonAutoConfigurationTests {
@Override
@Override
public
void
serialize
(
Foo
value
,
JsonGenerator
jgen
,
public
void
serialize
(
Foo
value
,
JsonGenerator
jgen
,
SerializerProvider
provider
)
SerializerProvider
provider
)
throws
IOException
,
JsonProcessingException
{
throws
IOException
,
JsonProcessingException
{
jgen
.
writeStartObject
();
jgen
.
writeStartObject
();
jgen
.
writeStringField
(
"foo"
,
"bar"
);
jgen
.
writeStringField
(
"foo"
,
"bar"
);
jgen
.
writeEndObject
();
jgen
.
writeEndObject
();
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceInitializerTests.java
View file @
798522d8
...
@@ -140,16 +140,15 @@ public class DataSourceInitializerTests {
...
@@ -140,16 +140,15 @@ public class DataSourceInitializerTests {
@Test
@Test
public
void
testDataSourceInitializedWithMultipleScripts
()
throws
Exception
{
public
void
testDataSourceInitializedWithMultipleScripts
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
"spring.datasource.initialize:true"
,
.
addEnvironment
(
this
.
context
,
"spring.datasource.initialize:true"
,
"spring.datasource.schema:"
"spring.datasource.schema:"
+
ClassUtils
+
ClassUtils
.
addResourcePathToPackagePath
(
getClass
(),
.
addResourcePathToPackagePath
(
getClass
(),
"schema.sql"
)
"schema.sql"
)
+
","
+
","
+
ClassUtils
.
addResourcePathToPackagePath
(
getClass
(),
+
ClassUtils
.
addResourcePathToPackagePath
(
getClass
(),
"another.sql"
),
"another.sql"
),
"spring.datasource.data:"
+
ClassUtils
"spring.datasource.data:"
+
ClassUtils
.
addResourcePathToPackagePath
(
getClass
(),
"data.sql"
));
.
addResourcePathToPackagePath
(
getClass
(),
"data.sql"
));
this
.
context
.
register
(
DataSourceAutoConfiguration
.
class
,
this
.
context
.
register
(
DataSourceAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
);
PropertyPlaceholderAutoConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java
View file @
798522d8
...
@@ -104,8 +104,10 @@ public class SecurityAutoConfigurationTests {
...
@@ -104,8 +104,10 @@ public class SecurityAutoConfigurationTests {
ServerPropertiesAutoConfiguration
.
class
,
ServerPropertiesAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
);
PropertyPlaceholderAutoConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
"securityFilterChainRegistration"
,
assertThat
(
this
.
context
DelegatingFilterProxyRegistrationBean
.
class
).
getOrder
()).
isEqualTo
(
.
getBean
(
"securityFilterChainRegistration"
,
DelegatingFilterProxyRegistrationBean
.
class
)
.
getOrder
()).
isEqualTo
(
FilterRegistrationBean
.
REQUEST_WRAPPER_FILTER_MAX_ORDER
-
100
);
FilterRegistrationBean
.
REQUEST_WRAPPER_FILTER_MAX_ORDER
-
100
);
}
}
...
@@ -134,8 +136,10 @@ public class SecurityAutoConfigurationTests {
...
@@ -134,8 +136,10 @@ public class SecurityAutoConfigurationTests {
ServerPropertiesAutoConfiguration
.
class
,
ServerPropertiesAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
);
PropertyPlaceholderAutoConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertThat
(
this
.
context
.
getBean
(
"securityFilterChainRegistration"
,
assertThat
(
this
.
context
DelegatingFilterProxyRegistrationBean
.
class
).
getOrder
()).
isEqualTo
(
.
getBean
(
"securityFilterChainRegistration"
,
DelegatingFilterProxyRegistrationBean
.
class
)
.
getOrder
()).
isEqualTo
(
FilterRegistrationBean
.
REQUEST_WRAPPER_FILTER_MAX_ORDER
-
100
);
FilterRegistrationBean
.
REQUEST_WRAPPER_FILTER_MAX_ORDER
-
100
);
}
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java
View file @
798522d8
...
@@ -220,7 +220,7 @@ public class BasicErrorControllerIntegrationTests {
...
@@ -220,7 +220,7 @@ public class BasicErrorControllerIntegrationTests {
@Override
@Override
protected
void
renderMergedOutputModel
(
Map
<
String
,
Object
>
model
,
protected
void
renderMergedOutputModel
(
Map
<
String
,
Object
>
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
throws
Exception
{
response
.
getWriter
().
write
(
"ERROR_BEAN"
);
response
.
getWriter
().
write
(
"ERROR_BEAN"
);
}
}
};
};
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerMockMvcTests.java
View file @
798522d8
...
@@ -150,7 +150,7 @@ public class BasicErrorControllerMockMvcTests {
...
@@ -150,7 +150,7 @@ public class BasicErrorControllerMockMvcTests {
@Override
@Override
protected
void
renderMergedOutputModel
(
Map
<
String
,
Object
>
model
,
protected
void
renderMergedOutputModel
(
Map
<
String
,
Object
>
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
throws
Exception
{
response
.
getWriter
().
write
(
"ERROR_BEAN"
);
response
.
getWriter
().
write
(
"ERROR_BEAN"
);
}
}
};
};
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java
View file @
798522d8
...
@@ -803,7 +803,7 @@ public class WebMvcAutoConfigurationTests {
...
@@ -803,7 +803,7 @@ public class WebMvcAutoConfigurationTests {
@Override
@Override
protected
void
renderMergedOutputModel
(
Map
<
String
,
Object
>
model
,
protected
void
renderMergedOutputModel
(
Map
<
String
,
Object
>
model
,
HttpServletRequest
request
,
HttpServletResponse
response
)
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
throws
Exception
{
response
.
getOutputStream
().
write
(
"Hello World"
.
getBytes
());
response
.
getOutputStream
().
write
(
"Hello World"
.
getBytes
());
}
}
};
};
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/archive/ArchiveCommand.java
View file @
798522d8
...
@@ -185,7 +185,7 @@ abstract class ArchiveCommand extends OptionParsingCommand {
...
@@ -185,7 +185,7 @@ abstract class ArchiveCommand extends OptionParsingCommand {
private
void
writeJar
(
File
file
,
Class
<?>[]
compiledClasses
,
private
void
writeJar
(
File
file
,
Class
<?>[]
compiledClasses
,
List
<
MatchedResource
>
classpathEntries
,
List
<
URL
>
dependencies
)
List
<
MatchedResource
>
classpathEntries
,
List
<
URL
>
dependencies
)
throws
FileNotFoundException
,
IOException
,
URISyntaxException
{
throws
FileNotFoundException
,
IOException
,
URISyntaxException
{
final
List
<
Library
>
libraries
;
final
List
<
Library
>
libraries
;
JarWriter
writer
=
new
JarWriter
(
file
);
JarWriter
writer
=
new
JarWriter
(
file
);
try
{
try
{
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/CompilerAutoConfiguration.java
View file @
798522d8
...
@@ -89,7 +89,7 @@ public abstract class CompilerAutoConfiguration {
...
@@ -89,7 +89,7 @@ public abstract class CompilerAutoConfiguration {
*/
*/
public
void
apply
(
GroovyClassLoader
loader
,
GroovyCompilerConfiguration
configuration
,
public
void
apply
(
GroovyClassLoader
loader
,
GroovyCompilerConfiguration
configuration
,
GeneratorContext
generatorContext
,
SourceUnit
source
,
ClassNode
classNode
)
GeneratorContext
generatorContext
,
SourceUnit
source
,
ClassNode
classNode
)
throws
CompilationFailedException
{
throws
CompilationFailedException
{
}
}
}
}
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringSecurityCompilerAutoConfiguration.java
View file @
798522d8
...
@@ -38,9 +38,8 @@ public class SpringSecurityCompilerAutoConfiguration extends CompilerAutoConfigu
...
@@ -38,9 +38,8 @@ public class SpringSecurityCompilerAutoConfiguration extends CompilerAutoConfigu
@Override
@Override
public
void
applyDependencies
(
DependencyCustomizer
dependencies
)
{
public
void
applyDependencies
(
DependencyCustomizer
dependencies
)
{
dependencies
dependencies
.
ifAnyMissingClasses
(
.
ifAnyMissingClasses
(
"org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity"
)
"org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity"
)
.
add
(
"spring-boot-starter-security"
);
.
add
(
"spring-boot-starter-security"
);
}
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java
View file @
798522d8
...
@@ -53,7 +53,7 @@ public class SpringTestCompilerAutoConfiguration extends CompilerAutoConfigurati
...
@@ -53,7 +53,7 @@ public class SpringTestCompilerAutoConfiguration extends CompilerAutoConfigurati
@Override
@Override
public
void
apply
(
GroovyClassLoader
loader
,
GroovyCompilerConfiguration
configuration
,
public
void
apply
(
GroovyClassLoader
loader
,
GroovyCompilerConfiguration
configuration
,
GeneratorContext
generatorContext
,
SourceUnit
source
,
ClassNode
classNode
)
GeneratorContext
generatorContext
,
SourceUnit
source
,
ClassNode
classNode
)
throws
CompilationFailedException
{
throws
CompilationFailedException
{
if
(!
AstUtils
.
hasAtLeastOneAnnotation
(
classNode
,
"RunWith"
))
{
if
(!
AstUtils
.
hasAtLeastOneAnnotation
(
classNode
,
"RunWith"
))
{
AnnotationNode
runWith
=
new
AnnotationNode
(
ClassHelper
.
make
(
"RunWith"
));
AnnotationNode
runWith
=
new
AnnotationNode
(
ClassHelper
.
make
(
"RunWith"
));
runWith
.
addMember
(
"value"
,
runWith
.
addMember
(
"value"
,
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringWebsocketCompilerAutoConfiguration.java
View file @
798522d8
...
@@ -38,9 +38,8 @@ public class SpringWebsocketCompilerAutoConfiguration extends CompilerAutoConfig
...
@@ -38,9 +38,8 @@ public class SpringWebsocketCompilerAutoConfiguration extends CompilerAutoConfig
@Override
@Override
public
void
applyDependencies
(
DependencyCustomizer
dependencies
)
{
public
void
applyDependencies
(
DependencyCustomizer
dependencies
)
{
dependencies
dependencies
.
ifAnyMissingClasses
(
.
ifAnyMissingClasses
(
"org.springframework.web.socket.config.annotation.EnableWebSocket"
)
"org.springframework.web.socket.config.annotation.EnableWebSocket"
)
.
add
(
"spring-boot-starter-websocket"
).
add
(
"spring-messaging"
);
.
add
(
"spring-boot-starter-websocket"
).
add
(
"spring-messaging"
);
}
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java
View file @
798522d8
...
@@ -94,9 +94,8 @@ public class AetherGrapeEngine implements GrapeEngine {
...
@@ -94,9 +94,8 @@ public class AetherGrapeEngine implements GrapeEngine {
private
ProgressReporter
getProgressReporter
(
DefaultRepositorySystemSession
session
,
private
ProgressReporter
getProgressReporter
(
DefaultRepositorySystemSession
session
,
boolean
quiet
)
{
boolean
quiet
)
{
String
progressReporter
=
(
quiet
?
"none"
String
progressReporter
=
(
quiet
?
"none"
:
System
.
getProperty
(
:
System
.
getProperty
(
"org.springframework.boot.cli.compiler.grape.ProgressReporter"
));
"org.springframework.boot.cli.compiler.grape.ProgressReporter"
));
if
(
"detail"
.
equals
(
progressReporter
)
if
(
"detail"
.
equals
(
progressReporter
)
||
Boolean
.
getBoolean
(
"groovy.grape.report.downloads"
))
{
||
Boolean
.
getBoolean
(
"groovy.grape.report.downloads"
))
{
return
new
DetailedProgressReporter
(
session
,
System
.
out
);
return
new
DetailedProgressReporter
(
session
,
System
.
out
);
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/DependencyResolutionContext.java
View file @
798522d8
...
@@ -105,9 +105,8 @@ public class DependencyResolutionContext {
...
@@ -105,9 +105,8 @@ public class DependencyResolutionContext {
aetherDependency
);
aetherDependency
);
}
}
this
.
dependencyManagement
=
this
.
dependencyManagement
==
null
this
.
dependencyManagement
=
this
.
dependencyManagement
==
null
?
dependencyManagement
?
dependencyManagement
:
new
CompositeDependencyManagement
(
:
new
CompositeDependencyManagement
(
dependencyManagement
,
dependencyManagement
,
this
.
dependencyManagement
);
this
.
dependencyManagement
);
this
.
artifactCoordinatesResolver
=
new
DependencyManagementArtifactCoordinatesResolver
(
this
.
artifactCoordinatesResolver
=
new
DependencyManagementArtifactCoordinatesResolver
(
this
.
dependencyManagement
);
this
.
dependencyManagement
);
}
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java
View file @
798522d8
...
@@ -47,8 +47,8 @@ public abstract class GroovyTemplate {
...
@@ -47,8 +47,8 @@ public abstract class GroovyTemplate {
}
}
public
static
String
template
(
TemplateEngine
engine
,
String
name
,
public
static
String
template
(
TemplateEngine
engine
,
String
name
,
Map
<
String
,
?>
model
)
throws
IOException
,
CompilationFailedException
,
Map
<
String
,
?>
model
)
ClassNotFoundException
{
throws
IOException
,
CompilationFailedException
,
ClassNotFoundException
{
Writable
writable
=
getTemplate
(
engine
,
name
).
make
(
model
);
Writable
writable
=
getTemplate
(
engine
,
name
).
make
(
model
);
StringWriter
result
=
new
StringWriter
();
StringWriter
result
=
new
StringWriter
();
writable
.
writeTo
(
result
);
writable
.
writeTo
(
result
);
...
...
spring-boot-docs/src/main/java/org/springframework/boot/context/embedded/TomcatLegacyCookieProcessorExample.java
View file @
798522d8
...
@@ -49,12 +49,13 @@ public class TomcatLegacyCookieProcessorExample {
...
@@ -49,12 +49,13 @@ public class TomcatLegacyCookieProcessorExample {
((
TomcatEmbeddedServletContainerFactory
)
container
)
((
TomcatEmbeddedServletContainerFactory
)
container
)
.
addContextCustomizers
(
new
TomcatContextCustomizer
()
{
.
addContextCustomizers
(
new
TomcatContextCustomizer
()
{
@Override
@Override
public
void
customize
(
Context
context
)
{
public
void
customize
(
Context
context
)
{
context
.
setCookieProcessor
(
new
LegacyCookieProcessor
());
context
.
setCookieProcessor
(
}
new
LegacyCookieProcessor
());
}
});
});
}
}
}
}
...
...
spring-boot-docs/src/main/java/org/springframework/boot/web/client/RestTemplateProxyCustomizationExample.java
View file @
798522d8
...
@@ -50,7 +50,7 @@ public class RestTemplateProxyCustomizationExample {
...
@@ -50,7 +50,7 @@ public class RestTemplateProxyCustomizationExample {
@Override
@Override
public
HttpHost
determineProxy
(
HttpHost
target
,
public
HttpHost
determineProxy
(
HttpHost
target
,
HttpRequest
request
,
HttpContext
context
)
HttpRequest
request
,
HttpContext
context
)
throws
HttpException
{
throws
HttpException
{
if
(
target
.
getHostName
().
equals
(
"192.168.0.5"
))
{
if
(
target
.
getHostName
().
equals
(
"192.168.0.5"
))
{
return
null
;
return
null
;
}
}
...
...
spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java
View file @
798522d8
...
@@ -68,8 +68,8 @@ public class SampleDataRestApplicationTests {
...
@@ -68,8 +68,8 @@ public class SampleDataRestApplicationTests {
@Test
@Test
public
void
findByNameAndCountry
()
throws
Exception
{
public
void
findByNameAndCountry
()
throws
Exception
{
this
.
mvc
.
perform
(
this
.
mvc
.
perform
(
get
(
get
(
"/api/cities/search/findByNameAndCountryAllIgnoringCase?name=Melbourne&country=Australia"
))
"/api/cities/search/findByNameAndCountryAllIgnoringCase?name=Melbourne&country=Australia"
))
.
andExpect
(
status
().
isOk
())
.
andExpect
(
status
().
isOk
())
.
andExpect
(
jsonPath
(
"state"
,
equalTo
(
"Victoria"
)))
.
andExpect
(
jsonPath
(
"state"
,
equalTo
(
"Victoria"
)))
.
andExpect
(
jsonPath
(
"name"
,
equalTo
(
"Melbourne"
)));
.
andExpect
(
jsonPath
(
"name"
,
equalTo
(
"Melbourne"
)));
...
@@ -78,8 +78,8 @@ public class SampleDataRestApplicationTests {
...
@@ -78,8 +78,8 @@ public class SampleDataRestApplicationTests {
@Test
@Test
public
void
findByContaining
()
throws
Exception
{
public
void
findByContaining
()
throws
Exception
{
this
.
mvc
.
perform
(
this
.
mvc
.
perform
(
get
(
get
(
"/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"
))
"/api/cities/search/findByNameContainingAndCountryContainingAllIgnoringCase?name=&country=UK"
))
.
andExpect
(
status
().
isOk
())
.
andExpect
(
status
().
isOk
())
.
andExpect
(
jsonPath
(
"_embedded.cities"
,
hasSize
(
3
)));
.
andExpect
(
jsonPath
(
"_embedded.cities"
,
hasSize
(
3
)));
}
}
...
...
spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java
View file @
798522d8
...
@@ -93,7 +93,7 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
...
@@ -93,7 +93,7 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
protected
final
boolean
isTypeOrAnnotated
(
MetadataReader
metadataReader
,
protected
final
boolean
isTypeOrAnnotated
(
MetadataReader
metadataReader
,
MetadataReaderFactory
metadataReaderFactory
,
Class
<?>
type
)
MetadataReaderFactory
metadataReaderFactory
,
Class
<?>
type
)
throws
IOException
{
throws
IOException
{
AnnotationTypeFilter
annotationFilter
=
new
AnnotationTypeFilter
(
AnnotationTypeFilter
annotationFilter
=
new
AnnotationTypeFilter
(
(
Class
<?
extends
Annotation
>)
type
);
(
Class
<?
extends
Annotation
>)
type
);
AssignableTypeFilter
typeFilter
=
new
AssignableTypeFilter
(
type
);
AssignableTypeFilter
typeFilter
=
new
AssignableTypeFilter
(
type
);
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/app/ExampleJsonComponent.java
View file @
798522d8
...
@@ -53,7 +53,7 @@ public class ExampleJsonComponent {
...
@@ -53,7 +53,7 @@ public class ExampleJsonComponent {
@Override
@Override
protected
ExampleCustomObject
deserializeObject
(
JsonParser
jsonParser
,
protected
ExampleCustomObject
deserializeObject
(
JsonParser
jsonParser
,
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
throws
IOException
{
throws
IOException
{
return
new
ExampleCustomObject
(
return
new
ExampleCustomObject
(
nullSafeValue
(
tree
.
get
(
"value"
),
String
.
class
));
nullSafeValue
(
tree
.
get
(
"value"
),
String
.
class
));
}
}
...
...
spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockitoPostProcessor.java
View file @
798522d8
...
@@ -370,7 +370,7 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
...
@@ -370,7 +370,7 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
@Override
@Override
public
PropertyValues
postProcessPropertyValues
(
PropertyValues
pvs
,
public
PropertyValues
postProcessPropertyValues
(
PropertyValues
pvs
,
PropertyDescriptor
[]
pds
,
final
Object
bean
,
String
beanName
)
PropertyDescriptor
[]
pds
,
final
Object
bean
,
String
beanName
)
throws
BeansException
{
throws
BeansException
{
ReflectionUtils
.
doWithFields
(
bean
.
getClass
(),
new
FieldCallback
()
{
ReflectionUtils
.
doWithFields
(
bean
.
getClass
(),
new
FieldCallback
()
{
@Override
@Override
...
...
spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java
View file @
798522d8
...
@@ -492,7 +492,7 @@ public class TestRestTemplate {
...
@@ -492,7 +492,7 @@ public class TestRestTemplate {
*/
*/
public
<
T
>
ResponseEntity
<
T
>
postForEntity
(
String
url
,
Object
request
,
public
<
T
>
ResponseEntity
<
T
>
postForEntity
(
String
url
,
Object
request
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
urlVariables
)
Class
<
T
>
responseType
,
Map
<
String
,
?>
urlVariables
)
throws
RestClientException
{
throws
RestClientException
{
return
this
.
restTemplate
.
postForEntity
(
url
,
request
,
responseType
,
urlVariables
);
return
this
.
restTemplate
.
postForEntity
(
url
,
request
,
responseType
,
urlVariables
);
}
}
...
@@ -735,7 +735,7 @@ public class TestRestTemplate {
...
@@ -735,7 +735,7 @@ public class TestRestTemplate {
*/
*/
public
<
T
>
ResponseEntity
<
T
>
exchange
(
String
url
,
HttpMethod
method
,
public
<
T
>
ResponseEntity
<
T
>
exchange
(
String
url
,
HttpMethod
method
,
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
,
Object
...
urlVariables
)
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
,
Object
...
urlVariables
)
throws
RestClientException
{
throws
RestClientException
{
return
this
.
restTemplate
.
exchange
(
url
,
method
,
requestEntity
,
responseType
,
return
this
.
restTemplate
.
exchange
(
url
,
method
,
requestEntity
,
responseType
,
urlVariables
);
urlVariables
);
}
}
...
@@ -780,7 +780,7 @@ public class TestRestTemplate {
...
@@ -780,7 +780,7 @@ public class TestRestTemplate {
*/
*/
public
<
T
>
ResponseEntity
<
T
>
exchange
(
URI
url
,
HttpMethod
method
,
public
<
T
>
ResponseEntity
<
T
>
exchange
(
URI
url
,
HttpMethod
method
,
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
)
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
)
throws
RestClientException
{
throws
RestClientException
{
return
this
.
restTemplate
.
exchange
(
applyRootUriIfNecessary
(
url
),
method
,
return
this
.
restTemplate
.
exchange
(
applyRootUriIfNecessary
(
url
),
method
,
requestEntity
,
responseType
);
requestEntity
,
responseType
);
}
}
...
@@ -863,7 +863,7 @@ public class TestRestTemplate {
...
@@ -863,7 +863,7 @@ public class TestRestTemplate {
*/
*/
public
<
T
>
ResponseEntity
<
T
>
exchange
(
URI
url
,
HttpMethod
method
,
public
<
T
>
ResponseEntity
<
T
>
exchange
(
URI
url
,
HttpMethod
method
,
HttpEntity
<?>
requestEntity
,
ParameterizedTypeReference
<
T
>
responseType
)
HttpEntity
<?>
requestEntity
,
ParameterizedTypeReference
<
T
>
responseType
)
throws
RestClientException
{
throws
RestClientException
{
return
this
.
restTemplate
.
exchange
(
applyRootUriIfNecessary
(
url
),
method
,
return
this
.
restTemplate
.
exchange
(
applyRootUriIfNecessary
(
url
),
method
,
requestEntity
,
responseType
);
requestEntity
,
responseType
);
}
}
...
@@ -931,7 +931,7 @@ public class TestRestTemplate {
...
@@ -931,7 +931,7 @@ public class TestRestTemplate {
*/
*/
public
<
T
>
T
execute
(
String
url
,
HttpMethod
method
,
RequestCallback
requestCallback
,
public
<
T
>
T
execute
(
String
url
,
HttpMethod
method
,
RequestCallback
requestCallback
,
ResponseExtractor
<
T
>
responseExtractor
,
Object
...
urlVariables
)
ResponseExtractor
<
T
>
responseExtractor
,
Object
...
urlVariables
)
throws
RestClientException
{
throws
RestClientException
{
return
this
.
restTemplate
.
execute
(
url
,
method
,
requestCallback
,
responseExtractor
,
return
this
.
restTemplate
.
execute
(
url
,
method
,
requestCallback
,
responseExtractor
,
urlVariables
);
urlVariables
);
}
}
...
@@ -955,7 +955,7 @@ public class TestRestTemplate {
...
@@ -955,7 +955,7 @@ public class TestRestTemplate {
*/
*/
public
<
T
>
T
execute
(
String
url
,
HttpMethod
method
,
RequestCallback
requestCallback
,
public
<
T
>
T
execute
(
String
url
,
HttpMethod
method
,
RequestCallback
requestCallback
,
ResponseExtractor
<
T
>
responseExtractor
,
Map
<
String
,
?>
urlVariables
)
ResponseExtractor
<
T
>
responseExtractor
,
Map
<
String
,
?>
urlVariables
)
throws
RestClientException
{
throws
RestClientException
{
return
this
.
restTemplate
.
execute
(
url
,
method
,
requestCallback
,
responseExtractor
,
return
this
.
restTemplate
.
execute
(
url
,
method
,
requestCallback
,
responseExtractor
,
urlVariables
);
urlVariables
);
}
}
...
...
spring-boot-test/src/test/java/org/springframework/boot/test/web/client/TestRestTemplateTests.java
View file @
798522d8
...
@@ -255,7 +255,7 @@ public class TestRestTemplateTests {
...
@@ -255,7 +255,7 @@ public class TestRestTemplateTests {
testRestTemplate
.
exchange
(
testRestTemplate
.
exchange
(
new
RequestEntity
<
String
>(
HttpMethod
.
GET
,
relativeUri
),
new
RequestEntity
<
String
>(
HttpMethod
.
GET
,
relativeUri
),
new
ParameterizedTypeReference
<
String
>()
{
new
ParameterizedTypeReference
<
String
>()
{
});
});
}
}
});
});
...
@@ -286,7 +286,7 @@ public class TestRestTemplateTests {
...
@@ -286,7 +286,7 @@ public class TestRestTemplateTests {
testRestTemplate
.
exchange
(
relativeUri
,
HttpMethod
.
GET
,
testRestTemplate
.
exchange
(
relativeUri
,
HttpMethod
.
GET
,
new
HttpEntity
<
byte
[]>(
new
byte
[
0
]),
new
HttpEntity
<
byte
[]>(
new
byte
[
0
]),
new
ParameterizedTypeReference
<
String
>()
{
new
ParameterizedTypeReference
<
String
>()
{
});
});
}
}
});
});
...
...
spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONStringer.java
View file @
798522d8
...
@@ -52,8 +52,8 @@ import java.util.List;
...
@@ -52,8 +52,8 @@ import java.util.List;
* Each stringer may be used to encode a single top level value. Instances of this class
* Each stringer may be used to encode a single top level value. Instances of this class
* are not thread safe. Although this class is nonfinal, it was not designed for
* are not thread safe. Although this class is nonfinal, it was not designed for
* inheritance and should not be subclassed. In particular, self-use by overrideable
* inheritance and should not be subclassed. In particular, self-use by overrideable
* methods is not specified. See <i>Effective Java</i> Item 17,
* methods is not specified. See <i>Effective Java</i> Item 17,
"Design and Document or
*
"Design and Document or
inheritance or else prohibit it" for further information.
* inheritance or else prohibit it" for further information.
*/
*/
public
class
JSONStringer
{
public
class
JSONStringer
{
...
...
spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java
View file @
798522d8
...
@@ -54,8 +54,8 @@ package org.springframework.boot.configurationprocessor.json;
...
@@ -54,8 +54,8 @@ package org.springframework.boot.configurationprocessor.json;
* Each tokener may be used to parse a single JSON string. Instances of this class are not
* Each tokener may be used to parse a single JSON string. Instances of this class are not
* thread safe. Although this class is nonfinal, it was not designed for inheritance and
* thread safe. Although this class is nonfinal, it was not designed for inheritance and
* should not be subclassed. In particular, self-use by overrideable methods is not
* should not be subclassed. In particular, self-use by overrideable methods is not
* specified. See <i>Effective Java</i> Item 17,
* specified. See <i>Effective Java</i> Item 17,
"Design and Document or inheritance or
*
"Design and Document or inheritance or
else prohibit it" for further information.
* else prohibit it" for further information.
*/
*/
public
class
JSONTokener
{
public
class
JSONTokener
{
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java
View file @
798522d8
...
@@ -380,18 +380,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
...
@@ -380,18 +380,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
ConfigurationMetadata
metadata
=
compile
(
ClassWithNestedProperties
.
class
);
ConfigurationMetadata
metadata
=
compile
(
ClassWithNestedProperties
.
class
);
assertThat
(
metadata
).
has
(
Metadata
.
withGroup
(
"nestedChildProps"
)
assertThat
(
metadata
).
has
(
Metadata
.
withGroup
(
"nestedChildProps"
)
.
fromSource
(
ClassWithNestedProperties
.
NestedChildClass
.
class
));
.
fromSource
(
ClassWithNestedProperties
.
NestedChildClass
.
class
));
assertThat
(
metadata
)
assertThat
(
metadata
).
has
(
Metadata
.
has
(
Metadata
.
withProperty
(
"nestedChildProps.child-class-property"
,
Integer
.
class
)
.
withProperty
(
"nestedChildProps.child-class-property"
,
.
fromSource
(
ClassWithNestedProperties
.
NestedChildClass
.
class
)
Integer
.
class
)
.
withDefaultValue
(
20
));
.
fromSource
(
ClassWithNestedProperties
.
NestedChildClass
.
class
)
assertThat
(
metadata
).
has
(
Metadata
.
withDefaultValue
(
20
));
.
withProperty
(
"nestedChildProps.parent-class-property"
,
Integer
.
class
)
assertThat
(
metadata
)
.
fromSource
(
ClassWithNestedProperties
.
NestedChildClass
.
class
)
.
has
(
Metadata
.
withDefaultValue
(
10
));
.
withProperty
(
"nestedChildProps.parent-class-property"
,
Integer
.
class
)
.
fromSource
(
ClassWithNestedProperties
.
NestedChildClass
.
class
)
.
withDefaultValue
(
10
));
}
}
@Test
@Test
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/metadata/JsonMarshallerTests.java
View file @
798522d8
...
@@ -61,7 +61,7 @@ public class JsonMarshallerTests {
...
@@ -61,7 +61,7 @@ public class JsonMarshallerTests {
new
ItemHint
.
ValueProvider
(
"first"
,
new
ItemHint
.
ValueProvider
(
"first"
,
Collections
.<
String
,
Object
>
singletonMap
(
"target"
,
Collections
.<
String
,
Object
>
singletonMap
(
"target"
,
"foo"
)),
"foo"
)),
new
ItemHint
.
ValueProvider
(
"second"
,
null
))));
new
ItemHint
.
ValueProvider
(
"second"
,
null
))));
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
JsonMarshaller
marshaller
=
new
JsonMarshaller
();
JsonMarshaller
marshaller
=
new
JsonMarshaller
();
marshaller
.
write
(
metadata
,
outputStream
);
marshaller
.
write
(
metadata
,
outputStream
);
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java
View file @
798522d8
...
@@ -320,7 +320,8 @@ public class SpringBootPluginExtension {
...
@@ -320,7 +320,8 @@ public class SpringBootPluginExtension {
* Module Layout.
* Module Layout.
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
*/
*/
@Deprecated
MODULE
(
new
Layouts
.
Module
()),
@Deprecated
MODULE
(
new
Layouts
.
Module
()),
/**
/**
* No layout.
* No layout.
...
...
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java
View file @
798522d8
...
@@ -273,7 +273,7 @@ public class Repackager {
...
@@ -273,7 +273,7 @@ public class Repackager {
private
void
repackage
(
JarFile
sourceJar
,
JarWriter
writer
,
private
void
repackage
(
JarFile
sourceJar
,
JarWriter
writer
,
final
List
<
Library
>
unpackLibraries
,
final
List
<
Library
>
standardLibraries
)
final
List
<
Library
>
unpackLibraries
,
final
List
<
Library
>
standardLibraries
)
throws
IOException
{
throws
IOException
{
writer
.
writeManifest
(
buildManifest
(
sourceJar
));
writer
.
writeManifest
(
buildManifest
(
sourceJar
));
Set
<
String
>
seen
=
new
HashSet
<
String
>();
Set
<
String
>
seen
=
new
HashSet
<
String
>();
writeNestedLibraries
(
unpackLibraries
,
seen
,
writer
);
writeNestedLibraries
(
unpackLibraries
,
seen
,
writer
);
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java
View file @
798522d8
...
@@ -64,8 +64,8 @@ public class RandomAccessDataFile implements RandomAccessData {
...
@@ -64,8 +64,8 @@ public class RandomAccessDataFile implements RandomAccessData {
throw
new
IllegalArgumentException
(
"File must not be null"
);
throw
new
IllegalArgumentException
(
"File must not be null"
);
}
}
if
(!
file
.
exists
())
{
if
(!
file
.
exists
())
{
throw
new
IllegalArgumentException
(
String
.
format
(
throw
new
IllegalArgumentException
(
"File %s must exist"
,
file
.
getAbsolutePath
()));
String
.
format
(
"File %s must exist"
,
file
.
getAbsolutePath
()));
}
}
this
.
file
=
file
;
this
.
file
=
file
;
this
.
filePool
=
new
FilePool
(
file
,
concurrentReads
);
this
.
filePool
=
new
FilePool
(
file
,
concurrentReads
);
...
...
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java
View file @
798522d8
...
@@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
...
@@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
private
JarFile
(
RandomAccessDataFile
rootFile
,
String
pathFromRoot
,
private
JarFile
(
RandomAccessDataFile
rootFile
,
String
pathFromRoot
,
RandomAccessData
data
,
JarEntryFilter
filter
,
JarFileType
type
)
RandomAccessData
data
,
JarEntryFilter
filter
,
JarFileType
type
)
throws
IOException
{
throws
IOException
{
super
(
rootFile
.
getFile
());
super
(
rootFile
.
getFile
());
this
.
rootFile
=
rootFile
;
this
.
rootFile
=
rootFile
;
this
.
pathFromRoot
=
pathFromRoot
;
this
.
pathFromRoot
=
pathFromRoot
;
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java
View file @
798522d8
...
@@ -125,11 +125,9 @@ public class JarFileArchiveTests {
...
@@ -125,11 +125,9 @@ public class JarFileArchiveTests {
File
nested
=
new
File
(
this
.
archive
File
nested
=
new
File
(
this
.
archive
.
getNestedArchive
(
getEntriesMap
(
this
.
archive
).
get
(
"nested.jar"
)).
getUrl
()
.
getNestedArchive
(
getEntriesMap
(
this
.
archive
).
get
(
"nested.jar"
)).
getUrl
()
.
toURI
());
.
toURI
());
File
anotherNested
=
new
File
(
File
anotherNested
=
new
File
(
this
.
archive
this
.
archive
.
getNestedArchive
(
getEntriesMap
(
this
.
archive
).
get
(
"another-nested.jar"
))
.
getNestedArchive
(
.
getUrl
().
toURI
());
getEntriesMap
(
this
.
archive
).
get
(
"another-nested.jar"
))
.
getUrl
().
toURI
());
assertThat
(
nested
.
getParent
()).
isEqualTo
(
anotherNested
.
getParent
());
assertThat
(
nested
.
getParent
()).
isEqualTo
(
anotherNested
.
getParent
());
}
}
...
...
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java
View file @
798522d8
...
@@ -355,7 +355,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
...
@@ -355,7 +355,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* Module Layout.
* Module Layout.
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
*/
*/
@Deprecated
MODULE
(
new
Layouts
.
Module
()),
@Deprecated
MODULE
(
new
Layouts
.
Module
()),
/**
/**
* No Layout.
* No Layout.
...
...
spring-boot/src/main/java/org/springframework/boot/jackson/JsonObjectDeserializer.java
View file @
798522d8
...
@@ -73,7 +73,7 @@ public abstract class JsonObjectDeserializer<T>
...
@@ -73,7 +73,7 @@ public abstract class JsonObjectDeserializer<T>
*/
*/
protected
abstract
T
deserializeObject
(
JsonParser
jsonParser
,
protected
abstract
T
deserializeObject
(
JsonParser
jsonParser
,
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
throws
IOException
;
throws
IOException
;
/**
/**
* Helper method to extract a value from the given {@code jsonNode} or return
* Helper method to extract a value from the given {@code jsonNode} or return
...
...
spring-boot/src/main/java/org/springframework/boot/web/filter/ApplicationContextHeaderFilter.java
View file @
798522d8
...
@@ -50,7 +50,7 @@ public class ApplicationContextHeaderFilter extends OncePerRequestFilter {
...
@@ -50,7 +50,7 @@ public class ApplicationContextHeaderFilter extends OncePerRequestFilter {
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
response
.
addHeader
(
HEADER_NAME
,
this
.
applicationContext
.
getId
());
response
.
addHeader
(
HEADER_NAME
,
this
.
applicationContext
.
getId
());
filterChain
.
doFilter
(
request
,
response
);
filterChain
.
doFilter
(
request
,
response
);
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java
View file @
798522d8
...
@@ -86,7 +86,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
...
@@ -86,7 +86,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
chain
)
HttpServletResponse
response
,
FilterChain
chain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
ErrorPageFilter
.
this
.
doFilter
(
request
,
response
,
chain
);
ErrorPageFilter
.
this
.
doFilter
(
request
,
response
,
chain
);
}
}
...
@@ -134,7 +134,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
...
@@ -134,7 +134,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private
void
handleErrorStatus
(
HttpServletRequest
request
,
private
void
handleErrorStatus
(
HttpServletRequest
request
,
HttpServletResponse
response
,
int
status
,
String
message
)
HttpServletResponse
response
,
int
status
,
String
message
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
if
(
response
.
isCommitted
())
{
if
(
response
.
isCommitted
())
{
handleCommittedResponse
(
request
,
null
);
handleCommittedResponse
(
request
,
null
);
return
;
return
;
...
@@ -151,7 +151,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
...
@@ -151,7 +151,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private
void
handleException
(
HttpServletRequest
request
,
HttpServletResponse
response
,
private
void
handleException
(
HttpServletRequest
request
,
HttpServletResponse
response
,
ErrorWrapperResponse
wrapped
,
Throwable
ex
)
ErrorWrapperResponse
wrapped
,
Throwable
ex
)
throws
IOException
,
ServletException
{
throws
IOException
,
ServletException
{
Class
<?>
type
=
ex
.
getClass
();
Class
<?>
type
=
ex
.
getClass
();
String
errorPath
=
getErrorPath
(
type
);
String
errorPath
=
getErrorPath
(
type
);
if
(
errorPath
==
null
)
{
if
(
errorPath
==
null
)
{
...
@@ -168,7 +168,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
...
@@ -168,7 +168,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private
void
forwardToErrorPage
(
String
path
,
HttpServletRequest
request
,
private
void
forwardToErrorPage
(
String
path
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Throwable
ex
)
HttpServletResponse
response
,
Throwable
ex
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
if
(
logger
.
isErrorEnabled
())
{
if
(
logger
.
isErrorEnabled
())
{
String
message
=
"Forwarding to error page from request "
String
message
=
"Forwarding to error page from request "
+
getDescription
(
request
)
+
" due to exception ["
+
ex
.
getMessage
()
+
getDescription
(
request
)
+
" due to exception ["
+
ex
.
getMessage
()
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/AbstractEmbeddedServletContainerFactoryTests.java
View file @
798522d8
...
@@ -1124,13 +1124,13 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
...
@@ -1124,13 +1124,13 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
protected
String
getResponse
(
String
url
,
protected
String
getResponse
(
String
url
,
HttpComponentsClientHttpRequestFactory
requestFactory
,
String
...
headers
)
HttpComponentsClientHttpRequestFactory
requestFactory
,
String
...
headers
)
throws
IOException
,
URISyntaxException
{
throws
IOException
,
URISyntaxException
{
return
getResponse
(
url
,
HttpMethod
.
GET
,
requestFactory
,
headers
);
return
getResponse
(
url
,
HttpMethod
.
GET
,
requestFactory
,
headers
);
}
}
protected
String
getResponse
(
String
url
,
HttpMethod
method
,
protected
String
getResponse
(
String
url
,
HttpMethod
method
,
HttpComponentsClientHttpRequestFactory
requestFactory
,
String
...
headers
)
HttpComponentsClientHttpRequestFactory
requestFactory
,
String
...
headers
)
throws
IOException
,
URISyntaxException
{
throws
IOException
,
URISyntaxException
{
ClientHttpResponse
response
=
getClientResponse
(
url
,
method
,
requestFactory
,
ClientHttpResponse
response
=
getClientResponse
(
url
,
method
,
requestFactory
,
headers
);
headers
);
try
{
try
{
...
@@ -1162,7 +1162,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
...
@@ -1162,7 +1162,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
protected
ClientHttpResponse
getClientResponse
(
String
url
,
HttpMethod
method
,
protected
ClientHttpResponse
getClientResponse
(
String
url
,
HttpMethod
method
,
HttpComponentsClientHttpRequestFactory
requestFactory
,
String
...
headers
)
HttpComponentsClientHttpRequestFactory
requestFactory
,
String
...
headers
)
throws
IOException
,
URISyntaxException
{
throws
IOException
,
URISyntaxException
{
ClientHttpRequest
request
=
requestFactory
.
createRequest
(
new
URI
(
url
),
method
);
ClientHttpRequest
request
=
requestFactory
.
createRequest
(
new
URI
(
url
),
method
);
request
.
getHeaders
().
add
(
"Cookie"
,
"JSESSIONID="
+
"123"
);
request
.
getHeaders
().
add
(
"Cookie"
,
"JSESSIONID="
+
"123"
);
for
(
String
header
:
headers
)
{
for
(
String
header
:
headers
)
{
...
...
spring-boot/src/test/java/org/springframework/boot/jackson/JsonObjectDeserializerTests.java
View file @
798522d8
...
@@ -199,7 +199,7 @@ public class JsonObjectDeserializerTests {
...
@@ -199,7 +199,7 @@ public class JsonObjectDeserializerTests {
@Override
@Override
protected
T
deserializeObject
(
JsonParser
jsonParser
,
protected
T
deserializeObject
(
JsonParser
jsonParser
,
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
throws
IOException
{
throws
IOException
{
return
null
;
return
null
;
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/jackson/NameAndAgeJsonComponent.java
View file @
798522d8
...
@@ -49,7 +49,7 @@ public class NameAndAgeJsonComponent {
...
@@ -49,7 +49,7 @@ public class NameAndAgeJsonComponent {
@Override
@Override
protected
NameAndAge
deserializeObject
(
JsonParser
jsonParser
,
protected
NameAndAge
deserializeObject
(
JsonParser
jsonParser
,
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
DeserializationContext
context
,
ObjectCodec
codec
,
JsonNode
tree
)
throws
IOException
{
throws
IOException
{
String
name
=
nullSafeValue
(
tree
.
get
(
"name"
),
String
.
class
);
String
name
=
nullSafeValue
(
tree
.
get
(
"name"
),
String
.
class
);
Integer
age
=
nullSafeValue
(
tree
.
get
(
"age"
),
Integer
.
class
);
Integer
age
=
nullSafeValue
(
tree
.
get
(
"age"
),
Integer
.
class
);
return
new
NameAndAge
(
name
,
age
);
return
new
NameAndAge
(
name
,
age
);
...
...
spring-boot/src/test/java/org/springframework/boot/web/servlet/testcomponents/TestServlet.java
View file @
798522d8
...
@@ -30,9 +30,8 @@ public class TestServlet extends HttpServlet {
...
@@ -30,9 +30,8 @@ public class TestServlet extends HttpServlet {
@Override
@Override
protected
void
doGet
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
protected
void
doGet
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
resp
.
getWriter
()
resp
.
getWriter
().
print
(
.
print
(((
String
)
req
.
getServletContext
()
((
String
)
req
.
getServletContext
().
getAttribute
(
"listenerAttribute"
))
+
" "
.
getAttribute
(
"listenerAttribute"
))
+
" "
+
req
.
getAttribute
(
"filterAttribute"
));
+
req
.
getAttribute
(
"filterAttribute"
));
resp
.
getWriter
().
flush
();
resp
.
getWriter
().
flush
();
}
}
...
...
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