From e112b80f25f5e8cc5bda6c62a64dca201f5ef570 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 9 Nov 2022 11:53:42 +0400 Subject: [PATCH] fix jenkinsfile --- Jenkinsfile | 2 +- src/main/java/ru/ulstu/ExampleWebApplication.java | 2 -- src/main/java/ru/ulstu/configuration/ApplicationProperties.java | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index aa09ef6..f554087 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { stage('Test') { steps { sh 'java -version' - sh 'bash ./gradlew bootRun -Dexample-web.check-run=true' + sh "bash ./gradlew bootRun --args='--example-web.check-run=true'" } } } diff --git a/src/main/java/ru/ulstu/ExampleWebApplication.java b/src/main/java/ru/ulstu/ExampleWebApplication.java index 9c86caa..bd2e665 100644 --- a/src/main/java/ru/ulstu/ExampleWebApplication.java +++ b/src/main/java/ru/ulstu/ExampleWebApplication.java @@ -3,12 +3,10 @@ package ru.ulstu; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.event.ApplicationReadyEvent; -import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.event.EventListener; import ru.ulstu.configuration.ApplicationProperties; @SpringBootApplication -@EnableConfigurationProperties public class ExampleWebApplication { private final ApplicationProperties applicationProperties; diff --git a/src/main/java/ru/ulstu/configuration/ApplicationProperties.java b/src/main/java/ru/ulstu/configuration/ApplicationProperties.java index d2724de..68b6af5 100644 --- a/src/main/java/ru/ulstu/configuration/ApplicationProperties.java +++ b/src/main/java/ru/ulstu/configuration/ApplicationProperties.java @@ -2,11 +2,9 @@ package ru.ulstu.configuration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; -import org.springframework.validation.annotation.Validated; @Component @ConfigurationProperties(prefix = "example-web") -@Validated public class ApplicationProperties { private boolean checkRun;