Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on beans validator from Spring Boot starter #174

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 0 additions & 12 deletions db-scheduler-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,6 @@
<optional>true</optional>
</dependency>

<!-- Validation -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
</dependency>

<!-- Annotations -->
<dependency>
<groupId>javax.annotation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@
import com.github.kagkarlsson.scheduler.SchedulerBuilder;
import java.time.Duration;
import java.util.Optional;
import javax.validation.constraints.NotNull;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.convert.DurationUnit;
import org.springframework.validation.annotation.Validated;

import static java.time.temporal.ChronoUnit.*;

@Validated
@ConfigurationProperties("db-scheduler")
public class DbSchedulerProperties {
/**
Expand All @@ -43,7 +40,6 @@ public class DbSchedulerProperties {
* How often to update the heartbeat timestamp for running executions.
*/
@DurationUnit(MINUTES)
@NotNull
private Duration heartbeatInterval = SchedulerBuilder.DEFAULT_HEARTBEAT_INTERVAL;

/**
Expand All @@ -59,7 +55,6 @@ public class DbSchedulerProperties {
* <p>Name of the table used to track task-executions. Must match the database. Change name in the
* table definitions accordingly when creating or modifying the table.
*/
@NotNull
private String tableName = JdbcTaskRepository.DEFAULT_TABLE_NAME;

/**
Expand All @@ -75,7 +70,6 @@ public class DbSchedulerProperties {
* <p>How often the scheduler checks the database for due executions.
*/
@DurationUnit(SECONDS)
@NotNull
private Duration pollingInterval = SchedulerBuilder.DEFAULT_POLLING_INTERVAL;

/**
Expand All @@ -93,7 +87,6 @@ public class DbSchedulerProperties {
* <p>The time after which executions with unknown tasks are automatically deleted.</p>
*/
@DurationUnit(HOURS)
@NotNull
private Duration deleteUnresolvedAfter = SchedulerBuilder.DEFAULT_DELETION_OF_UNRESOLVED_TASKS_DURATION;


Expand All @@ -103,7 +96,6 @@ public class DbSchedulerProperties {
* <code>executionContext.getSchedulerState().isShuttingDown()</code> in the ExecutionHandler and abort long-running task.
*/
@DurationUnit(SECONDS)
@NotNull
private Duration shutdownMaxWait = SchedulerBuilder.SHUTDOWN_MAX_WAIT;

public boolean isEnabled() {
Expand Down