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
da16d6d3
Commit
da16d6d3
authored
Nov 16, 2015
by
Johnny Lim
Committed by
Stephane Nicoll
Nov 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polishing
Closes gh-4503
parent
d4a7c09b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
28 additions
and
28 deletions
+28
-28
health.adoc
spring-boot-actuator-docs/src/main/asciidoc/health.adoc
+1
-1
index.adoc
spring-boot-actuator-docs/src/main/asciidoc/index.adoc
+1
-1
HealthEndpointDocumentation.java
.../boot/actuate/hypermedia/HealthEndpointDocumentation.java
+1
-1
MultiMetricRichGaugeReader.java
...boot/actuate/metrics/rich/MultiMetricRichGaugeReader.java
+1
-1
HealthIndicatorAutoConfigurationTests.java
.../autoconfigure/HealthIndicatorAutoConfigurationTests.java
+2
-2
ShellPropertiesTests.java
...work/boot/actuate/autoconfigure/ShellPropertiesTests.java
+1
-1
EndpointMBeanExporterTests.java
...boot/actuate/endpoint/jmx/EndpointMBeanExporterTests.java
+6
-6
HealthMvcEndpointTests.java
...ork/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
+3
-3
MailHealthIndicatorTests.java
...amework/boot/actuate/health/MailHealthIndicatorTests.java
+2
-2
DropwizardMetricServicesTests.java
...ate/metrics/dropwizard/DropwizardMetricServicesTests.java
+5
-5
OpenTsdbGaugeWriterTests.java
...ot/actuate/metrics/opentsdb/OpenTsdbGaugeWriterTests.java
+1
-1
StatsdMetricWriterTests.java
.../boot/actuate/metrics/statsd/StatsdMetricWriterTests.java
+1
-1
DefaultCounterServiceTests.java
...ot/actuate/metrics/writer/DefaultCounterServiceTests.java
+1
-1
SecurityPropertiesTests.java
.../boot/autoconfigure/security/SecurityPropertiesTests.java
+1
-1
integration.groovy
spring-boot-cli/samples/integration.groovy
+1
-1
No files found.
spring-boot-actuator-docs/src/main/asciidoc/health.adoc
View file @
da16d6d3
...
@@ -17,4 +17,4 @@ Example HTTP response:
...
@@ -17,4 +17,4 @@ Example HTTP response:
include::{generated}/health/http-response.adoc[]
include::{generated}/health/http-response.adoc[]
Example HTTP response with `endpoints.health.sensitive=false`:
Example HTTP response with `endpoints.health.sensitive=false`:
include::{generated}/health/
u
nsensitive/http-response.adoc[]
include::{generated}/health/
i
nsensitive/http-response.adoc[]
spring-boot-actuator-docs/src/main/asciidoc/index.adoc
View file @
da16d6d3
...
@@ -37,7 +37,7 @@ include::{generated}/logfile/http-response.adoc[]
...
@@ -37,7 +37,7 @@ include::{generated}/logfile/http-response.adoc[]
=== /docs
=== /docs
This endpoint (if available) contains HTML docume
m
tation for the other endpoints. Its path
This endpoint (if available) contains HTML docume
n
tation for the other endpoints. Its path
can be "/docs" (if there is an existing home page) or "/" (otherwise, including if the
can be "/docs" (if there is an existing home page) or "/" (otherwise, including if the
HAL browser is not active).
HAL browser is not active).
...
...
spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java
View file @
da16d6d3
...
@@ -64,7 +64,7 @@ public class HealthEndpointDocumentation {
...
@@ -64,7 +64,7 @@ public class HealthEndpointDocumentation {
@Test
@Test
public
void
health
()
throws
Exception
{
public
void
health
()
throws
Exception
{
this
.
mockMvc
.
perform
(
get
(
"/health"
).
accept
(
MediaType
.
APPLICATION_JSON
))
this
.
mockMvc
.
perform
(
get
(
"/health"
).
accept
(
MediaType
.
APPLICATION_JSON
))
.
andExpect
(
status
().
isOk
()).
andDo
(
document
(
"health/
u
nsensitive"
));
.
andExpect
(
status
().
isOk
()).
andDo
(
document
(
"health/
i
nsensitive"
));
}
}
}
}
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReader.java
View file @
da16d6d3
...
@@ -25,7 +25,7 @@ import org.springframework.boot.actuate.metrics.repository.MultiMetricRepository
...
@@ -25,7 +25,7 @@ import org.springframework.boot.actuate.metrics.repository.MultiMetricRepository
/**
/**
* A {@link RichGaugeReader} that works by reading metric values from a
* A {@link RichGaugeReader} that works by reading metric values from a
* {@link MultiMetricRepository} where the group name is the RichGauge name. The format
* {@link MultiMetricRepository} where the group name is the RichGauge name. The format
* used matches that in he RichGaugeExporter, so this reader can be used on a store that
* used matches that in
t
he RichGaugeExporter, so this reader can be used on a store that
* has been populated using that exporter.
* has been populated using that exporter.
*
*
* @author Dave Syer
* @author Dave Syer
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java
View file @
da16d6d3
...
@@ -286,7 +286,7 @@ public class HealthIndicatorAutoConfigurationTests {
...
@@ -286,7 +286,7 @@ public class HealthIndicatorAutoConfigurationTests {
}
}
@Test
@Test
public
void
solrHeathIndicator
()
{
public
void
solrHea
l
thIndicator
()
{
this
.
context
.
register
(
SolrAutoConfiguration
.
class
,
this
.
context
.
register
(
SolrAutoConfiguration
.
class
,
ManagementServerProperties
.
class
,
HealthIndicatorAutoConfiguration
.
class
);
ManagementServerProperties
.
class
,
HealthIndicatorAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
@@ -300,7 +300,7 @@ public class HealthIndicatorAutoConfigurationTests {
...
@@ -300,7 +300,7 @@ public class HealthIndicatorAutoConfigurationTests {
}
}
@Test
@Test
public
void
notSolrHeathIndicator
()
{
public
void
notSolrHea
l
thIndicator
()
{
this
.
context
.
register
(
SolrAutoConfiguration
.
class
,
this
.
context
.
register
(
SolrAutoConfiguration
.
class
,
ManagementServerProperties
.
class
,
HealthIndicatorAutoConfiguration
.
class
);
ManagementServerProperties
.
class
,
HealthIndicatorAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ShellPropertiesTests.java
View file @
da16d6d3
...
@@ -270,7 +270,7 @@ public class ShellPropertiesTests {
...
@@ -270,7 +270,7 @@ public class ShellPropertiesTests {
}
}
@Test
@Test
public
void
testDefaultPasswordAutogeneratedIfUnresol
o
vedPlaceholder
()
{
public
void
testDefaultPasswordAutogeneratedIfUnresolvedPlaceholder
()
{
SimpleAuthenticationProperties
security
=
new
SimpleAuthenticationProperties
();
SimpleAuthenticationProperties
security
=
new
SimpleAuthenticationProperties
();
RelaxedDataBinder
binder
=
new
RelaxedDataBinder
(
security
,
"security"
);
RelaxedDataBinder
binder
=
new
RelaxedDataBinder
(
security
,
"security"
);
binder
.
bind
(
new
MutablePropertyValues
(
Collections
binder
.
bind
(
new
MutablePropertyValues
(
Collections
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporterTests.java
View file @
da16d6d3
...
@@ -88,10 +88,10 @@ public class EndpointMBeanExporterTests {
...
@@ -88,10 +88,10 @@ public class EndpointMBeanExporterTests {
this
.
context
=
new
GenericApplicationContext
();
this
.
context
=
new
GenericApplicationContext
();
this
.
context
.
registerBeanDefinition
(
"endpointMbeanExporter"
,
this
.
context
.
registerBeanDefinition
(
"endpointMbeanExporter"
,
new
RootBeanDefinition
(
EndpointMBeanExporter
.
class
));
new
RootBeanDefinition
(
EndpointMBeanExporter
.
class
));
MutablePropertyValues
m
vp
=
new
MutablePropertyValues
();
MutablePropertyValues
m
pv
=
new
MutablePropertyValues
();
m
vp
.
add
(
"enabled"
,
Boolean
.
FALSE
);
m
pv
.
add
(
"enabled"
,
Boolean
.
FALSE
);
this
.
context
.
registerBeanDefinition
(
"endpoint1"
,
this
.
context
.
registerBeanDefinition
(
"endpoint1"
,
new
RootBeanDefinition
(
TestEndpoint
.
class
,
null
,
m
vp
));
new
RootBeanDefinition
(
TestEndpoint
.
class
,
null
,
m
pv
));
this
.
context
.
refresh
();
this
.
context
.
refresh
();
MBeanExporter
mbeanExporter
=
this
.
context
.
getBean
(
EndpointMBeanExporter
.
class
);
MBeanExporter
mbeanExporter
=
this
.
context
.
getBean
(
EndpointMBeanExporter
.
class
);
assertFalse
(
mbeanExporter
.
getServer
()
assertFalse
(
mbeanExporter
.
getServer
()
...
@@ -103,10 +103,10 @@ public class EndpointMBeanExporterTests {
...
@@ -103,10 +103,10 @@ public class EndpointMBeanExporterTests {
this
.
context
=
new
GenericApplicationContext
();
this
.
context
=
new
GenericApplicationContext
();
this
.
context
.
registerBeanDefinition
(
"endpointMbeanExporter"
,
this
.
context
.
registerBeanDefinition
(
"endpointMbeanExporter"
,
new
RootBeanDefinition
(
EndpointMBeanExporter
.
class
));
new
RootBeanDefinition
(
EndpointMBeanExporter
.
class
));
MutablePropertyValues
m
vp
=
new
MutablePropertyValues
();
MutablePropertyValues
m
pv
=
new
MutablePropertyValues
();
m
vp
.
add
(
"enabled"
,
Boolean
.
TRUE
);
m
pv
.
add
(
"enabled"
,
Boolean
.
TRUE
);
this
.
context
.
registerBeanDefinition
(
"endpoint1"
,
this
.
context
.
registerBeanDefinition
(
"endpoint1"
,
new
RootBeanDefinition
(
TestEndpoint
.
class
,
null
,
m
vp
));
new
RootBeanDefinition
(
TestEndpoint
.
class
,
null
,
m
pv
));
this
.
context
.
refresh
();
this
.
context
.
refresh
();
MBeanExporter
mbeanExporter
=
this
.
context
.
getBean
(
EndpointMBeanExporter
.
class
);
MBeanExporter
mbeanExporter
=
this
.
context
.
getBean
(
EndpointMBeanExporter
.
class
);
assertTrue
(
mbeanExporter
.
getServer
()
assertTrue
(
mbeanExporter
.
getServer
()
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
View file @
da16d6d3
...
@@ -168,7 +168,7 @@ public class HealthMvcEndpointTests {
...
@@ -168,7 +168,7 @@ public class HealthMvcEndpointTests {
}
}
@Test
@Test
public
void
u
nsecureAnonymousAccessUnrestricted
()
{
public
void
i
nsecureAnonymousAccessUnrestricted
()
{
this
.
mvc
=
new
HealthMvcEndpoint
(
this
.
endpoint
,
false
);
this
.
mvc
=
new
HealthMvcEndpoint
(
this
.
endpoint
,
false
);
this
.
mvc
.
setEnvironment
(
this
.
environment
);
this
.
mvc
.
setEnvironment
(
this
.
environment
);
given
(
this
.
endpoint
.
invoke
())
given
(
this
.
endpoint
.
invoke
())
...
@@ -180,7 +180,7 @@ public class HealthMvcEndpointTests {
...
@@ -180,7 +180,7 @@ public class HealthMvcEndpointTests {
}
}
@Test
@Test
public
void
u
nsensitiveAnonymousAccessRestricted
()
{
public
void
i
nsensitiveAnonymousAccessRestricted
()
{
this
.
environment
.
getPropertySources
().
addLast
(
NON_SENSITIVE
);
this
.
environment
.
getPropertySources
().
addLast
(
NON_SENSITIVE
);
given
(
this
.
endpoint
.
invoke
())
given
(
this
.
endpoint
.
invoke
())
.
willReturn
(
new
Health
.
Builder
().
up
().
withDetail
(
"foo"
,
"bar"
).
build
());
.
willReturn
(
new
Health
.
Builder
().
up
().
withDetail
(
"foo"
,
"bar"
).
build
());
...
@@ -191,7 +191,7 @@ public class HealthMvcEndpointTests {
...
@@ -191,7 +191,7 @@ public class HealthMvcEndpointTests {
}
}
@Test
@Test
public
void
unsecureU
nsensitiveAnonymousAccessUnrestricted
()
{
public
void
insecureI
nsensitiveAnonymousAccessUnrestricted
()
{
this
.
mvc
=
new
HealthMvcEndpoint
(
this
.
endpoint
,
false
);
this
.
mvc
=
new
HealthMvcEndpoint
(
this
.
endpoint
,
false
);
this
.
mvc
.
setEnvironment
(
this
.
environment
);
this
.
mvc
.
setEnvironment
(
this
.
environment
);
this
.
environment
.
getPropertySources
().
addLast
(
NON_SENSITIVE
);
this
.
environment
.
getPropertySources
().
addLast
(
NON_SENSITIVE
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MailHealthIndicatorTests.java
View file @
da16d6d3
...
@@ -85,8 +85,8 @@ public class MailHealthIndicatorTests {
...
@@ -85,8 +85,8 @@ public class MailHealthIndicatorTests {
public
static
class
SuccessTransport
extends
Transport
{
public
static
class
SuccessTransport
extends
Transport
{
public
SuccessTransport
(
Session
session
,
URLName
url
n
ame
)
{
public
SuccessTransport
(
Session
session
,
URLName
url
N
ame
)
{
super
(
session
,
url
n
ame
);
super
(
session
,
url
N
ame
);
}
}
@Override
@Override
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServicesTests.java
View file @
da16d6d3
...
@@ -72,14 +72,14 @@ public class DropwizardMetricServicesTests {
...
@@ -72,14 +72,14 @@ public class DropwizardMetricServicesTests {
}
}
@Test
@Test
public
void
setPredfinedTimer
()
{
public
void
setPred
e
finedTimer
()
{
this
.
writer
.
submit
(
"timer.foo"
,
200
);
this
.
writer
.
submit
(
"timer.foo"
,
200
);
this
.
writer
.
submit
(
"timer.foo"
,
300
);
this
.
writer
.
submit
(
"timer.foo"
,
300
);
assertEquals
(
2
,
this
.
registry
.
timer
(
"timer.foo"
).
getCount
());
assertEquals
(
2
,
this
.
registry
.
timer
(
"timer.foo"
).
getCount
());
}
}
@Test
@Test
public
void
setPredfinedHistogram
()
{
public
void
setPred
e
finedHistogram
()
{
this
.
writer
.
submit
(
"histogram.foo"
,
2.1
);
this
.
writer
.
submit
(
"histogram.foo"
,
2.1
);
this
.
writer
.
submit
(
"histogram.foo"
,
2.3
);
this
.
writer
.
submit
(
"histogram.foo"
,
2.3
);
assertEquals
(
2
,
this
.
registry
.
histogram
(
"histogram.foo"
).
getCount
());
assertEquals
(
2
,
this
.
registry
.
histogram
(
"histogram.foo"
).
getCount
());
...
@@ -94,7 +94,7 @@ public class DropwizardMetricServicesTests {
...
@@ -94,7 +94,7 @@ public class DropwizardMetricServicesTests {
* @throws Exception if an error occurs
* @throws Exception if an error occurs
*/
*/
@Test
@Test
public
void
testParallism
()
throws
Exception
{
public
void
testParall
el
ism
()
throws
Exception
{
List
<
WriterThread
>
threads
=
new
ArrayList
<
WriterThread
>();
List
<
WriterThread
>
threads
=
new
ArrayList
<
WriterThread
>();
ThreadGroup
group
=
new
ThreadGroup
(
"threads"
);
ThreadGroup
group
=
new
ThreadGroup
(
"threads"
);
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
...
@@ -139,9 +139,9 @@ public class DropwizardMetricServicesTests {
...
@@ -139,9 +139,9 @@ public class DropwizardMetricServicesTests {
this
.
writer
.
submit
(
"histogram.test.service"
,
this
.
index
);
this
.
writer
.
submit
(
"histogram.test.service"
,
this
.
index
);
this
.
writer
.
submit
(
"gauge.test.service"
,
this
.
index
);
this
.
writer
.
submit
(
"gauge.test.service"
,
this
.
index
);
}
}
catch
(
IllegalArgumentException
iae
)
{
catch
(
IllegalArgumentException
ex
)
{
this
.
failed
=
true
;
this
.
failed
=
true
;
throw
iae
;
throw
ex
;
}
}
}
}
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/opentsdb/OpenTsdbGaugeWriterTests.java
View file @
da16d6d3
...
@@ -60,7 +60,7 @@ public class OpenTsdbGaugeWriterTests {
...
@@ -60,7 +60,7 @@ public class OpenTsdbGaugeWriterTests {
}
}
@Test
@Test
public
void
flushAutomaticlly
()
{
public
void
flushAutomatic
a
lly
()
{
given
(
this
.
restTemplate
.
postForEntity
(
anyString
(),
any
(
Object
.
class
),
anyMap
()))
given
(
this
.
restTemplate
.
postForEntity
(
anyString
(),
any
(
Object
.
class
),
anyMap
()))
.
willReturn
(
emptyResponse
());
.
willReturn
(
emptyResponse
());
this
.
writer
.
setBufferSize
(
0
);
this
.
writer
.
setBufferSize
(
0
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/statsd/StatsdMetricWriterTests.java
View file @
da16d6d3
...
@@ -90,7 +90,7 @@ public class StatsdMetricWriterTests {
...
@@ -90,7 +90,7 @@ public class StatsdMetricWriterTests {
}
}
@Test
@Test
public
void
perioPrefix
()
throws
Exception
{
public
void
perio
d
Prefix
()
throws
Exception
{
this
.
writer
=
new
StatsdMetricWriter
(
"my."
,
"localhost"
,
this
.
port
);
this
.
writer
=
new
StatsdMetricWriter
(
"my."
,
"localhost"
,
this
.
port
);
this
.
writer
.
set
(
new
Metric
<
Long
>(
"gauge.foo"
,
3L
));
this
.
writer
.
set
(
new
Metric
<
Long
>(
"gauge.foo"
,
3L
));
this
.
server
.
waitForMessage
();
this
.
server
.
waitForMessage
();
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/writer/DefaultCounterServiceTests.java
View file @
da16d6d3
...
@@ -49,7 +49,7 @@ public class DefaultCounterServiceTests {
...
@@ -49,7 +49,7 @@ public class DefaultCounterServiceTests {
}
}
@Test
@Test
public
void
incrementWithExistingNear
ly
Counter
()
{
public
void
incrementWithExistingNearCounter
()
{
this
.
service
.
increment
(
"counter-foo"
);
this
.
service
.
increment
(
"counter-foo"
);
verify
(
this
.
repository
).
increment
(
this
.
captor
.
capture
());
verify
(
this
.
repository
).
increment
(
this
.
captor
.
capture
());
assertEquals
(
"counter.counter-foo"
,
this
.
captor
.
getValue
().
getName
());
assertEquals
(
"counter.counter-foo"
,
this
.
captor
.
getValue
().
getName
());
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityPropertiesTests.java
View file @
da16d6d3
...
@@ -92,7 +92,7 @@ public class SecurityPropertiesTests {
...
@@ -92,7 +92,7 @@ public class SecurityPropertiesTests {
}
}
@Test
@Test
public
void
testDefaultPasswordAutogeneratedIfUnresol
o
vedPlaceholder
()
{
public
void
testDefaultPasswordAutogeneratedIfUnresolvedPlaceholder
()
{
this
.
binder
.
bind
(
new
MutablePropertyValues
(
this
.
binder
.
bind
(
new
MutablePropertyValues
(
Collections
.
singletonMap
(
"security.user.password"
,
"${ADMIN_PASSWORD}"
)));
Collections
.
singletonMap
(
"security.user.password"
,
"${ADMIN_PASSWORD}"
)));
assertFalse
(
this
.
binder
.
getBindingResult
().
hasErrors
());
assertFalse
(
this
.
binder
.
getBindingResult
().
hasErrors
());
...
...
spring-boot-cli/samples/integration.groovy
View file @
da16d6d3
...
@@ -21,7 +21,7 @@ class SpringIntegrationExample implements CommandLineRunner {
...
@@ -21,7 +21,7 @@ class SpringIntegrationExample implements CommandLineRunner {
* Since this is a simple application that we want to exit right away,
* Since this is a simple application that we want to exit right away,
* close the context. For an active integration application, with pollers
* close the context. For an active integration application, with pollers
* etc, you can either suspend the main thread here (e.g. with System.in.read()),
* etc, you can either suspend the main thread here (e.g. with System.in.read()),
* or exit the run() method without closing he context, and stop the
* or exit the run() method without closing
t
he context, and stop the
* application later using some other technique (kill, JMX etc).
* application later using some other technique (kill, JMX etc).
*/
*/
context
.
close
()
context
.
close
()
...
...
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