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
af3ed9ff
Commit
af3ed9ff
authored
Jan 14, 2019
by
Johnny Lim
Committed by
Stephane Nicoll
Jan 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-15695
parent
b2256187
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
34 deletions
+25
-34
RestTemplateMetricsConfiguration.java
.../metrics/web/client/RestTemplateMetricsConfiguration.java
+4
-3
RestTemplateMetricsConfigurationTests.java
...ics/web/client/RestTemplateMetricsConfigurationTests.java
+2
-4
WebClientMetricsConfigurationTests.java
...etrics/web/client/WebClientMetricsConfigurationTests.java
+2
-4
EndpointId.java
...org/springframework/boot/actuate/endpoint/EndpointId.java
+1
-1
ElasticsearchJestHealthIndicatorTests.java
.../elasticsearch/ElasticsearchJestHealthIndicatorTests.java
+2
-2
HttpMessageConverters.java
...mework/boot/autoconfigure/http/HttpMessageConverters.java
+3
-3
LdapAutoConfigurationTests.java
...k/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java
+7
-13
SpringBootTestRandomPortEnvironmentPostProcessor.java
...web/SpringBootTestRandomPortEnvironmentPostProcessor.java
+1
-1
JarFileEntries.java
...a/org/springframework/boot/loader/jar/JarFileEntries.java
+1
-1
DataSourceUnwrapperTests.java
...g/springframework/boot/jdbc/DataSourceUnwrapperTests.java
+2
-2
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateMetricsConfiguration.java
View file @
af3ed9ff
...
...
@@ -46,15 +46,16 @@ class RestTemplateMetricsConfiguration {
@Bean
@ConditionalOnMissingBean
(
RestTemplateExchangeTagsProvider
.
class
)
public
DefaultRestTemplateExchangeTagsProvider
restTemplate
TagConfigur
er
()
{
public
DefaultRestTemplateExchangeTagsProvider
restTemplate
ExchangeTagsProvid
er
()
{
return
new
DefaultRestTemplateExchangeTagsProvider
();
}
@Bean
public
MetricsRestTemplateCustomizer
metricsRestTemplateCustomizer
(
MeterRegistry
meterRegistry
,
RestTemplateExchangeTagsProvider
restTemplateTagConfigurer
)
{
return
new
MetricsRestTemplateCustomizer
(
meterRegistry
,
restTemplateTagConfigurer
,
RestTemplateExchangeTagsProvider
restTemplateExchangeTagsProvider
)
{
return
new
MetricsRestTemplateCustomizer
(
meterRegistry
,
restTemplateExchangeTagsProvider
,
this
.
properties
.
getWeb
().
getClient
().
getRequestsMetricName
());
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/RestTemplateMetricsConfigurationTests.java
View file @
af3ed9ff
...
...
@@ -80,8 +80,7 @@ public class RestTemplateMetricsConfigurationTests {
MeterRegistry
registry
=
getInitializedMeterRegistry
(
context
);
assertThat
(
registry
.
get
(
"http.client.requests"
).
meters
()).
hasSize
(
2
);
assertThat
(
this
.
output
.
toString
()).
contains
(
"Reached the maximum number of URI tags for 'http.client.requests'."
);
assertThat
(
this
.
output
.
toString
())
"Reached the maximum number of URI tags for 'http.client.requests'."
)
.
contains
(
"Are you using 'uriVariables'?"
);
});
}
...
...
@@ -94,8 +93,7 @@ public class RestTemplateMetricsConfigurationTests {
MeterRegistry
registry
=
getInitializedMeterRegistry
(
context
);
assertThat
(
registry
.
get
(
"http.client.requests"
).
meters
()).
hasSize
(
3
);
assertThat
(
this
.
output
.
toString
()).
doesNotContain
(
"Reached the maximum number of URI tags for 'http.client.requests'."
);
assertThat
(
this
.
output
.
toString
())
"Reached the maximum number of URI tags for 'http.client.requests'."
)
.
doesNotContain
(
"Are you using 'uriVariables'?"
);
});
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/client/WebClientMetricsConfigurationTests.java
View file @
af3ed9ff
...
...
@@ -83,8 +83,7 @@ public class WebClientMetricsConfigurationTests {
MeterRegistry
registry
=
getInitializedMeterRegistry
(
context
);
assertThat
(
registry
.
get
(
"http.client.requests"
).
meters
()).
hasSize
(
2
);
assertThat
(
this
.
output
.
toString
()).
contains
(
"Reached the maximum number of URI tags for 'http.client.requests'."
);
assertThat
(
this
.
output
.
toString
())
"Reached the maximum number of URI tags for 'http.client.requests'."
)
.
contains
(
"Are you using 'uriVariables'?"
);
});
}
...
...
@@ -97,8 +96,7 @@ public class WebClientMetricsConfigurationTests {
MeterRegistry
registry
=
getInitializedMeterRegistry
(
context
);
assertThat
(
registry
.
get
(
"http.client.requests"
).
meters
()).
hasSize
(
3
);
assertThat
(
this
.
output
.
toString
()).
doesNotContain
(
"Reached the maximum number of URI tags for 'http.client.requests'."
);
assertThat
(
this
.
output
.
toString
())
"Reached the maximum number of URI tags for 'http.client.requests'."
)
.
doesNotContain
(
"Are you using 'uriVariables'?"
);
});
}
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointId.java
View file @
af3ed9ff
...
...
@@ -38,7 +38,7 @@ public final class EndpointId {
private
static
final
Log
logger
=
LogFactory
.
getLog
(
EndpointId
.
class
);
private
static
Set
<
String
>
loggedWarnings
=
new
HashSet
<>();
private
static
final
Set
<
String
>
loggedWarnings
=
new
HashSet
<>();
private
static
final
Pattern
VALID_PATTERN
=
Pattern
.
compile
(
"[a-zA-Z0-9\\.\\-]+"
);
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchJestHealthIndicatorTests.java
View file @
af3ed9ff
...
...
@@ -138,8 +138,8 @@ public class ElasticsearchJestHealthIndicatorTests {
status
);
}
else
{
json
=
"{\n"
+
" \"error\": \"Server Error\",\n"
+
" \"status\": "
+
responseCode
+
"\n"
+
"}"
;
json
=
"{\n"
+
" \"error\": \"Server Error\",\n"
+
" \"status\":
\"
"
+
status
+
"\
"\n"
+
"}"
;
}
searchResult
.
setJsonString
(
json
);
searchResult
.
setJsonObject
(
new
JsonParser
().
parse
(
json
).
getAsJsonObject
());
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConverters.java
View file @
af3ed9ff
...
...
@@ -72,7 +72,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
* converters.
* @param additionalConverters additional converters to be added. Items are added just
* before any default converter of the same type (or at the front of the list if no
* default converter is found) The {@link #postProcessConverters(List)} method can be
* default converter is found)
.
The {@link #postProcessConverters(List)} method can be
* used for further converter manipulation.
*/
public
HttpMessageConverters
(
HttpMessageConverter
<?>...
additionalConverters
)
{
...
...
@@ -84,7 +84,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
* converters.
* @param additionalConverters additional converters to be added. Items are added just
* before any default converter of the same type (or at the front of the list if no
* default converter is found) The {@link #postProcessConverters(List)} method can be
* default converter is found)
.
The {@link #postProcessConverters(List)} method can be
* used for further converter manipulation.
*/
public
HttpMessageConverters
(
...
...
@@ -97,7 +97,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
* @param addDefaultConverters if default converters should be added
* @param converters converters to be added. Items are added just before any default
* converter of the same type (or at the front of the list if no default converter is
* found) The {@link #postProcessConverters(List)} method can be used for further
* found)
.
The {@link #postProcessConverters(List)} method can be used for further
* converter manipulation.
*/
public
HttpMessageConverters
(
boolean
addDefaultConverters
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java
View file @
af3ed9ff
...
...
@@ -46,8 +46,7 @@ public class LdapAutoConfigurationTests {
public
void
contextSourceWithDefaultUrl
()
{
this
.
contextRunner
.
run
((
context
)
->
{
LdapContextSource
contextSource
=
context
.
getBean
(
LdapContextSource
.
class
);
String
[]
urls
=
getUrls
(
contextSource
);
assertThat
(
urls
).
containsExactly
(
"ldap://localhost:389"
);
assertThat
(
contextSource
.
getUrls
()).
containsExactly
(
"ldap://localhost:389"
);
assertThat
(
contextSource
.
isAnonymousReadOnly
()).
isFalse
();
});
}
...
...
@@ -58,8 +57,8 @@ public class LdapAutoConfigurationTests {
.
run
((
context
)
->
{
LdapContextSource
contextSource
=
context
.
getBean
(
LdapContextSource
.
class
);
String
[]
urls
=
getUrls
(
contextSource
);
assertThat
(
urls
)
.
containsExactly
(
"ldap://localhost:123"
);
assertThat
(
contextSource
.
getUrls
())
.
containsExactly
(
"ldap://localhost:123"
);
});
}
...
...
@@ -72,9 +71,8 @@ public class LdapAutoConfigurationTests {
LdapContextSource
contextSource
=
context
.
getBean
(
LdapContextSource
.
class
);
LdapProperties
ldapProperties
=
context
.
getBean
(
LdapProperties
.
class
);
String
[]
urls
=
getUrls
(
contextSource
);
assertThat
(
urls
).
containsExactly
(
"ldap://localhost:123"
,
"ldap://mycompany:123"
);
assertThat
(
contextSource
.
getUrls
()).
containsExactly
(
"ldap://localhost:123"
,
"ldap://mycompany:123"
);
assertThat
(
ldapProperties
.
getUrls
()).
hasSize
(
2
);
});
}
...
...
@@ -112,16 +110,12 @@ public class LdapAutoConfigurationTests {
.
run
((
context
)
->
{
LdapContextSource
contextSource
=
context
.
getBean
(
LdapContextSource
.
class
);
String
[]
urls
=
getUrls
(
contextSource
);
assertThat
(
urls
)
.
containsExactly
(
"ldap://localhost:389"
);
assertThat
(
contextSource
.
getUrls
())
.
containsExactly
(
"ldap://localhost:389"
);
assertThat
(
contextSource
.
isAnonymousReadOnly
()).
isFalse
();
});
}
private
String
[]
getUrls
(
LdapContextSource
contextSource
)
{
return
contextSource
.
getUrls
();
}
@Configuration
static
class
PooledContextSourceConfig
{
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/SpringBootTestRandomPortEnvironmentPostProcessor.java
View file @
af3ed9ff
...
...
@@ -97,7 +97,7 @@ class SpringBootTestRandomPortEnvironmentPostProcessor
return
environment
.
getConversionService
().
convert
(
value
,
Integer
.
class
);
}
catch
(
ConversionFailedException
ex
)
{
if
(
ClassUtils
.
isAssignable
(
value
.
getClass
(),
String
.
class
)
)
{
if
(
value
instanceof
String
)
{
return
getResolvedValueIfPossible
(
environment
,
(
String
)
value
);
}
throw
ex
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFileEntries.java
View file @
af3ed9ff
...
...
@@ -63,7 +63,7 @@ class JarFileEntries implements CentralDirectoryVisitor, Iterable<JarEntry> {
.
invoke
(
runtimeVersion
);
}
catch
(
Throwable
ex
)
{
version
=
8
;
version
=
BASE_VERSION
;
}
RUNTIME_VERSION
=
version
;
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DataSourceUnwrapperTests.java
View file @
af3ed9ff
...
...
@@ -77,8 +77,8 @@ public class DataSourceUnwrapperTests {
@Test
public
void
unwrapWithSeveralLevelOfWrapping
()
{
DataSource
dataSource
=
new
HikariDataSource
();
DataSource
actual
=
wrapInProxy
(
wrapInDelegate
(
wrapInDelegate
(
(
wrapInProxy
(
wrapInDelegate
(
dataSource
)
)))));
DataSource
actual
=
wrapInProxy
(
wrapInDelegate
(
wrapInDelegate
(
wrapInProxy
(
wrapInDelegate
(
dataSource
)))));
assertThat
(
DataSourceUnwrapper
.
unwrap
(
actual
,
HikariDataSource
.
class
))
.
isSameAs
(
dataSource
);
}
...
...
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