|
|
|
@ -2,7 +2,9 @@ package com.shxy.xymanager_common.constant;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -10,14 +12,31 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
*
|
|
|
|
|
* @author xzg
|
|
|
|
|
*/
|
|
|
|
|
@Component
|
|
|
|
|
public class Constants
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
@Value("${cma.server}")
|
|
|
|
|
private static String server;
|
|
|
|
|
public String cmServer;
|
|
|
|
|
|
|
|
|
|
@Value("${cma.port}")
|
|
|
|
|
public int cmaPort;
|
|
|
|
|
|
|
|
|
|
private static String server;
|
|
|
|
|
|
|
|
|
|
private static int port;
|
|
|
|
|
|
|
|
|
|
public static String CMD = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
|
private void init(){
|
|
|
|
|
server = cmServer;
|
|
|
|
|
port = cmaPort;
|
|
|
|
|
CMD = "/usr/local/bin/xympadmn --server="+server+"\t" +"--port="+port+"\t" +"--act=";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -176,6 +195,5 @@ public class Constants
|
|
|
|
|
*/
|
|
|
|
|
public static AtomicInteger REQUEST_ID = new AtomicInteger((int) (System.currentTimeMillis()/1000));
|
|
|
|
|
|
|
|
|
|
public static String CMD = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6981 --act=";
|
|
|
|
|
|
|
|
|
|
}
|