79796726

Date: 2025-10-22 11:57:51
Score: 1.5
Natty:
Report link

Simple Solution found

@SpringBootTest(properties = "scheduling.enabled=false")

in the Integration test class and

@ConditionalOnProperty(
    name = "scheduling.enabled",
    havingValue = "true",
    matchIfMissing = true  // default: scheduling is active
)

in the class containing @Scheduled methods.

@EnableScheduling is not affected by this and does not affects this, I moved the annotation back to AppConfig and removed SchedulingConfig.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Scheduled
  • User mentioned (0): @EnableScheduling
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Gunnar