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
0348889f
Commit
0348889f
authored
Feb 12, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
e49d50fe
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
24 deletions
+27
-24
JmxEndpointProperties.java
...ate/autoconfigure/endpoint/jmx/JmxEndpointProperties.java
+0
-1
NewRelicMetricsExportAutoConfiguration.java
...port/newrelic/NewRelicMetricsExportAutoConfiguration.java
+0
-6
InvocationContext.java
...ework/boot/actuate/endpoint/invoke/InvocationContext.java
+0
-1
MetricsRestTemplateCustomizer.java
...ate/metrics/web/client/MetricsRestTemplateCustomizer.java
+1
-1
WebEndpointRunners.java
...rk/boot/actuate/endpoint/web/test/WebEndpointRunners.java
+1
-1
MongoReactiveDataAutoConfiguration.java
...figure/data/mongo/MongoReactiveDataAutoConfiguration.java
+2
-1
DataSourceBeanCreationFailureAnalyzer.java
...configure/jdbc/DataSourceBeanCreationFailureAnalyzer.java
+15
-7
DataSourceProperties.java
...amework/boot/autoconfigure/jdbc/DataSourceProperties.java
+1
-2
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+2
-0
TestRestTemplate.java
...pringframework/boot/test/web/client/TestRestTemplate.java
+4
-3
CorsSampleActuatorApplicationTests.java
...or/customsecurity/CorsSampleActuatorApplicationTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointProperties.java
View file @
0348889f
...
@@ -82,7 +82,6 @@ public class JmxEndpointProperties {
...
@@ -82,7 +82,6 @@ public class JmxEndpointProperties {
return
this
.
staticNames
;
return
this
.
staticNames
;
}
}
public
static
class
Exposure
{
public
static
class
Exposure
{
/**
/**
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/newrelic/NewRelicMetricsExportAutoConfiguration.java
View file @
0348889f
...
@@ -47,12 +47,6 @@ import org.springframework.context.annotation.Configuration;
...
@@ -47,12 +47,6 @@ import org.springframework.context.annotation.Configuration;
@EnableConfigurationProperties
(
NewRelicProperties
.
class
)
@EnableConfigurationProperties
(
NewRelicProperties
.
class
)
public
class
NewRelicMetricsExportAutoConfiguration
{
public
class
NewRelicMetricsExportAutoConfiguration
{
@Bean
@ConditionalOnMissingBean
public
Clock
micrometerClock
()
{
return
Clock
.
SYSTEM
;
}
@Bean
@Bean
@ConditionalOnMissingBean
@ConditionalOnMissingBean
public
NewRelicConfig
newRelicConfig
(
NewRelicProperties
props
)
{
public
NewRelicConfig
newRelicConfig
(
NewRelicProperties
props
)
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/InvocationContext.java
View file @
0348889f
...
@@ -36,7 +36,6 @@ public class InvocationContext {
...
@@ -36,7 +36,6 @@ public class InvocationContext {
/**
/**
* Creates a new context for an operation being invoked by the given {@code principal}
* Creates a new context for an operation being invoked by the given {@code principal}
* with the given available {@code arguments}.
* with the given available {@code arguments}.
*
* @param principal the principal invoking the operation. May be {@code null}
* @param principal the principal invoking the operation. May be {@code null}
* @param arguments the arguments available to the operation. Never {@code null}
* @param arguments the arguments available to the operation. Never {@code null}
*/
*/
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizer.java
View file @
0348889f
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebEndpointRunners.java
View file @
0348889f
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveDataAutoConfiguration.java
View file @
0348889f
...
@@ -48,7 +48,8 @@ import org.springframework.data.mongodb.core.convert.MongoConverter;
...
@@ -48,7 +48,8 @@ import org.springframework.data.mongodb.core.convert.MongoConverter;
@Configuration
@Configuration
@ConditionalOnClass
({
MongoClient
.
class
,
ReactiveMongoTemplate
.
class
})
@ConditionalOnClass
({
MongoClient
.
class
,
ReactiveMongoTemplate
.
class
})
@EnableConfigurationProperties
(
MongoProperties
.
class
)
@EnableConfigurationProperties
(
MongoProperties
.
class
)
@AutoConfigureAfter
({
MongoReactiveAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
})
@AutoConfigureAfter
({
MongoReactiveAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
})
public
class
MongoReactiveDataAutoConfiguration
{
public
class
MongoReactiveDataAutoConfiguration
{
private
final
MongoProperties
properties
;
private
final
MongoProperties
properties
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java
View file @
0348889f
...
@@ -51,17 +51,24 @@ class DataSourceBeanCreationFailureAnalyzer
...
@@ -51,17 +51,24 @@ class DataSourceBeanCreationFailureAnalyzer
}
}
private
FailureAnalysis
getFailureAnalysis
(
DataSourceBeanCreationException
cause
)
{
private
FailureAnalysis
getFailureAnalysis
(
DataSourceBeanCreationException
cause
)
{
String
description
=
getDescription
(
cause
);
String
action
=
getAction
(
cause
);
return
new
FailureAnalysis
(
description
,
action
,
cause
);
}
private
String
getDescription
(
DataSourceBeanCreationException
cause
)
{
StringBuilder
description
=
new
StringBuilder
();
StringBuilder
description
=
new
StringBuilder
();
boolean
datasourceUrlSpecified
=
this
.
environment
.
containsProperty
(
"spring.datasource.url"
);
description
.
append
(
"Failed to auto-configure a DataSource: "
);
description
.
append
(
"Failed to auto-configure a DataSource: "
);
if
(!
datasourceUrlSpecified
)
{
if
(!
this
.
environment
.
containsProperty
(
"spring.datasource.url"
)
)
{
description
.
append
(
"'spring.datasource.url' is not specified and "
);
description
.
append
(
"'spring.datasource.url' is not specified and "
);
}
}
description
.
append
(
String
.
format
(
description
.
append
(
"no embedded datasource could be auto-configured.%n"
));
String
.
format
(
"no embedded datasource could be auto-configured.%n"
));
description
.
append
(
String
.
format
(
"%nReason: %s%n"
,
cause
.
getMessage
()));
description
.
append
(
String
.
format
(
"%nReason: %s%n"
,
cause
.
getMessage
()));
return
description
.
toString
();
}
private
String
getAction
(
DataSourceBeanCreationException
cause
)
{
StringBuilder
action
=
new
StringBuilder
();
StringBuilder
action
=
new
StringBuilder
();
action
.
append
(
String
.
format
(
"Consider the following:%n"
));
action
.
append
(
String
.
format
(
"Consider the following:%n"
));
if
(
EmbeddedDatabaseConnection
.
NONE
==
cause
.
getConnection
())
{
if
(
EmbeddedDatabaseConnection
.
NONE
==
cause
.
getConnection
())
{
...
@@ -69,11 +76,12 @@ class DataSourceBeanCreationFailureAnalyzer
...
@@ -69,11 +76,12 @@ class DataSourceBeanCreationFailureAnalyzer
+
"Derby), please put it on the classpath.%n"
));
+
"Derby), please put it on the classpath.%n"
));
}
}
else
{
else
{
action
.
append
(
String
.
format
(
"\tReview the configuration of %s%n."
,
cause
.
getConnection
()));
action
.
append
(
String
.
format
(
"\tReview the configuration of %s%n."
,
cause
.
getConnection
()));
}
}
action
.
append
(
"\tIf you have database settings to be loaded from a particular "
action
.
append
(
"\tIf you have database settings to be loaded from a particular "
+
"profile you may need to activate it"
).
append
(
getActiveProfiles
());
+
"profile you may need to activate it"
).
append
(
getActiveProfiles
());
return
new
FailureAnalysis
(
description
.
toString
(),
action
.
toString
(),
cause
);
return
action
.
toString
(
);
}
}
private
String
getActiveProfiles
()
{
private
String
getActiveProfiles
()
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java
View file @
0348889f
...
@@ -47,8 +47,7 @@ import org.springframework.util.StringUtils;
...
@@ -47,8 +47,7 @@ import org.springframework.util.StringUtils;
* @since 1.1.0
* @since 1.1.0
*/
*/
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
public
class
DataSourceProperties
public
class
DataSourceProperties
implements
BeanClassLoaderAware
,
InitializingBean
{
implements
BeanClassLoaderAware
,
InitializingBean
{
private
ClassLoader
classLoader
;
private
ClassLoader
classLoader
;
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
0348889f
...
@@ -5990,6 +5990,8 @@ TIP: Do not forget to add `@RunWith(SpringRunner.class)` to your test. Otherwise
...
@@ -5990,6 +5990,8 @@ TIP: Do not forget to add `@RunWith(SpringRunner.class)` to your test. Otherwise
annotations are ignored.
annotations are ignored.
[[boot-features-testing-spring-boot-applications-detecting-web-app-type]]
==== Detecting Web Application Type
==== Detecting Web Application Type
If Spring MVC is available, a regular MVC-based application context is configured. If you
If Spring MVC is available, a regular MVC-based application context is configured. If you
have only Spring WebFlux, we'll detect that and configure a WebFlux-based application
have only Spring WebFlux, we'll detect that and configure a WebFlux-based application
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java
View file @
0348889f
...
@@ -125,9 +125,10 @@ public class TestRestTemplate {
...
@@ -125,9 +125,10 @@ public class TestRestTemplate {
* @param httpClientOptions client options to use if the Apache HTTP Client is used
* @param httpClientOptions client options to use if the Apache HTTP Client is used
* @since 2.0.0
* @since 2.0.0
*/
*/
public
TestRestTemplate
(
RestTemplateBuilder
restTemplateBuilder
,
String
username
,
String
password
,
public
TestRestTemplate
(
RestTemplateBuilder
restTemplateBuilder
,
String
username
,
HttpClientOption
...
httpClientOptions
)
{
String
password
,
HttpClientOption
...
httpClientOptions
)
{
this
(
buildRestTemplate
(
restTemplateBuilder
),
username
,
password
,
httpClientOptions
);
this
(
buildRestTemplate
(
restTemplateBuilder
),
username
,
password
,
httpClientOptions
);
}
}
private
TestRestTemplate
(
RestTemplate
restTemplate
,
String
username
,
String
password
,
private
TestRestTemplate
(
RestTemplate
restTemplate
,
String
username
,
String
password
,
...
...
spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java
View file @
0348889f
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
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