Commit fd58596
committed
Conditionally create actuator task scheduler
Add @ConditionalOnBean(MeterRegistry.class) to the actuatorTaskScheduler bean so the scheduler is only created when a MeterRegistry is present. Also add imports for MeterRegistry and ConditionalOnBean. This avoids registering the monitored ThreadPoolTaskScheduler when Micrometer is not available.1 parent 2e7b25b commit fd58596
1 file changed
Lines changed: 3 additions & 0 deletions
File tree
- microsphere-spring-boot-actuator/src/main/java/io/microsphere/spring/boot/actuate/autoconfigure
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
0 commit comments