示例#1
0
 @Override
 protected RunArguments resolveApplicationArguments() {
   RunArguments applicationArguments = super.resolveApplicationArguments();
   applicationArguments.getArgs().addLast(ENABLE_MBEAN_PROPERTY);
   if (isFork()) {
     applicationArguments.getArgs().addLast(JMX_NAME_PROPERTY_PREFIX + this.jmxName);
   }
   return applicationArguments;
 }
示例#2
0
 @Override
 protected RunArguments resolveJvmArguments() {
   RunArguments jvmArguments = super.resolveJvmArguments();
   if (isFork()) {
     List<String> remoteJmxArguments = new ArrayList<String>();
     remoteJmxArguments.add("-Dcom.sun.management.jmxremote");
     remoteJmxArguments.add("-Dcom.sun.management.jmxremote.port=" + this.jmxPort);
     remoteJmxArguments.add("-Dcom.sun.management.jmxremote.authenticate=false");
     remoteJmxArguments.add("-Dcom.sun.management.jmxremote.ssl=false");
     jvmArguments.getArgs().addAll(remoteJmxArguments);
   }
   return jvmArguments;
 }
 private void addActiveProfileArgument(RunArguments arguments) {
   if (this.profiles.length > 0) {
     StringBuilder arg = new StringBuilder("--spring.profiles.active=");
     for (int i = 0; i < this.profiles.length; i++) {
       arg.append(this.profiles[i]);
       if (i < this.profiles.length - 1) {
         arg.append(",");
       }
     }
     arguments.getArgs().addFirst(arg.toString());
     logArguments("Active profile(s): ", this.profiles);
   }
 }
 private void addJvmArgs(List<String> args) {
   RunArguments jvmArguments = resolveJvmArguments();
   Collections.addAll(args, jvmArguments.asArray());
   logArguments("JVM argument(s): ", jvmArguments.asArray());
 }
 private void addArgs(List<String> args) {
   RunArguments applicationArguments = resolveApplicationArguments();
   Collections.addAll(args, applicationArguments.asArray());
   logArguments("Application argument(s): ", this.arguments);
 }