From c5e646d25f1b322f08ba7c74c688fb338dde7bc1 Mon Sep 17 00:00:00 2001 From: Jarred Li Date: Mon, 9 Apr 2012 12:33:18 +0800 Subject: [PATCH] update context to scan system commands --- .../shell/samples/helloworld/HelloWorldPlugin.java | 4 +--- src/main/java/org/springframework/shell/Bootstrap.java | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/helloworld/src/main/java/org/springframework/shell/samples/helloworld/HelloWorldPlugin.java b/samples/helloworld/src/main/java/org/springframework/shell/samples/helloworld/HelloWorldPlugin.java index 07477c1a..ae8fbaee 100644 --- a/samples/helloworld/src/main/java/org/springframework/shell/samples/helloworld/HelloWorldPlugin.java +++ b/samples/helloworld/src/main/java/org/springframework/shell/samples/helloworld/HelloWorldPlugin.java @@ -4,9 +4,7 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @Configuration -@ComponentScan({"org.springframework.shell.commands", - "org.springframework.shell.converters", - "org.springframework.shell.samples.helloworld.commands"}) +@ComponentScan({"org.springframework.shell.samples.helloworld.commands"}) public class HelloWorldPlugin { diff --git a/src/main/java/org/springframework/shell/Bootstrap.java b/src/main/java/org/springframework/shell/Bootstrap.java index e1e3131d..2ccbf456 100644 --- a/src/main/java/org/springframework/shell/Bootstrap.java +++ b/src/main/java/org/springframework/shell/Bootstrap.java @@ -157,7 +157,8 @@ public class Bootstrap { } } } - //annctx.scan("org.springframework.shell"); + annctx.scan("org.springframework.shell.commands"); + annctx.scan("org.springframework.shell.converters"); annctx.refresh(); ctx = annctx; }