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
bd2cc6f4
Commit
bd2cc6f4
authored
Mar 25, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing condition on LogFile endpoint
See gh-16298
parent
0bd2e40d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
LogFileWebEndpointAutoConfiguration.java
...onfigure/logging/LogFileWebEndpointAutoConfiguration.java
+3
-1
LogFileWebEndpointAutoConfigurationTests.java
...ure/logging/LogFileWebEndpointAutoConfigurationTests.java
+2
-2
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointAutoConfiguration.java
View file @
bd2cc6f4
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
.
logging
;
package
org
.
springframework
.
boot
.
actuate
.
autoconfigure
.
logging
;
import
org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint
;
import
org.springframework.boot.actuate.logging.LogFileWebEndpoint
;
import
org.springframework.boot.actuate.logging.LogFileWebEndpoint
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionMessage
;
import
org.springframework.boot.autoconfigure.condition.ConditionMessage
;
...
@@ -38,6 +39,7 @@ import org.springframework.util.StringUtils;
...
@@ -38,6 +39,7 @@ import org.springframework.util.StringUtils;
* @since 2.0.0
* @since 2.0.0
*/
*/
@Configuration
@Configuration
@ConditionalOnEnabledEndpoint
(
endpoint
=
LogFileWebEndpoint
.
class
)
@EnableConfigurationProperties
(
LogFileWebEndpointProperties
.
class
)
@EnableConfigurationProperties
(
LogFileWebEndpointProperties
.
class
)
public
class
LogFileWebEndpointAutoConfiguration
{
public
class
LogFileWebEndpointAutoConfiguration
{
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/logging/LogFileWebEndpointAutoConfigurationTests.java
View file @
bd2cc6f4
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -74,7 +74,7 @@ public class LogFileWebEndpointAutoConfigurationTests {
...
@@ -74,7 +74,7 @@ public class LogFileWebEndpointAutoConfigurationTests {
.
withPropertyValues
(
"logging.file:test.log"
,
.
withPropertyValues
(
"logging.file:test.log"
,
"management.endpoint.logfile.enabled:false"
)
"management.endpoint.logfile.enabled:false"
)
.
run
((
context
)
->
assertThat
(
context
)
.
run
((
context
)
->
assertThat
(
context
)
.
hasSingl
eBean
(
LogFileWebEndpoint
.
class
));
.
doesNotHav
eBean
(
LogFileWebEndpoint
.
class
));
}
}
@Test
@Test
...
...
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