// Generated by delombok at Thu Jan 25 18:54:13 EST 2024
package org.tbk.ngtor.command;

import lombok.NonNull;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.info.BuildProperties;
import org.springframework.stereotype.Component;
import org.tbk.ngtor.conditional.ConditionalOnCommand;

@Component
@ConditionalOnCommand("version")
public class VersionCommandRunner implements ApplicationRunner {
    @NonNull
    private final BuildProperties buildProperties;

    @Override
    public void run(ApplicationArguments args) {
        System.out.println(buildProperties.getVersion());
    }

    @java.lang.SuppressWarnings("all")
    public VersionCommandRunner(@NonNull final BuildProperties buildProperties) {
        if (buildProperties == null) {
            throw new java.lang.IllegalArgumentException("buildProperties is marked non-null but is null");
        }
        this.buildProperties = buildProperties;
    }
}
