Skip to content
Snippets Groups Projects
Commit 17c8456d authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

OZG-7038 configure QuittungSchedular as conditional on property

parent 95d25b52
No related branches found
No related tags found
Loading
...@@ -16,7 +16,7 @@ import lombok.Setter; ...@@ -16,7 +16,7 @@ import lombok.Setter;
@Setter @Setter
public class XtaProperties { public class XtaProperties {
static final String XTA_PROPERTIES_PREFIX = "ozgcloud.xta"; public static final String XTA_PROPERTIES_PREFIX = "ozgcloud.xta";
/* /*
* Flag to enable/disable XTA adapter usage. * Flag to enable/disable XTA adapter usage.
......
...@@ -2,15 +2,18 @@ package de.ozgcloud.archive.quittung; ...@@ -2,15 +2,18 @@ package de.ozgcloud.archive.quittung;
import jakarta.annotation.PostConstruct; import jakarta.annotation.PostConstruct;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import de.ozgcloud.archive.common.xta.XtaProperties;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@Component @Component
@Profile("!itcase") @Profile("!itcase")
@RequiredArgsConstructor @RequiredArgsConstructor
@ConditionalOnProperty(prefix = XtaProperties.XTA_PROPERTIES_PREFIX, name = "enabled")
public class QuittungScheduler { public class QuittungScheduler {
private static final String SCHEDULER_CRON = "#{xtaProperties.schedulerCron}"; private static final String SCHEDULER_CRON = "#{xtaProperties.schedulerCron}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment