From 9dd3e1da0771c1b3d9e663edbb5006f411da3bd8 Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Fri, 30 Jun 2017 13:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=9C=AC=E5=9C=B0=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=9A=84Service=E9=80=9A=E8=BF=87@Resource=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E8=8E=B7=E5=8F=96Application=E3=80=81ResourceFactory?= =?UTF-8?q?=E7=AD=89=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/org/redkale/boot/Application.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/redkale/boot/Application.java b/src/org/redkale/boot/Application.java index e2fca4967..299d82177 100644 --- a/src/org/redkale/boot/Application.java +++ b/src/org/redkale/boot/Application.java @@ -379,7 +379,7 @@ public final class Application { try { Resource res = field.getAnnotation(Resource.class); if (res == null) return; - if (!(src instanceof WatchService) || Sncp.isRemote((Service) src)) return; //远程模式不得注入 + if (Sncp.isRemote((Service) src)) return; //远程模式不得注入 Class type = field.getType(); if (type == Application.class) { field.set(src, application); @@ -431,7 +431,7 @@ public final class Application { return false; } - }, Application.class, TransportFactory.class, NodeSncpServer.class, NodeHttpServer.class, NodeWatchServer.class); + }, Application.class, ResourceFactory.class, TransportFactory.class, NodeSncpServer.class, NodeHttpServer.class, NodeWatchServer.class); //-------------------------------------------------------------------------- initResources(); }