From c51e2a457f8629d440f757bdc36f4851068c1990 Mon Sep 17 00:00:00 2001 From: "leon.li" Date: Fri, 4 Dec 2015 02:49:43 +0800 Subject: [PATCH] make some changes --- slb-agent/pom.xml | 5 +++++ .../dianping/platform/slb/agent/core/constant/MessageID.java | 3 ++- .../agent/core/transaction/FileBasedTransactionManager.java | 2 ++ slb-agent/src/main/resources/message.properties | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/slb-agent/pom.xml b/slb-agent/pom.xml index 39d7fbe..6a6856f 100644 --- a/slb-agent/pom.xml +++ b/slb-agent/pom.xml @@ -37,6 +37,11 @@ commons-exec 1.3 + + com.google.code.gson + gson + 2.5 + diff --git a/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/constant/MessageID.java b/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/constant/MessageID.java index a124895..1743713 100644 --- a/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/constant/MessageID.java +++ b/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/constant/MessageID.java @@ -8,7 +8,8 @@ package com.dianping.platform.slb.agent.core.constant; */ public enum MessageID { - SCRIPT_EXCUTE_EXCEPTION("script_execute_exception"), FILE_NOT_EXIST("file_not_exist"), DEFAULT("default"); + SCRIPT_EXCUTE_EXCEPTION("script_execute_exception"), FILE_NOT_EXIST("file_not_exist"), DEFAULT( + "default"), ARGUMENT_CHECK_FAIL("argument_check_fail"); private String m_messageId; diff --git a/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/transaction/FileBasedTransactionManager.java b/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/transaction/FileBasedTransactionManager.java index 102885a..19eefc5 100644 --- a/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/transaction/FileBasedTransactionManager.java +++ b/slb-agent/src/main/java/com/dianping/platform/slb/agent/core/transaction/FileBasedTransactionManager.java @@ -1,6 +1,7 @@ package com.dianping.platform.slb.agent.core.transaction; import org.apache.commons.io.FileUtils; +import org.springframework.stereotype.Service; import java.io.File; import java.io.IOException; @@ -11,6 +12,7 @@ import java.io.IOException; *

* Created by leon.li(Li Yang) */ +@Service public class FileBasedTransactionManager implements TransactionManager { public static String TRANSACTION_BASE_DIR = "/data/appdatas/slb-agent/transaction/"; diff --git a/slb-agent/src/main/resources/message.properties b/slb-agent/src/main/resources/message.properties index 9f0c529..b3f9ac3 100644 --- a/slb-agent/src/main/resources/message.properties +++ b/slb-agent/src/main/resources/message.properties @@ -1,3 +1,4 @@ script_execute_exception=Script execute error: %s. file_not_exist=File %s not exists. -default=Default. \ No newline at end of file +default=Default. +argument_check_fail=Argument %s is wrong. \ No newline at end of file