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
6a556239
Commit
6a556239
authored
Dec 13, 2017
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
e29ce3f7
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
31 deletions
+42
-31
AuditEvent.java
...va/org/springframework/boot/actuate/audit/AuditEvent.java
+1
-1
EnvironmentEndpoint.java
...gframework/boot/actuate/endpoint/EnvironmentEndpoint.java
+4
-3
EndpointWebMvcHypermediaManagementContextConfigurationTests.java
...tWebMvcHypermediaManagementContextConfigurationTests.java
+4
-2
EndpointWebMvcManagementContextConfigurationTests.java
...re/EndpointWebMvcManagementContextConfigurationTests.java
+23
-14
EmbeddedDatabaseConnection.java
...k/boot/autoconfigure/jdbc/EmbeddedDatabaseConnection.java
+1
-1
ElasticsearchDataAutoConfigurationTests.java
...lasticsearch/ElasticsearchDataAutoConfigurationTests.java
+6
-6
DataSourcePropertiesTests.java
...rk/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java
+2
-2
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
JsonContent.java
.../java/org/springframework/boot/test/json/JsonContent.java
+0
-1
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/AuditEvent.java
View file @
6a556239
...
...
@@ -87,7 +87,7 @@ public class AuditEvent implements Serializable {
Assert
.
notNull
(
timestamp
,
"Timestamp must not be null"
);
Assert
.
notNull
(
type
,
"Type must not be null"
);
this
.
timestamp
=
timestamp
;
this
.
principal
=
principal
!=
null
?
principal
:
""
;
this
.
principal
=
(
principal
!=
null
?
principal
:
""
)
;
this
.
type
=
type
;
this
.
data
=
Collections
.
unmodifiableMap
(
data
);
}
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EnvironmentEndpoint.java
View file @
6a556239
...
...
@@ -69,9 +69,10 @@ public class EnvironmentEndpoint extends AbstractEndpoint<Map<String, Object>> {
EnumerablePropertySource
<?>
enumerable
=
(
EnumerablePropertySource
<?>)
source
;
Map
<
String
,
Object
>
properties
=
new
LinkedHashMap
<
String
,
Object
>();
for
(
String
name
:
enumerable
.
getPropertyNames
())
{
Object
property
=
source
.
getProperty
(
name
);
Object
resolved
=
property
instanceof
String
?
resolver
.
resolvePlaceholders
((
String
)
property
)
:
property
;
Object
resolved
=
source
.
getProperty
(
name
);
if
(
resolved
instanceof
String
)
{
resolved
=
resolver
.
resolvePlaceholders
((
String
)
resolved
);
}
properties
.
put
(
name
,
sanitize
(
name
,
resolved
));
}
properties
=
postProcessSourceProperties
(
sourceName
,
properties
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfigurationTests.java
View file @
6a556239
...
...
@@ -183,7 +183,8 @@ public class EndpointWebMvcHypermediaManagementContextConfigurationTests {
static
class
DocsConfiguration
{
@Bean
public
DocsMvcEndpoint
testDocsMvcEndpoint
(
ManagementServletContext
managementServletContext
)
{
public
DocsMvcEndpoint
testDocsMvcEndpoint
(
ManagementServletContext
managementServletContext
)
{
return
new
TestDocsMvcEndpoint
(
managementServletContext
);
}
...
...
@@ -193,7 +194,8 @@ public class EndpointWebMvcHypermediaManagementContextConfigurationTests {
static
class
HalJsonConfiguration
{
@Bean
public
HalJsonMvcEndpoint
testHalJsonMvcEndpoint
(
ManagementServletContext
managementServletContext
)
{
public
HalJsonMvcEndpoint
testHalJsonMvcEndpoint
(
ManagementServletContext
managementServletContext
)
{
return
new
TestHalJsonMvcEndpoint
(
managementServletContext
);
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfigurationTests.java
View file @
6a556239
...
...
@@ -111,13 +111,15 @@ public class EndpointWebMvcManagementContextConfigurationTests {
public
void
envMvcEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
EnvConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
EnvironmentMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
EnvironmentMvcEndpoint
.
class
);
EnvironmentMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
EnvironmentMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestEnvMvcEndpoint
.
class
);
}
@Test
public
void
metricsMvcEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
MetricsConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
register
(
MetricsConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
MetricsMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
MetricsMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestMetricsMvcEndpoint
.
class
);
...
...
@@ -125,7 +127,8 @@ public class EndpointWebMvcManagementContextConfigurationTests {
@Test
public
void
logFileMvcEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
LogFileConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
register
(
LogFileConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
LogFileMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
LogFileMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestLogFileMvcEndpoint
.
class
);
...
...
@@ -133,7 +136,8 @@ public class EndpointWebMvcManagementContextConfigurationTests {
@Test
public
void
shutdownEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
ShutdownConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
register
(
ShutdownConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
ShutdownMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
ShutdownMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestShutdownMvcEndpoint
.
class
);
...
...
@@ -141,15 +145,18 @@ public class EndpointWebMvcManagementContextConfigurationTests {
@Test
public
void
auditEventsMvcEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
AuditEventsConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
register
(
AuditEventsConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
AuditEventsMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
AuditEventsMvcEndpoint
.
class
);
AuditEventsMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
AuditEventsMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestAuditEventsMvcEndpoint
.
class
);
}
@Test
public
void
loggersMvcEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
LoggersConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
register
(
LoggersConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
LoggersMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
LoggersMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestLoggersMvcEndpoint
.
class
);
...
...
@@ -157,7 +164,8 @@ public class EndpointWebMvcManagementContextConfigurationTests {
@Test
public
void
heapdumpMvcEndpointIsConditionalOnMissingBean
()
throws
Exception
{
this
.
context
.
register
(
HeapdumpConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
register
(
HeapdumpConfiguration
.
class
,
TestEndpointConfiguration
.
class
);
this
.
context
.
refresh
();
HeapdumpMvcEndpoint
mvcEndpoint
=
this
.
context
.
getBean
(
HeapdumpMvcEndpoint
.
class
);
assertThat
(
mvcEndpoint
).
isInstanceOf
(
TestHeapdumpMvcEndpoint
.
class
);
...
...
@@ -171,11 +179,10 @@ public class EndpointWebMvcManagementContextConfigurationTests {
@Configuration
@ImportAutoConfiguration
({
SecurityAutoConfiguration
.
class
,
WebMvcAutoConfiguration
.
class
,
JacksonAutoConfiguration
.
class
,
HttpMessageConvertersAutoConfiguration
.
class
,
Endpoint
AutoConfiguration
.
class
,
Endpoint
WebMvcAutoConfiguration
.
class
,
HttpMessageConvertersAutoConfiguration
.
class
,
EndpointAutoConfiguration
.
class
,
EndpointWebMvcAutoConfiguration
.
class
,
ManagementServerPropertiesAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
,
WebClientAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
,
WebClientAutoConfiguration
.
class
,
EndpointWebMvcManagementContextConfiguration
.
class
})
static
class
TestEndpointConfiguration
{
...
...
@@ -194,7 +201,8 @@ public class EndpointWebMvcManagementContextConfigurationTests {
static
class
EnvConfiguration
{
@Bean
public
EnvironmentMvcEndpoint
testEnvironmentMvcEndpoint
(
EnvironmentEndpoint
endpoint
)
{
public
EnvironmentMvcEndpoint
testEnvironmentMvcEndpoint
(
EnvironmentEndpoint
endpoint
)
{
return
new
TestEnvMvcEndpoint
(
endpoint
);
}
...
...
@@ -245,7 +253,8 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Bean
public
AuditEventsMvcEndpoint
testAuditEventsMvcEndpoint
(
AuditEventRepository
repository
)
{
public
AuditEventsMvcEndpoint
testAuditEventsMvcEndpoint
(
AuditEventRepository
repository
)
{
return
new
TestAuditEventsMvcEndpoint
(
repository
);
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/EmbeddedDatabaseConnection.java
View file @
6a556239
...
...
@@ -106,7 +106,7 @@ public enum EmbeddedDatabaseConnection {
*/
public
String
getUrl
(
String
databaseName
)
{
Assert
.
hasText
(
databaseName
,
"DatabaseName must not be null."
);
return
this
.
url
!=
null
?
String
.
format
(
this
.
url
,
databaseName
)
:
null
;
return
(
this
.
url
!=
null
?
String
.
format
(
this
.
url
,
databaseName
)
:
null
)
;
}
/**
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfigurationTests.java
View file @
6a556239
...
...
@@ -80,13 +80,13 @@ public class ElasticsearchDataAutoConfigurationTests {
}
private
void
load
(
String
...
environment
)
{
AnnotationConfigApplicationContext
c
tx
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
c
tx
,
environment
);
c
tx
.
register
(
PropertyPlaceholderAutoConfiguration
.
class
,
AnnotationConfigApplicationContext
c
ontext
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
c
ontext
,
environment
);
c
ontext
.
register
(
PropertyPlaceholderAutoConfiguration
.
class
,
ElasticsearchAutoConfiguration
.
class
,
ElasticsearchDataAutoConfiguration
.
class
);
c
tx
.
refresh
();
this
.
context
=
c
tx
;
c
ontext
.
refresh
();
this
.
context
=
c
ontext
;
}
}
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourcePropertiesTests.java
View file @
6a556239
...
...
@@ -65,8 +65,8 @@ public class DataSourcePropertiesTests {
@Test
public
void
determineUrlWithNoEmbeddedSupport
()
throws
Exception
{
DataSourceProperties
properties
=
new
DataSourceProperties
();
properties
.
setBeanClassLoader
(
new
HidePackagesClassLoader
(
"org.h2"
,
"org.apache.derby"
,
"org.hsqldb"
));
properties
.
setBeanClassLoader
(
new
HidePackagesClassLoader
(
"org.h2"
,
"org.apache.derby"
,
"org.hsqldb"
));
properties
.
afterPropertiesSet
();
this
.
thrown
.
expect
(
DataSourceProperties
.
DataSourceBeanCreationException
.
class
);
this
.
thrown
.
expectMessage
(
"Cannot determine embedded database url"
);
...
...
spring-boot-dependencies/pom.xml
View file @
6a556239
spring-boot-test/src/main/java/org/springframework/boot/test/json/JsonContent.java
View file @
6a556239
...
...
@@ -55,7 +55,6 @@ public final class JsonContent<T> implements AssertProvider<JsonContentAssert> {
/**
* Use AssertJ's {@link org.assertj.core.api.Assertions#assertThat assertThat}
* instead.
*
* @deprecated in favor of AssertJ's {@link org.assertj.core.api.Assertions#assertThat
* assertThat}
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment