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
28166354
Commit
28166354
authored
Jul 04, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
4b2a116f
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
151 additions
and
107 deletions
+151
-107
ShutdownEndpointAutoConfigurationTests.java
...igure/context/ShutdownEndpointAutoConfigurationTests.java
+1
-0
RequestPredicateFactory.java
...uate/endpoint/web/annotation/RequestPredicateFactory.java
+1
-3
WebEndpointDiscoverer.java
...ctuate/endpoint/web/annotation/WebEndpointDiscoverer.java
+2
-2
RedisHealthIndicator.java
...ingframework/boot/actuate/redis/RedisHealthIndicator.java
+1
-1
ReactiveOAuth2ResourceServerAutoConfigurationTests.java
...e/ReactiveOAuth2ResourceServerAutoConfigurationTests.java
+2
-2
ServerPropertiesTests.java
...amework/boot/autoconfigure/web/ServerPropertiesTests.java
+4
-4
AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests.java
...actSpringBootTestEmbeddedReactiveWebEnvironmentTests.java
+2
-0
AbstractSpringBootTestWebServerWebEnvironmentTests.java
...t/AbstractSpringBootTestWebServerWebEnvironmentTests.java
+2
-0
GradleMultiDslExtension.java
...gframework/boot/gradle/junit/GradleMultiDslExtension.java
+1
-0
Dsl.java
...est/java/org/springframework/boot/gradle/testkit/Dsl.java
+1
-7
GradleBuildExtension.java
...ngframework/boot/gradle/testkit/GradleBuildExtension.java
+1
-0
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+8
-6
ExplodedArchiveTests.java
...ngframework/boot/loader/archive/ExplodedArchiveTests.java
+35
-22
package-info.java
...amework/boot/testsupport/testcontainers/package-info.java
+20
-0
ConfigurationPropertiesBeanDefinition.java
...ext/properties/ConfigurationPropertiesBeanDefinition.java
+3
-2
ConfigurationPropertiesBeanDefinitionRegistrar.java
...rties/ConfigurationPropertiesBeanDefinitionRegistrar.java
+3
-2
ConfigurationPropertiesBinder.java
...oot/context/properties/ConfigurationPropertiesBinder.java
+1
-1
ConfigurationPropertiesBinding.java
...ot/context/properties/ConfigurationPropertiesBinding.java
+2
-2
ConfigurationPropertiesBindingPostProcessor.java
...operties/ConfigurationPropertiesBindingPostProcessor.java
+1
-1
ConfigurationPropertiesBindingPostProcessorRegistrar.java
...ConfigurationPropertiesBindingPostProcessorRegistrar.java
+1
-1
ConfigurationPropertiesScan.java
.../boot/context/properties/ConfigurationPropertiesScan.java
+5
-5
ConfigurationPropertiesScanRegistrar.java
...text/properties/ConfigurationPropertiesScanRegistrar.java
+2
-2
DeprecatedConfigurationProperty.java
...t/context/properties/DeprecatedConfigurationProperty.java
+5
-4
EnableConfigurationProperties.java
...oot/context/properties/EnableConfigurationProperties.java
+7
-6
InvalidConfigurationPropertiesException.java
...t/properties/InvalidConfigurationPropertiesException.java
+2
-1
NestedConfigurationProperty.java
.../boot/context/properties/NestedConfigurationProperty.java
+7
-6
JsonComponent.java
.../java/org/springframework/boot/jackson/JsonComponent.java
+5
-4
JsonComponentModule.java
...org/springframework/boot/jackson/JsonComponentModule.java
+2
-2
AnnotationConfigReactiveWebApplicationContext.java
...ontext/AnnotationConfigReactiveWebApplicationContext.java
+4
-4
ServletComponentScanRegistrar.java
...ework/boot/web/servlet/ServletComponentScanRegistrar.java
+2
-1
WebFilterHandler.java
...rg/springframework/boot/web/servlet/WebFilterHandler.java
+1
-1
WebListenerHandler.java
.../springframework/boot/web/servlet/WebListenerHandler.java
+1
-1
WebServletHandler.java
...g/springframework/boot/web/servlet/WebServletHandler.java
+1
-1
ErrorAttributes.java
...ringframework/boot/web/servlet/error/ErrorAttributes.java
+2
-1
ConfigurationPropertiesScanTests.java
.../context/properties/ConfigurationPropertiesScanTests.java
+1
-1
ConfigurationPropertiesTests.java
...boot/context/properties/ConfigurationPropertiesTests.java
+2
-2
ConfigurationPropertiesScanConfiguration.java
.../scan/valid/ConfigurationPropertiesScanConfiguration.java
+1
-1
MockDataSizeTypeDescriptor.java
...ingframework/boot/convert/MockDataSizeTypeDescriptor.java
+2
-1
MockDurationTypeDescriptor.java
...ingframework/boot/convert/MockDurationTypeDescriptor.java
+2
-2
NameAndAgeJsonComponent.java
...springframework/boot/jackson/NameAndAgeJsonComponent.java
+1
-1
NameAndAgeJsonKeyComponent.java
...ingframework/boot/jackson/NameAndAgeJsonKeyComponent.java
+1
-1
NameAndCareerJsonComponent.java
...ingframework/boot/jackson/NameAndCareerJsonComponent.java
+1
-1
LocalServerPortTests.java
...springframework/boot/web/server/LocalServerPortTests.java
+1
-1
ServletComponentScanIntegrationTests.java
...oot/web/servlet/ServletComponentScanIntegrationTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/context/ShutdownEndpointAutoConfigurationTests.java
View file @
28166354
...
@@ -39,6 +39,7 @@ class ShutdownEndpointAutoConfigurationTests {
...
@@ -39,6 +39,7 @@ class ShutdownEndpointAutoConfigurationTests {
.
withConfiguration
(
AutoConfigurations
.
of
(
ShutdownEndpointAutoConfiguration
.
class
));
.
withConfiguration
(
AutoConfigurations
.
of
(
ShutdownEndpointAutoConfiguration
.
class
));
@Test
@Test
@SuppressWarnings
(
"unchecked"
)
void
runShouldHaveEndpointBeanThatIsNotDisposable
()
{
void
runShouldHaveEndpointBeanThatIsNotDisposable
()
{
this
.
contextRunner
.
withPropertyValues
(
"management.endpoint.shutdown.enabled:true"
)
this
.
contextRunner
.
withPropertyValues
(
"management.endpoint.shutdown.enabled:true"
)
.
withPropertyValues
(
"management.endpoints.web.exposure.include=shutdown"
).
run
((
context
)
->
{
.
withPropertyValues
(
"management.endpoints.web.exposure.include=shutdown"
).
run
((
context
)
->
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/RequestPredicateFactory.java
View file @
28166354
...
@@ -23,7 +23,6 @@ import java.util.Collections;
...
@@ -23,7 +23,6 @@ import java.util.Collections;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
import
org.springframework.boot.actuate.endpoint.EndpointId
;
import
org.springframework.boot.actuate.endpoint.OperationType
;
import
org.springframework.boot.actuate.endpoint.OperationType
;
import
org.springframework.boot.actuate.endpoint.annotation.DiscoveredOperationMethod
;
import
org.springframework.boot.actuate.endpoint.annotation.DiscoveredOperationMethod
;
import
org.springframework.boot.actuate.endpoint.annotation.Selector
;
import
org.springframework.boot.actuate.endpoint.annotation.Selector
;
...
@@ -51,8 +50,7 @@ class RequestPredicateFactory {
...
@@ -51,8 +50,7 @@ class RequestPredicateFactory {
this
.
endpointMediaTypes
=
endpointMediaTypes
;
this
.
endpointMediaTypes
=
endpointMediaTypes
;
}
}
WebOperationRequestPredicate
getRequestPredicate
(
EndpointId
endpointId
,
String
rootPath
,
WebOperationRequestPredicate
getRequestPredicate
(
String
rootPath
,
DiscoveredOperationMethod
operationMethod
)
{
DiscoveredOperationMethod
operationMethod
)
{
Method
method
=
operationMethod
.
getMethod
();
Method
method
=
operationMethod
.
getMethod
();
String
path
=
getPath
(
rootPath
,
method
);
String
path
=
getPath
(
rootPath
,
method
);
WebEndpointHttpMethod
httpMethod
=
determineHttpMethod
(
operationMethod
.
getOperationType
());
WebEndpointHttpMethod
httpMethod
=
determineHttpMethod
(
operationMethod
.
getOperationType
());
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscoverer.java
View file @
28166354
...
@@ -76,8 +76,8 @@ public class WebEndpointDiscoverer extends EndpointDiscoverer<ExposableWebEndpoi
...
@@ -76,8 +76,8 @@ public class WebEndpointDiscoverer extends EndpointDiscoverer<ExposableWebEndpoi
protected
WebOperation
createOperation
(
EndpointId
endpointId
,
DiscoveredOperationMethod
operationMethod
,
protected
WebOperation
createOperation
(
EndpointId
endpointId
,
DiscoveredOperationMethod
operationMethod
,
OperationInvoker
invoker
)
{
OperationInvoker
invoker
)
{
String
rootPath
=
PathMapper
.
getRootPath
(
this
.
endpointPathMappers
,
endpointId
);
String
rootPath
=
PathMapper
.
getRootPath
(
this
.
endpointPathMappers
,
endpointId
);
WebOperationRequestPredicate
requestPredicate
=
this
.
requestPredicateFactory
.
getRequestPredicate
(
endpointId
,
WebOperationRequestPredicate
requestPredicate
=
this
.
requestPredicateFactory
.
getRequestPredicate
(
rootPath
,
rootPath
,
operationMethod
);
operationMethod
);
return
new
DiscoveredWebOperation
(
endpointId
,
operationMethod
,
invoker
,
requestPredicate
);
return
new
DiscoveredWebOperation
(
endpointId
,
operationMethod
,
invoker
,
requestPredicate
);
}
}
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/redis/RedisHealthIndicator.java
View file @
28166354
...
@@ -66,7 +66,7 @@ public class RedisHealthIndicator extends AbstractHealthIndicator {
...
@@ -66,7 +66,7 @@ public class RedisHealthIndicator extends AbstractHealthIndicator {
}
}
}
}
finally
{
finally
{
RedisConnectionUtils
.
releaseConnection
(
connection
,
this
.
redisConnectionFactory
);
RedisConnectionUtils
.
releaseConnection
(
connection
,
this
.
redisConnectionFactory
,
false
);
}
}
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java
View file @
28166354
...
@@ -289,7 +289,7 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests {
...
@@ -289,7 +289,7 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests {
Stream
<
WebFilter
>
filters
=
filterChain
.
getWebFilters
().
toStream
();
Stream
<
WebFilter
>
filters
=
filterChain
.
getWebFilters
().
toStream
();
AuthenticationWebFilter
webFilter
=
(
AuthenticationWebFilter
)
filters
AuthenticationWebFilter
webFilter
=
(
AuthenticationWebFilter
)
filters
.
filter
((
f
)
->
f
instanceof
AuthenticationWebFilter
).
findFirst
().
orElse
(
null
);
.
filter
((
f
)
->
f
instanceof
AuthenticationWebFilter
).
findFirst
().
orElse
(
null
);
ReactiveAuthenticationManagerResolver
authenticationManagerResolver
=
(
ReactiveAuthenticationManagerResolver
)
ReflectionTestUtils
ReactiveAuthenticationManagerResolver
<?>
authenticationManagerResolver
=
(
ReactiveAuthenticationManagerResolver
<?>
)
ReflectionTestUtils
.
getField
(
webFilter
,
"authenticationManagerResolver"
);
.
getField
(
webFilter
,
"authenticationManagerResolver"
);
Object
authenticationManager
=
authenticationManagerResolver
.
resolve
(
null
).
block
();
Object
authenticationManager
=
authenticationManagerResolver
.
resolve
(
null
).
block
();
assertThat
(
authenticationManager
).
isInstanceOf
(
JwtReactiveAuthenticationManager
.
class
);
assertThat
(
authenticationManager
).
isInstanceOf
(
JwtReactiveAuthenticationManager
.
class
);
...
@@ -302,7 +302,7 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests {
...
@@ -302,7 +302,7 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests {
Stream
<
WebFilter
>
filters
=
filterChain
.
getWebFilters
().
toStream
();
Stream
<
WebFilter
>
filters
=
filterChain
.
getWebFilters
().
toStream
();
AuthenticationWebFilter
webFilter
=
(
AuthenticationWebFilter
)
filters
AuthenticationWebFilter
webFilter
=
(
AuthenticationWebFilter
)
filters
.
filter
((
f
)
->
f
instanceof
AuthenticationWebFilter
).
findFirst
().
orElse
(
null
);
.
filter
((
f
)
->
f
instanceof
AuthenticationWebFilter
).
findFirst
().
orElse
(
null
);
ReactiveAuthenticationManagerResolver
authenticationManagerResolver
=
(
ReactiveAuthenticationManagerResolver
)
ReflectionTestUtils
ReactiveAuthenticationManagerResolver
<?>
authenticationManagerResolver
=
(
ReactiveAuthenticationManagerResolver
<?>
)
ReflectionTestUtils
.
getField
(
webFilter
,
"authenticationManagerResolver"
);
.
getField
(
webFilter
,
"authenticationManagerResolver"
);
Object
authenticationManager
=
authenticationManagerResolver
.
resolve
(
null
).
block
();
Object
authenticationManager
=
authenticationManagerResolver
.
resolve
(
null
).
block
();
assertThat
(
authenticationManager
).
isInstanceOf
(
OAuth2IntrospectionReactiveAuthenticationManager
.
class
);
assertThat
(
authenticationManager
).
isInstanceOf
(
OAuth2IntrospectionReactiveAuthenticationManager
.
class
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
View file @
28166354
...
@@ -217,15 +217,15 @@ class ServerPropertiesTests {
...
@@ -217,15 +217,15 @@ class ServerPropertiesTests {
@Test
@Test
void
testCustomizeUndertowServerOption
()
{
void
testCustomizeUndertowServerOption
()
{
bind
(
"server.undertow.options.server.ALWAYS_SET_KEEP_ALIVE"
,
"true"
);
bind
(
"server.undertow.options.server.ALWAYS_SET_KEEP_ALIVE"
,
"true"
);
assertThat
(
this
.
properties
.
getUndertow
().
getOptions
().
getServer
()
.
containsKey
(
"ALWAYS_SET_KEEP_ALIVE"
));
assertThat
(
this
.
properties
.
getUndertow
().
getOptions
().
getServer
()
).
containsEntry
(
"ALWAYS_SET_KEEP_ALIVE"
,
assertThat
(
this
.
properties
.
getUndertow
().
getOptions
().
getServer
().
get
(
"ALWAYS_SET_KEEP_ALIVE"
).
equals
(
"true"
)
);
"true"
);
}
}
@Test
@Test
void
testCustomizeUndertowSocketOption
()
{
void
testCustomizeUndertowSocketOption
()
{
bind
(
"server.undertow.options.socket.ALWAYS_SET_KEEP_ALIVE"
,
"true"
);
bind
(
"server.undertow.options.socket.ALWAYS_SET_KEEP_ALIVE"
,
"true"
);
assertThat
(
this
.
properties
.
getUndertow
().
getOptions
().
getSocket
()
.
containsKey
(
"ALWAYS_SET_KEEP_ALIVE"
));
assertThat
(
this
.
properties
.
getUndertow
().
getOptions
().
getSocket
()
).
containsEntry
(
"ALWAYS_SET_KEEP_ALIVE"
,
assertThat
(
this
.
properties
.
getUndertow
().
getOptions
().
getSocket
().
get
(
"ALWAYS_SET_KEEP_ALIVE"
).
equals
(
"true"
)
);
"true"
);
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests.java
View file @
28166354
...
@@ -28,6 +28,7 @@ import org.springframework.boot.web.reactive.server.ReactiveWebServerFactory;
...
@@ -28,6 +28,7 @@ import org.springframework.boot.web.reactive.server.ReactiveWebServerFactory;
import
org.springframework.boot.web.server.LocalServerPort
;
import
org.springframework.boot.web.server.LocalServerPort
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.http.server.reactive.HttpHandler
;
import
org.springframework.http.server.reactive.HttpHandler
;
import
org.springframework.test.web.reactive.server.WebTestClient
;
import
org.springframework.test.web.reactive.server.WebTestClient
;
...
@@ -86,6 +87,7 @@ abstract class AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests {
...
@@ -86,6 +87,7 @@ abstract class AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests {
assertThat
(
this
.
value
).
isEqualTo
(
123
);
assertThat
(
this
.
value
).
isEqualTo
(
123
);
}
}
@Configuration
(
proxyBeanMethods
=
false
)
static
class
AbstractConfig
{
static
class
AbstractConfig
{
@Value
(
"${server.port:8080}"
)
@Value
(
"${server.port:8080}"
)
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/AbstractSpringBootTestWebServerWebEnvironmentTests.java
View file @
28166354
...
@@ -27,6 +27,7 @@ import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactor
...
@@ -27,6 +27,7 @@ import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactor
import
org.springframework.boot.web.server.LocalServerPort
;
import
org.springframework.boot.web.server.LocalServerPort
;
import
org.springframework.boot.web.servlet.server.ServletWebServerFactory
;
import
org.springframework.boot.web.servlet.server.ServletWebServerFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -91,6 +92,7 @@ abstract class AbstractSpringBootTestWebServerWebEnvironmentTests {
...
@@ -91,6 +92,7 @@ abstract class AbstractSpringBootTestWebServerWebEnvironmentTests {
assertThat
(
this
.
context
).
isSameAs
(
WebApplicationContextUtils
.
getWebApplicationContext
(
this
.
servletContext
));
assertThat
(
this
.
context
).
isSameAs
(
WebApplicationContextUtils
.
getWebApplicationContext
(
this
.
servletContext
));
}
}
@Configuration
(
proxyBeanMethods
=
false
)
static
class
AbstractConfig
{
static
class
AbstractConfig
{
@Value
(
"${server.port:8080}"
)
@Value
(
"${server.port:8080}"
)
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleMultiDslExtension.java
View file @
28166354
...
@@ -20,6 +20,7 @@ import java.util.Arrays;
...
@@ -20,6 +20,7 @@ import java.util.Arrays;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
import
org.junit.jupiter.api.TestTemplate
;
import
org.junit.jupiter.api.extension.Extension
;
import
org.junit.jupiter.api.extension.Extension
;
import
org.junit.jupiter.api.extension.ExtensionContext
;
import
org.junit.jupiter.api.extension.ExtensionContext
;
import
org.junit.jupiter.api.extension.TestTemplateInvocationContext
;
import
org.junit.jupiter.api.extension.TestTemplateInvocationContext
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/Dsl.java
View file @
28166354
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -31,16 +31,10 @@ public enum Dsl {
...
@@ -31,16 +31,10 @@ public enum Dsl {
this
.
extension
=
extension
;
this
.
extension
=
extension
;
}
}
/**
* Gets the user-friendly name of the DSL
*/
public
String
getName
()
{
public
String
getName
()
{
return
this
.
name
;
return
this
.
name
;
}
}
/**
* Gets the file extension of build scripts (starting with a dot)
*/
String
getExtension
()
{
String
getExtension
()
{
return
this
.
extension
;
return
this
.
extension
;
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/GradleBuildExtension.java
View file @
28166354
...
@@ -22,6 +22,7 @@ import java.util.regex.Pattern;
...
@@ -22,6 +22,7 @@ import java.util.regex.Pattern;
import
org.junit.jupiter.api.extension.AfterEachCallback
;
import
org.junit.jupiter.api.extension.AfterEachCallback
;
import
org.junit.jupiter.api.extension.BeforeEachCallback
;
import
org.junit.jupiter.api.extension.BeforeEachCallback
;
import
org.junit.jupiter.api.extension.Extension
;
import
org.junit.jupiter.api.extension.ExtensionContext
;
import
org.junit.jupiter.api.extension.ExtensionContext
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.util.ReflectionUtils
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
28166354
...
@@ -418,12 +418,14 @@ public class PropertiesLauncher extends Launcher {
...
@@ -418,12 +418,14 @@ public class PropertiesLauncher extends Launcher {
try
{
try
{
if
(
this
.
home
!=
null
)
{
if
(
this
.
home
!=
null
)
{
// Prefer home dir for MANIFEST if there is one
// Prefer home dir for MANIFEST if there is one
Manifest
manifest
=
new
ExplodedArchive
(
this
.
home
,
false
).
getManifest
();
try
(
ExplodedArchive
archive
=
new
ExplodedArchive
(
this
.
home
,
false
))
{
if
(
manifest
!=
null
)
{
Manifest
manifest
=
archive
.
getManifest
();
String
value
=
manifest
.
getMainAttributes
().
getValue
(
manifestKey
);
if
(
manifest
!=
null
)
{
if
(
value
!=
null
)
{
String
value
=
manifest
.
getMainAttributes
().
getValue
(
manifestKey
);
debug
(
"Property '"
+
manifestKey
+
"' from home directory manifest: "
+
value
);
if
(
value
!=
null
)
{
return
SystemPropertyUtils
.
resolvePlaceholders
(
this
.
properties
,
value
);
debug
(
"Property '"
+
manifestKey
+
"' from home directory manifest: "
+
value
);
return
SystemPropertyUtils
.
resolvePlaceholders
(
this
.
properties
,
value
);
}
}
}
}
}
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java
View file @
28166354
...
@@ -27,6 +27,7 @@ import java.util.UUID;
...
@@ -27,6 +27,7 @@ import java.util.UUID;
import
java.util.jar.JarEntry
;
import
java.util.jar.JarEntry
;
import
java.util.jar.JarFile
;
import
java.util.jar.JarFile
;
import
org.junit.jupiter.api.AfterEach
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.io.TempDir
;
import
org.junit.jupiter.api.io.TempDir
;
...
@@ -59,6 +60,13 @@ class ExplodedArchiveTests {
...
@@ -59,6 +60,13 @@ class ExplodedArchiveTests {
createArchive
();
createArchive
();
}
}
@AfterEach
void
tearDown
()
throws
Exception
{
if
(
this
.
archive
!=
null
)
{
this
.
archive
.
close
();
}
}
private
void
createArchive
()
throws
Exception
{
private
void
createArchive
()
throws
Exception
{
createArchive
(
null
);
createArchive
(
null
);
}
}
...
@@ -126,44 +134,49 @@ class ExplodedArchiveTests {
...
@@ -126,44 +134,49 @@ class ExplodedArchiveTests {
}
}
@Test
@Test
void
getNonRecursiveEntriesForRoot
()
{
void
getNonRecursiveEntriesForRoot
()
throws
Exception
{
ExplodedArchive
archive
=
new
ExplodedArchive
(
new
File
(
"/"
),
false
);
try
(
ExplodedArchive
explodedArchive
=
new
ExplodedArchive
(
new
File
(
"/"
),
false
))
{
Map
<
String
,
Archive
.
Entry
>
entries
=
getEntriesMap
(
archive
);
Map
<
String
,
Archive
.
Entry
>
entries
=
getEntriesMap
(
explodedArchive
);
assertThat
(
entries
.
size
()).
isGreaterThan
(
1
);
assertThat
(
entries
.
size
()).
isGreaterThan
(
1
);
}
}
}
@Test
@Test
void
getNonRecursiveManifest
()
throws
Exception
{
void
getNonRecursiveManifest
()
throws
Exception
{
ExplodedArchive
archive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
));
try
(
ExplodedArchive
explodedArchive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
)))
{
assertThat
(
archive
.
getManifest
()).
isNotNull
();
assertThat
(
explodedArchive
.
getManifest
()).
isNotNull
();
Map
<
String
,
Archive
.
Entry
>
entries
=
getEntriesMap
(
archive
);
Map
<
String
,
Archive
.
Entry
>
entries
=
getEntriesMap
(
explodedArchive
);
assertThat
(
entries
.
size
()).
isEqualTo
(
4
);
assertThat
(
entries
.
size
()).
isEqualTo
(
4
);
}
}
}
@Test
@Test
void
getNonRecursiveManifestEvenIfNonRecursive
()
throws
Exception
{
void
getNonRecursiveManifestEvenIfNonRecursive
()
throws
Exception
{
ExplodedArchive
archive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
),
false
);
try
(
ExplodedArchive
explodedArchive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
),
false
))
{
assertThat
(
archive
.
getManifest
()).
isNotNull
();
assertThat
(
this
.
archive
.
getManifest
()).
isNotNull
();
Map
<
String
,
Archive
.
Entry
>
entries
=
getEntriesMap
(
archive
);
Map
<
String
,
Archive
.
Entry
>
entries
=
getEntriesMap
(
this
.
archive
);
assertThat
(
entries
.
size
()).
isEqualTo
(
3
);
assertThat
(
entries
.
size
()).
isEqualTo
(
3
);
}
}
}
@Test
@Test
void
getResourceAsStream
()
throws
Exception
{
void
getResourceAsStream
()
throws
Exception
{
ExplodedArchive
archive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
));
try
(
ExplodedArchive
explodedArchive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
)))
{
assertThat
(
archive
.
getManifest
()).
isNotNull
();
assertThat
(
explodedArchive
.
getManifest
()).
isNotNull
();
URLClassLoader
loader
=
new
URLClassLoader
(
new
URL
[]
{
archive
.
getUrl
()
});
URLClassLoader
loader
=
new
URLClassLoader
(
new
URL
[]
{
explodedArchive
.
getUrl
()
});
assertThat
(
loader
.
getResourceAsStream
(
"META-INF/spring/application.xml"
)).
isNotNull
();
assertThat
(
loader
.
getResourceAsStream
(
"META-INF/spring/application.xml"
)).
isNotNull
();
loader
.
close
();
loader
.
close
();
}
}
}
@Test
@Test
void
getResourceAsStreamNonRecursive
()
throws
Exception
{
void
getResourceAsStreamNonRecursive
()
throws
Exception
{
ExplodedArchive
archive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
),
false
);
try
(
ExplodedArchive
explodedArchive
=
new
ExplodedArchive
(
new
File
(
"src/test/resources/root"
),
false
))
{
assertThat
(
archive
.
getManifest
()).
isNotNull
();
assertThat
(
explodedArchive
.
getManifest
()).
isNotNull
();
URLClassLoader
loader
=
new
URLClassLoader
(
new
URL
[]
{
archive
.
getUrl
()
});
URLClassLoader
loader
=
new
URLClassLoader
(
new
URL
[]
{
explodedArchive
.
getUrl
()
});
assertThat
(
loader
.
getResourceAsStream
(
"META-INF/spring/application.xml"
)).
isNotNull
();
assertThat
(
loader
.
getResourceAsStream
(
"META-INF/spring/application.xml"
)).
isNotNull
();
loader
.
close
();
loader
.
close
();
}
}
}
private
Map
<
String
,
Archive
.
Entry
>
getEntriesMap
(
Archive
archive
)
{
private
Map
<
String
,
Archive
.
Entry
>
getEntriesMap
(
Archive
archive
)
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/package-info.java
0 → 100644
View file @
28166354
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Support for testing with Testcontainers.
*/
package
org
.
springframework
.
boot
.
testsupport
.
testcontainers
;
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanDefinition.java
View file @
28166354
...
@@ -27,8 +27,9 @@ import org.springframework.core.annotation.AnnotationUtils;
...
@@ -27,8 +27,9 @@ import org.springframework.core.annotation.AnnotationUtils;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
/**
/**
* {@link BeanDefinition} that is used for registering {@link ConfigurationProperties}
* {@link BeanDefinition} that is used for registering
* beans that are bound at creation time.
* {@link ConfigurationProperties @ConfigurationProperties} beans that are bound at
* creation time.
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
* @author Madhura Bhave
* @author Madhura Bhave
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanDefinitionRegistrar.java
View file @
28166354
...
@@ -34,8 +34,9 @@ import org.springframework.util.Assert;
...
@@ -34,8 +34,9 @@ import org.springframework.util.Assert;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
/**
/**
* Registers a bean definition for a type annotated with {@link ConfigurationProperties}
* Registers a bean definition for a type annotated with
* using the prefix of the annotation in the bean name.
* {@link ConfigurationProperties @ConfigurationProperties} using the prefix of the
* annotation in the bean name.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBinder.java
View file @
28166354
...
@@ -46,7 +46,7 @@ import org.springframework.validation.annotation.Validated;
...
@@ -46,7 +46,7 @@ import org.springframework.validation.annotation.Validated;
/**
/**
* Internal class by the {@link ConfigurationPropertiesBindingPostProcessor} to handle the
* Internal class by the {@link ConfigurationPropertiesBindingPostProcessor} to handle the
* actual {@link ConfigurationProperties} binding.
* actual {@link ConfigurationProperties
@ConfigurationProperties
} binding.
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
* @author Phillip Webb
* @author Phillip Webb
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBinding.java
View file @
28166354
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -26,7 +26,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
...
@@ -26,7 +26,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
/**
/**
* Qualifier for beans that are needed to configure the binding of
* Qualifier for beans that are needed to configure the binding of
* {@link ConfigurationProperties} (e.g. Converters).
* {@link ConfigurationProperties
@ConfigurationProperties
} (e.g. Converters).
*
*
* @author Dave Syer
* @author Dave Syer
* @since 1.3.0
* @since 1.3.0
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java
View file @
28166354
...
@@ -36,7 +36,7 @@ import org.springframework.validation.annotation.Validated;
...
@@ -36,7 +36,7 @@ import org.springframework.validation.annotation.Validated;
/**
/**
* {@link BeanPostProcessor} to bind {@link PropertySources} to beans annotated with
* {@link BeanPostProcessor} to bind {@link PropertySources} to beans annotated with
* {@link ConfigurationProperties}.
* {@link ConfigurationProperties
@ConfigurationProperties
}.
*
*
* @author Dave Syer
* @author Dave Syer
* @author Phillip Webb
* @author Phillip Webb
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorRegistrar.java
View file @
28166354
...
@@ -24,7 +24,7 @@ import org.springframework.core.type.AnnotationMetadata;
...
@@ -24,7 +24,7 @@ import org.springframework.core.type.AnnotationMetadata;
/**
/**
* {@link ImportBeanDefinitionRegistrar} for binding externalized application properties
* {@link ImportBeanDefinitionRegistrar} for binding externalized application properties
* to {@link ConfigurationProperties} beans.
* to {@link ConfigurationProperties
@ConfigurationProperties
} beans.
*
*
* @author Dave Syer
* @author Dave Syer
* @author Phillip Webb
* @author Phillip Webb
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesScan.java
View file @
28166354
...
@@ -25,11 +25,11 @@ import org.springframework.context.annotation.Import;
...
@@ -25,11 +25,11 @@ import org.springframework.context.annotation.Import;
import
org.springframework.core.annotation.AliasFor
;
import
org.springframework.core.annotation.AliasFor
;
/**
/**
* Configures the base packages used when scanning for
{@link ConfigurationProperties}
* Configures the base packages used when scanning for
*
classes. One of {@link #basePackageClasses()}, {@link #basePackages()} or its alias
*
{@link ConfigurationProperties @ConfigurationProperties} classes. One of
* {@link #
value()} may be specified to define specific packages to scan. If specific
* {@link #
basePackageClasses()}, {@link #basePackages()} or its alias {@link #value()}
*
packages are not defined scanning will occur from the package of the class with this
*
may be specified to define specific packages to scan. If specific packages are not
* annotation.
*
defined scanning will occur from the package of the class with this
annotation.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
* @since 2.2.0
* @since 2.2.0
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanRegistrar.java
View file @
28166354
...
@@ -38,8 +38,8 @@ import org.springframework.util.ClassUtils;
...
@@ -38,8 +38,8 @@ import org.springframework.util.ClassUtils;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
/**
/**
* {@link ImportBeanDefinitionRegistrar} for registering
{@link ConfigurationProperties}
* {@link ImportBeanDefinitionRegistrar} for registering
* bean definitions via scanning.
*
{@link ConfigurationProperties @ConfigurationProperties}
bean definitions via scanning.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/DeprecatedConfigurationProperty.java
View file @
28166354
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -23,9 +23,10 @@ import java.lang.annotation.RetentionPolicy;
...
@@ -23,9 +23,10 @@ import java.lang.annotation.RetentionPolicy;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
/**
* Indicates that a getter in a {@link ConfigurationProperties} object is deprecated. This
* Indicates that a getter in a {@link ConfigurationProperties @ConfigurationProperties}
* annotation has no bearing on the actual binding processes, but it is used by the
* object is deprecated. This annotation has no bearing on the actual binding processes,
* {@code spring-boot-configuration-processor} to add deprecation meta-data.
* but it is used by the {@code spring-boot-configuration-processor} to add deprecation
* meta-data.
* <p>
* <p>
* This annotation <strong>must</strong> be used on the getter of the deprecated element.
* This annotation <strong>must</strong> be used on the getter of the deprecated element.
*
*
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/EnableConfigurationProperties.java
View file @
28166354
...
@@ -26,9 +26,9 @@ import org.springframework.context.annotation.Bean;
...
@@ -26,9 +26,9 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
/**
/**
* Enable support for {@link ConfigurationProperties
} annotated beans.
* Enable support for {@link ConfigurationProperties
@ConfigurationProperties} annotated
*
{@link ConfigurationProperties} beans can be registered in the standard way (for
*
beans. {@code @ConfigurationProperties} beans can be registered in the standard way
* example using {@link Bean @Bean} methods) or, for convenience, can be specified
*
(for
example using {@link Bean @Bean} methods) or, for convenience, can be specified
* directly on this annotation.
* directly on this annotation.
*
*
* @author Dave Syer
* @author Dave Syer
...
@@ -41,9 +41,10 @@ import org.springframework.context.annotation.Import;
...
@@ -41,9 +41,10 @@ import org.springframework.context.annotation.Import;
public
@interface
EnableConfigurationProperties
{
public
@interface
EnableConfigurationProperties
{
/**
/**
* Convenient way to quickly register {@link ConfigurationProperties} annotated beans
* Convenient way to quickly register
* with Spring. Standard Spring Beans will also be scanned regardless of this value.
* {@link ConfigurationProperties @ConfigurationProperties} annotated beans with
* @return {@link ConfigurationProperties} annotated beans to register
* Spring. Standard Spring Beans will also be scanned regardless of this value.
* @return {@code @ConfigurationProperties} annotated beans to register
*/
*/
Class
<?>[]
value
()
default
{};
Class
<?>[]
value
()
default
{};
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/InvalidConfigurationPropertiesException.java
View file @
28166354
...
@@ -19,7 +19,8 @@ package org.springframework.boot.context.properties;
...
@@ -19,7 +19,8 @@ package org.springframework.boot.context.properties;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
/**
/**
* Exception thrown when a {@link ConfigurationProperties} has been misconfigured.
* Exception thrown when a {@link ConfigurationProperties @ConfigurationProperties} has
* been misconfigured.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
* @since 2.2.0
* @since 2.2.0
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/NestedConfigurationProperty.java
View file @
28166354
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -23,11 +23,12 @@ import java.lang.annotation.RetentionPolicy;
...
@@ -23,11 +23,12 @@ import java.lang.annotation.RetentionPolicy;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
/**
* Indicates that a field in a {@link ConfigurationProperties} object should be treated as
* Indicates that a field in a {@link ConfigurationProperties @ConfigurationProperties}
* if it were a nested type. This annotation has no bearing on the actual binding
* object should be treated as if it were a nested type. This annotation has no bearing on
* processes, but it is used by the {@code spring-boot-configuration-processor} as a hint
* the actual binding processes, but it is used by the
* that a field is not bound as a single value. When this is specified, a nested group is
* {@code spring-boot-configuration-processor} as a hint that a field is not bound as a
* created for the field and its type is harvested.
* single value. When this is specified, a nested group is created for the field and its
* type is harvested.
* <p>
* <p>
* This has no effect on collections and maps as these types are automatically identified.
* This has no effect on collections and maps as these types are automatically identified.
*
*
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jackson/JsonComponent.java
View file @
28166354
...
@@ -30,10 +30,11 @@ import org.springframework.core.annotation.AliasFor;
...
@@ -30,10 +30,11 @@ import org.springframework.core.annotation.AliasFor;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
/**
/**
* {@link Component} that provides {@link JsonSerializer}, {@link JsonDeserializer} or
* {@link Component @Component} that provides {@link JsonSerializer},
* {@link KeyDeserializer} implementations to be registered with Jackson when
* {@link JsonDeserializer} or {@link KeyDeserializer} implementations to be registered
* {@link JsonComponentModule} is in use. Can be used to annotate implementations directly
* with Jackson when {@link JsonComponentModule} is in use. Can be used to annotate
* or a class that contains them as inner-classes. For example: <pre class="code">
* implementations directly or a class that contains them as inner-classes. For example:
* <pre class="code">
* @JsonComponent
* @JsonComponent
* public class CustomerJsonComponent {
* public class CustomerJsonComponent {
*
*
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jackson/JsonComponentModule.java
View file @
28166354
...
@@ -43,8 +43,8 @@ import org.springframework.util.Assert;
...
@@ -43,8 +43,8 @@ import org.springframework.util.Assert;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
/**
/**
* Spring Bean and Jackson {@link Module} to register {@link JsonComponent
} annotated
* Spring Bean and Jackson {@link Module} to register {@link JsonComponent
@JsonComponent}
* beans.
*
annotated
beans.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Paul Aly
* @author Paul Aly
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebApplicationContext.java
View file @
28166354
...
@@ -199,8 +199,8 @@ public class AnnotationConfigReactiveWebApplicationContext extends AnnotationCon
...
@@ -199,8 +199,8 @@ public class AnnotationConfigReactiveWebApplicationContext extends AnnotationCon
* If not set, the implementation may use a default as appropriate.
* If not set, the implementation may use a default as appropriate.
* @param location the config location
* @param location the config location
* @deprecated since 2.2.0 since this class no longer extends
* @deprecated since 2.2.0 since this class no longer extends
* {@code AbstractRefreshableConfigApplicationContext}. Use
{@link ImportResource}
* {@code AbstractRefreshableConfigApplicationContext}. Use
* instead.
*
{@link ImportResource @ImportResource}
instead.
*/
*/
@Deprecated
@Deprecated
public
void
setConfigLocation
(
String
location
)
{
public
void
setConfigLocation
(
String
location
)
{
...
@@ -213,8 +213,8 @@ public class AnnotationConfigReactiveWebApplicationContext extends AnnotationCon
...
@@ -213,8 +213,8 @@ public class AnnotationConfigReactiveWebApplicationContext extends AnnotationCon
* If not set, the implementation may use a default as appropriate.
* If not set, the implementation may use a default as appropriate.
* @param locations the config locations
* @param locations the config locations
* @deprecated since 2.2.0 since this class no longer extends
* @deprecated since 2.2.0 since this class no longer extends
* {@code AbstractRefreshableConfigApplicationContext}. Use
{@link ImportResource}
* {@code AbstractRefreshableConfigApplicationContext}. Use
* instead.
*
{@link ImportResource @ImportResource}
instead.
*/
*/
@Deprecated
@Deprecated
public
void
setConfigLocations
(
@Nullable
String
...
locations
)
{
public
void
setConfigLocations
(
@Nullable
String
...
locations
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletComponentScanRegistrar.java
View file @
28166354
...
@@ -30,7 +30,8 @@ import org.springframework.core.type.AnnotationMetadata;
...
@@ -30,7 +30,8 @@ import org.springframework.core.type.AnnotationMetadata;
import
org.springframework.util.ClassUtils
;
import
org.springframework.util.ClassUtils
;
/**
/**
* {@link ImportBeanDefinitionRegistrar} used by {@link ServletComponentScan}.
* {@link ImportBeanDefinitionRegistrar} used by
* {@link ServletComponentScan @ServletComponentScan}.
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Stephane Nicoll
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/WebFilterHandler.java
View file @
28166354
...
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.ScannedGenericBeanDefinition;
...
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.ScannedGenericBeanDefinition;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
/**
/**
* Handler for {@link WebFilter}-annotated classes.
* Handler for {@link WebFilter
@WebFilter
}-annotated classes.
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/WebListenerHandler.java
View file @
28166354
...
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
...
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import
org.springframework.context.annotation.ScannedGenericBeanDefinition
;
import
org.springframework.context.annotation.ScannedGenericBeanDefinition
;
/**
/**
* Handler for {@link WebListener}-annotated classes.
* Handler for {@link WebListener
@WebListener
}-annotated classes.
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/WebServletHandler.java
View file @
28166354
...
@@ -29,7 +29,7 @@ import org.springframework.context.annotation.ScannedGenericBeanDefinition;
...
@@ -29,7 +29,7 @@ import org.springframework.context.annotation.ScannedGenericBeanDefinition;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
/**
/**
* Handler for {@link WebServlet}-annotated classes.
* Handler for {@link WebServlet
@WebServlet
}-annotated classes.
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/error/ErrorAttributes.java
View file @
28166354
...
@@ -33,7 +33,8 @@ public interface ErrorAttributes {
...
@@ -33,7 +33,8 @@ public interface ErrorAttributes {
/**
/**
* Returns a {@link Map} of the error attributes. The map can be used as the model of
* Returns a {@link Map} of the error attributes. The map can be used as the model of
* an error page {@link ModelAndView}, or returned as a {@link ResponseBody}.
* an error page {@link ModelAndView}, or returned as a
* {@link ResponseBody @ResponseBody}.
* @param webRequest the source request
* @param webRequest the source request
* @param includeStackTrace if stack trace elements should be included
* @param includeStackTrace if stack trace elements should be included
* @return a map of error attributes
* @return a map of error attributes
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesScanTests.java
View file @
28166354
...
@@ -31,7 +31,7 @@ import static org.mockito.BDDMockito.given;
...
@@ -31,7 +31,7 @@ import static org.mockito.BDDMockito.given;
import
static
org
.
mockito
.
BDDMockito
.
willCallRealMethod
;
import
static
org
.
mockito
.
BDDMockito
.
willCallRealMethod
;
/**
/**
* Integration tests for {@link ConfigurationPropertiesScan}.
* Integration tests for {@link ConfigurationPropertiesScan
@ConfigurationPropertiesScan
}.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
* @author Johnny Lim
* @author Johnny Lim
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java
View file @
28166354
...
@@ -92,8 +92,8 @@ import static org.mockito.Mockito.mock;
...
@@ -92,8 +92,8 @@ import static org.mockito.Mockito.mock;
import
static
org
.
mockito
.
Mockito
.
verify
;
import
static
org
.
mockito
.
Mockito
.
verify
;
/**
/**
* Tests for {@link ConfigurationProperties
} annotated beans. Covers
* Tests for {@link ConfigurationProperties
@ConfigurationProperties}-annotated beans.
*
{@link
EnableConfigurationProperties},
*
Covers {@link EnableConfigurationProperties @
EnableConfigurationProperties},
* {@link ConfigurationPropertiesBindingPostProcessorRegistrar},
* {@link ConfigurationPropertiesBindingPostProcessorRegistrar},
* {@link ConfigurationPropertiesBindingPostProcessor} and
* {@link ConfigurationPropertiesBindingPostProcessor} and
* {@link ConfigurationPropertiesBinder}.
* {@link ConfigurationPropertiesBinder}.
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/scan/valid/ConfigurationPropertiesScanConfiguration.java
View file @
28166354
...
@@ -21,7 +21,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
...
@@ -21,7 +21,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import
org.springframework.boot.context.properties.scan.valid.b.BScanConfiguration
;
import
org.springframework.boot.context.properties.scan.valid.b.BScanConfiguration
;
/**
/**
* Used for testing {@link ConfigurationProperties} scanning.
* Used for testing {@link ConfigurationProperties
@ConfigurationProperties
} scanning.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/MockDataSizeTypeDescriptor.java
View file @
28166354
...
@@ -27,7 +27,8 @@ import static org.mockito.BDDMockito.given;
...
@@ -27,7 +27,8 @@ import static org.mockito.BDDMockito.given;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
/**
/**
* Create a mock {@link TypeDescriptor} with optional {@link DataSizeUnit} annotation.
* Create a mock {@link TypeDescriptor} with optional {@link DataSizeUnit @DataSizeUnit}
* annotation.
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/MockDurationTypeDescriptor.java
View file @
28166354
...
@@ -27,8 +27,8 @@ import static org.mockito.BDDMockito.given;
...
@@ -27,8 +27,8 @@ import static org.mockito.BDDMockito.given;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
/**
/**
* Create a mock {@link TypeDescriptor} with optional {@link DurationUnit
} and
* Create a mock {@link TypeDescriptor} with optional {@link DurationUnit
@DurationUnit}
*
{@link
DurationFormat} annotations.
*
and {@link DurationFormat @
DurationFormat} annotations.
*
*
* @author Phillip Webb
* @author Phillip Webb
*/
*/
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/NameAndAgeJsonComponent.java
View file @
28166354
...
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.JsonNode;
...
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
/**
/**
* Sample {@link JsonComponent} used for tests.
* Sample {@link JsonComponent
@JsonComponent
} used for tests.
*
*
* @author Phillip Webb
* @author Phillip Webb
*/
*/
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/NameAndAgeJsonKeyComponent.java
View file @
28166354
...
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.KeyDeserializer;
...
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.databind.KeyDeserializer;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
/**
/**
* Sample {@link JsonComponent} used for tests.
* Sample {@link JsonComponent
@JsonComponent
} used for tests.
*
*
* @author Paul Aly
* @author Paul Aly
*/
*/
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jackson/NameAndCareerJsonComponent.java
View file @
28166354
...
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.JsonNode;
...
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
/**
/**
* Sample {@link JsonComponent} used for tests.
* Sample {@link JsonComponent
@JsonComponent
} used for tests.
*
*
* @author Paul Aly
* @author Paul Aly
*/
*/
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/LocalServerPortTests.java
View file @
28166354
...
@@ -27,7 +27,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
...
@@ -27,7 +27,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
/**
* Tests for {@link LocalServerPort}.
* Tests for {@link LocalServerPort
@LocalServerPort
}.
*
*
* @author Anand Shah
* @author Anand Shah
* @author Phillip Webb
* @author Phillip Webb
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletComponentScanIntegrationTests.java
View file @
28166354
...
@@ -34,7 +34,7 @@ import org.springframework.web.client.RestTemplate;
...
@@ -34,7 +34,7 @@ import org.springframework.web.client.RestTemplate;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
/**
* Integration tests for {@link ServletComponentScan}
* Integration tests for {@link ServletComponentScan
@ServletComponentScan
}
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
...
...
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