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
7d846c83
Commit
7d846c83
authored
Jan 08, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow user to disable all JMX exports with spring.jmx.enabled
parent
561cb3a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
EndpointMBeanExportAutoConfiguration.java
...e/autoconfigure/EndpointMBeanExportAutoConfiguration.java
+13
-3
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportAutoConfiguration.java
View file @
7d846c83
...
...
@@ -39,7 +39,7 @@ import org.springframework.util.StringUtils;
*/
@Configuration
@AutoConfigureAfter
({
EndpointAutoConfiguration
.
class
})
@ConditionalOnExpression
(
"${endpoints.jmx.enabled:true}"
)
@ConditionalOnExpression
(
"${endpoints.jmx.enabled:true}
&&${spring.jmx.enabled:true}
"
)
@EnableConfigurationProperties
(
EndpointMBeanExportProperties
.
class
)
public
class
EndpointMBeanExportAutoConfiguration
{
...
...
@@ -55,7 +55,7 @@ public class EndpointMBeanExportAutoConfiguration {
mbeanExporter
.
setDomain
(
domain
);
}
mbeanExporter
.
setEnsureUniqueRuntimeObjectNames
(
this
.
properties
.
get
UniqueNames
());
mbeanExporter
.
setEnsureUniqueRuntimeObjectNames
(
this
.
properties
.
is
UniqueNames
());
mbeanExporter
.
setObjectNameStaticProperties
(
this
.
properties
.
getStaticNames
());
return
mbeanExporter
;
...
...
@@ -68,8 +68,18 @@ public class EndpointMBeanExportAutoConfiguration {
private
boolean
uniqueNames
=
false
;
private
boolean
enabled
=
true
;
private
Properties
staticNames
=
new
Properties
();
public
boolean
isEnabled
()
{
return
this
.
enabled
;
}
public
void
setEnabled
(
boolean
enabled
)
{
this
.
enabled
=
enabled
;
}
public
String
getDomain
()
{
return
this
.
domain
;
}
...
...
@@ -78,7 +88,7 @@ public class EndpointMBeanExportAutoConfiguration {
this
.
domain
=
domain
;
}
public
boolean
get
UniqueNames
()
{
public
boolean
is
UniqueNames
()
{
return
this
.
uniqueNames
;
}
...
...
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