Add EchoCommand to examples.
diff --git a/juneau-examples/juneau-examples-rest/examples.cfg b/juneau-examples/juneau-examples-rest/examples.cfg
index df6aac8..af53440 100755
--- a/juneau-examples/juneau-examples-rest/examples.cfg
+++ b/juneau-examples/juneau-examples-rest/examples.cfg
@@ -54,6 +54,24 @@
stylesheet = styles/devops.css
#=======================================================================================================================
+# Console settings
+#=======================================================================================================================
+[Console]
+
+enabled = true
+
+# List of available console commands.
+# These are classes that implements ConsoleCommand that allow you to submit commands to the microservice via
+# the console.
+# When listed here, the implementations must provide a no-arg constructor.
+# They can also be provided dynamically by overriding the Microservice.createConsoleCommands() method.
+commands =
+ org.apache.juneau.microservice.console.ExitCommand,
+ org.apache.juneau.microservice.console.RestartCommand,
+ org.apache.juneau.microservice.console.HelpCommand,
+ org.apache.juneau.examples.rest.EchoCommand
+
+#=======================================================================================================================
# Logger settings
#-----------------------------------------------------------------------------------------------------------------------
# See FileHandler Java class for details.
diff --git a/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch b/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
index baf89fb..cf31023 100644
--- a/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
+++ b/juneau-examples/juneau-examples-rest/juneau-examples-rest.launch
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/RestMicroservice.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/EchoCommand.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/EchoCommand.java
new file mode 100644
index 0000000..5ccb48d
--- /dev/null
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/EchoCommand.java
@@ -0,0 +1,46 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.examples.rest;
+
+import java.io.*;
+import java.util.*;
+
+import org.apache.juneau.microservice.console.*;
+import org.apache.juneau.utils.*;
+
+/**
+ * Implements an 'echo' console command that simply returns the command arguments as a comma-delimited list.
+ */
+public class EchoCommand extends ConsoleCommand {
+
+ @Override /* ConsoleCommand */
+ public String getName() {
+ return "echo";
+ }
+
+ @Override /* ConsoleCommand */
+ public String getInfo() {
+ return "Echo command";
+ }
+
+ @Override /* ConsoleCommand */
+ public String getDescription() {
+ return "Simple prints the args of the command as a serialized ObjectMap.";
+ }
+
+ @Override /* ConsoleCommand */
+ public boolean execute(Scanner in, PrintWriter out, Args args) {
+ out.println(args);
+ return false;
+ }
+}