You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/18 07:38:00 UTC
[incubator-eventmesh] branch master updated: Extraction of Constants in Web Hook Operation Constant
This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 5b5196bc Extraction of Constants in Web Hook Operation Constant
new f6cd6183 Merge pull request #1641 from soundarrajan-official/web-hook-operation-constant
5b5196bc is described below
commit 5b5196bc169dca17cec3a6de73910ae79857a0b0
Author: Soundarrajan <so...@gmail.com>
AuthorDate: Tue Oct 18 11:56:57 2022 +0530
Extraction of Constants in Web Hook Operation Constant
---
eventmesh-webhook/eventmesh-webhook-api/build.gradle | 2 +-
.../apache/eventmesh/webhook/api/WebHookOperationConstant.java | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/eventmesh-webhook/eventmesh-webhook-api/build.gradle b/eventmesh-webhook/eventmesh-webhook-api/build.gradle
index 52c44a50..50807c2b 100644
--- a/eventmesh-webhook/eventmesh-webhook-api/build.gradle
+++ b/eventmesh-webhook/eventmesh-webhook-api/build.gradle
@@ -16,7 +16,7 @@
*/
dependencies {
-
+ implementation project(":eventmesh-common")
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
diff --git a/eventmesh-webhook/eventmesh-webhook-api/src/main/java/org/apache/eventmesh/webhook/api/WebHookOperationConstant.java b/eventmesh-webhook/eventmesh-webhook-api/src/main/java/org/apache/eventmesh/webhook/api/WebHookOperationConstant.java
index 92de716e..6c0a1a25 100644
--- a/eventmesh-webhook/eventmesh-webhook-api/src/main/java/org/apache/eventmesh/webhook/api/WebHookOperationConstant.java
+++ b/eventmesh-webhook/eventmesh-webhook-api/src/main/java/org/apache/eventmesh/webhook/api/WebHookOperationConstant.java
@@ -17,6 +17,8 @@
package org.apache.eventmesh.webhook.api;
+import org.apache.eventmesh.common.Constants;
+
import java.io.File;
public class WebHookOperationConstant {
@@ -39,11 +41,13 @@ public class WebHookOperationConstant {
public static final String OPERATION_MODE_CONFIG_NAME = "eventMesh.webHook.operationMode";
+ public static final String EVENTMESH_HOME = "#{eventMeshHome}";
+
public static final String getFilePath(String filePath) {
- if (filePath.startsWith("#{eventMeshHome}")) {
- String configPath = System.getProperty("confPath", System.getenv("confPath"));
+ if (filePath.startsWith(EVENTMESH_HOME)) {
+ String configPath = Constants.EVENTMESH_CONF_HOME;
- filePath = filePath.replace("#{eventMeshHome}", configPath.substring(0, configPath.lastIndexOf(FILE_SEPARATOR)));
+ filePath = filePath.replace(EVENTMESH_HOME, configPath.substring(0, configPath.lastIndexOf(FILE_SEPARATOR)));
}
return filePath;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org