From c67c4bf89294aa9926f052d25c44182528c07db0 Mon Sep 17 00:00:00 2001 From: m-rudyk <121865672+m-rudyk@users.noreply.github.com> Date: Fri, 8 Sep 2023 16:45:31 +0300 Subject: [PATCH] Modify default configuration file to prevent fails during LPVS service start (#207) * fix: modify default configuration to prevent service launch fails * fix: fix after review comment, remove unnecessary application exit --- pom.xml | 2 +- .../java/com/lpvs/controller/GitHubWebhooksController.java | 1 - src/main/java/com/lpvs/service/LPVSGitHubService.java | 1 - src/main/resources/application.properties | 6 ++++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 258842bd..d0f19e55 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.10 + 2.7.15 diff --git a/src/main/java/com/lpvs/controller/GitHubWebhooksController.java b/src/main/java/com/lpvs/controller/GitHubWebhooksController.java index b161ae48..ef1a4352 100644 --- a/src/main/java/com/lpvs/controller/GitHubWebhooksController.java +++ b/src/main/java/com/lpvs/controller/GitHubWebhooksController.java @@ -39,7 +39,6 @@ public class GitHubWebhooksController { private String GITHUB_SECRET; - @Autowired ApplicationContext applicationContext; /** diff --git a/src/main/java/com/lpvs/service/LPVSGitHubService.java b/src/main/java/com/lpvs/service/LPVSGitHubService.java index 4848c68b..f1244799 100644 --- a/src/main/java/com/lpvs/service/LPVSGitHubService.java +++ b/src/main/java/com/lpvs/service/LPVSGitHubService.java @@ -88,7 +88,6 @@ public LPVSGitHubService(@Value("${" + GITHUB_LOGIN_PROP_NAME + "}") String GITH } @PostConstruct - @Profile("!test") private void checks() throws Exception { if (this.GITHUB_AUTH_TOKEN.isEmpty()) { log.error(GITHUB_AUTH_TOKEN_ENV_VAR_NAME + "(" + GITHUB_AUTH_TOKEN_PROP_NAME + ") is not set."); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9da5f52c..8fcfdaac 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -42,3 +42,9 @@ spring.datasource.url=jdbc:mysql://localhost:3306/lpvs spring.datasource.username= spring.datasource.password= +# Custom DB components name configuration +app.table.detectedLicenseName=detected_license +app.table.detectedLicenseSchema=lpvs +app.table.diffFileName=code_licenses +app.table.pullRequestsName=lpvs_pull_requests +app.table.queueName=queue