users = userService.list();
- log.info("users=" + Json.toJson(users));
- User haoqoo = userService.add("haoqoo", 19);
- User wendal = userService.add("wendal", 28);
- users = userService.list();
- log.info("users=" + Json.toJson(users));
- userService.delete(haoqoo.getId());
- userService.delete(wendal.getId());
- users = userService.list();
- log.info("users=" + Json.toJson(users));
- return "done";
- }
-
- public void setUserService(UserService userService) {
- this.userService = userService;
- }
-}
diff --git a/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/application.properties b/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/application.properties
deleted file mode 100644
index 919968cd..00000000
--- a/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/application.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-nutz.application.name=web
-server.port=8082
-server.host=0.0.0.0
diff --git a/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/log4j.properties b/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/log4j.properties
deleted file mode 100644
index 7580502d..00000000
--- a/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-log4j.rootLogger=debug,Console
-
-log4j.logger.org.eclipse.jetty=info
-log4j.logger.org.apache.http=info
-log4j.logger.com.netflix.discovery=info
-log4j.logger.com.netflix.loadbalancer=info
-
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=[%-5p] %d{HH:mm:ss.SSS} %l - %m%n
diff --git a/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/static/index.html b/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/static/index.html
deleted file mode 100644
index 4fb533cf..00000000
--- a/nutzboot-cloud/cloud-demo/cloud-demo-web/src/main/resources/static/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-Hello, So NB!
-
-
-
-
这是Feign客户端,没有dao相关的依赖及代码
-
-
-
-
\ No newline at end of file
diff --git a/nutzboot-cloud/cloud-demo/pom.xml b/nutzboot-cloud/cloud-demo/pom.xml
deleted file mode 100644
index eb3a6707..00000000
--- a/nutzboot-cloud/cloud-demo/pom.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- 4.0.0
-
- org.nutz
- nutzboot-cloud
- 2.2-SNAPSHOT
-
- io.nutz.cloud.demo
- cloud-demo
- pom
-
\ No newline at end of file
diff --git a/nutzboot-cloud/gateway-server/pom.xml b/nutzboot-cloud/gateway-server/pom.xml
deleted file mode 100644
index a8039576..00000000
--- a/nutzboot-cloud/gateway-server/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
- 4.0.0
-
- org.nutz
- nutzboot-starter
- 2.2-SNAPSHOT
-
- gateway-server
-
-
- org.eclipse.jetty
- jetty-proxy
- ${jetty.version}
-
-
- org.nutz.cloud
- loach-client
- 2.2-SNAPSHOT
-
-
- org.slf4j
- slf4j-log4j12
-
-
- org.nutz
- nutzboot-starter-jetty
-
-
- org.nutz.cloud
-
\ No newline at end of file
diff --git a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/ApiGateWayServlet.java b/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/ApiGateWayServlet.java
deleted file mode 100644
index a6c0351b..00000000
--- a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/ApiGateWayServlet.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.nutz.boot.starter.gateway.server;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.eclipse.jetty.proxy.AsyncMiddleManServlet;
-import org.nutz.boot.starter.WebServletFace;
-import org.nutz.ioc.loader.annotation.Inject;
-import org.nutz.ioc.loader.annotation.IocBean;
-
-@IocBean
-@SuppressWarnings("serial")
-public class ApiGateWayServlet extends AsyncMiddleManServlet implements WebServletFace {
-
- public static final String NAME_ROUTE_CONCEXT = "gateway.route_context";
-
- @Inject
- protected RouteConfig routeConfig;
-
- @Override
- protected void service(HttpServletRequest clientRequest, HttpServletResponse proxyResponse) throws ServletException, IOException {
- RouteContext ctx = new RouteContext();
- ctx.setup(clientRequest, proxyResponse);
- clientRequest.setAttribute(NAME_ROUTE_CONCEXT, ctx);
- Iterator it = routeConfig.getRouteFilters();
- while (it.hasNext()) {
- if (!it.next().preRoute(ctx)) {
- return;
- }
- }
- if (ctx.targetHost == null && ctx.rewritedTarget == null) {
- proxyResponse.sendError(404);
- return;
- }
- super.service(clientRequest, proxyResponse);
- }
-
- @Override
- protected String rewriteTarget(HttpServletRequest clientRequest) {
- RouteContext ctx = ((RouteContext)clientRequest.getAttribute(NAME_ROUTE_CONCEXT));
- if (ctx.rewritedTarget != null)
- return ctx.rewritedTarget;
- String url = ctx.targetHost;
- if (url.startsWith("http://") || url.startsWith("https://")) {
-
- }
- else {
- url = "http://" + url;
- }
- if (ctx.targetPort > 0) {
- url += ":" + ctx.targetPort;
- }
- if (ctx.targetUri == null) {
- url += ctx.uri;
- }
- else {
- url += ctx.targetUri;
- }
- if (ctx.queryString != null) {
- url += "?" + ctx.queryString;
- }
- return url;
- }
-
- public String getName() {
- return "gateway";
- }
-
- public String getPathSpec() {
- return "/*";
- }
-
- public Servlet getServlet() {
- return this;
- }
-}
diff --git a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/GatewayServerLauncher.java b/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/GatewayServerLauncher.java
deleted file mode 100644
index 1a2cabba..00000000
--- a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/GatewayServerLauncher.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.nutz.boot.starter.gateway.server;
-
-import org.nutz.boot.NbApp;
-
-public class GatewayServerLauncher {
-
- public static void main(String[] args) {
- new NbApp().run();
- }
-
-}
diff --git a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteConfig.java b/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteConfig.java
deleted file mode 100644
index 2fac7bce..00000000
--- a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteConfig.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.nutz.boot.starter.gateway.server;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.nutz.boot.starter.gateway.server.impl.SimpleRouteFilter;
-import org.nutz.ioc.Ioc;
-import org.nutz.ioc.impl.PropertiesProxy;
-import org.nutz.ioc.loader.annotation.Inject;
-import org.nutz.ioc.loader.annotation.IocBean;
-import org.nutz.log.Log;
-import org.nutz.log.Logs;
-
-@IocBean(create="init")
-public class RouteConfig {
-
- private static final Log log = Logs.get();
-
- @Inject
- protected PropertiesProxy conf;
-
- @Inject("refer:$ioc")
- protected Ioc ioc;
-
- protected List routes = new LinkedList<>();
-
- public Iterator getRouteFilters() {
- return routes.iterator();
- }
-
- public void init() {
- for (String key : conf.getKeys()) {
- if (key.startsWith("gw.") && key.endsWith(".filters")) {
- String name = key.substring("gw.".length(), key.length() - ".filters".length());
- log.debug("add config for name=" + name);
- // 当前仅支持simple,直接new就行了
- SimpleRouteFilter simple = new SimpleRouteFilter();
- simple.setPropertiesProxy(ioc, conf, key.substring(0, key.length() - ".filters".length()));
- routes.add(simple);
- }
- }
- }
-}
diff --git a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteContext.java b/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteContext.java
deleted file mode 100644
index fb52de63..00000000
--- a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteContext.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.nutz.boot.starter.gateway.server;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class RouteContext {
-
- public String method;
- public String uri;
- public String host;
- public Map headers;
- public String queryString;
-
- public String targetHost;
- public String targetUri;
- public int targetPort;
-
- public String rewritedTarget;
-
- public int connectTimeOut, sendTimeOut, readTimeOut;
-
- public HttpServletResponse resp;
- public HttpServletRequest req;
-
- public void setup(HttpServletRequest req, HttpServletResponse resp) {
- method = req.getMethod().toUpperCase();
- uri = req.getRequestURI();
- host = req.getHeader("Host");
- headers = new HashMap<>();
- Enumeration headerNames = req.getHeaderNames();
- while (headerNames.hasMoreElements()) {
- String headerName = headerNames.nextElement();
- headers.put(headerName, req.getHeader(headerName));
- }
- queryString = req.getQueryString();
- this.req = req;
- this.resp = resp;
- }
-}
diff --git a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteFilter.java b/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteFilter.java
deleted file mode 100644
index 4d8d89d5..00000000
--- a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/RouteFilter.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.nutz.boot.starter.gateway.server;
-
-import java.io.IOException;
-
-import org.nutz.ioc.Ioc;
-import org.nutz.ioc.impl.PropertiesProxy;
-
-public interface RouteFilter {
-
- default boolean preRoute(RouteContext ctx) throws IOException {
- return true;
- }
-
- default void postRoute(RouteContext ctx) throws IOException {}
-
- default void setPropertiesProxy(Ioc ioc, PropertiesProxy conf, String prefix) {}
-
- String nickname();
-}
diff --git a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/impl/SimpleRouteFilter.java b/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/impl/SimpleRouteFilter.java
deleted file mode 100644
index c596cb92..00000000
--- a/nutzboot-cloud/gateway-server/src/main/java/org/nutz/boot/starter/gateway/server/impl/SimpleRouteFilter.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package org.nutz.boot.starter.gateway.server.impl;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.regex.Pattern;
-
-import org.nutz.boot.starter.gateway.server.RouteContext;
-import org.nutz.boot.starter.gateway.server.RouteFilter;
-import org.nutz.boot.starter.loach.client.LoachClient;
-import org.nutz.ioc.Ioc;
-import org.nutz.ioc.impl.PropertiesProxy;
-import org.nutz.lang.Strings;
-import org.nutz.lang.random.R;
-import org.nutz.lang.util.NutMap;
-import org.nutz.log.Log;
-import org.nutz.log.Logs;
-
-public class SimpleRouteFilter implements RouteFilter {
-
- private static final Log log = Logs.get();
-
- protected String prefix;
-
- protected String[] hostnames;
-
- protected String serviceName;
-
- protected String[] servers;
-
- protected String[] uriPrefixs;
-
- protected boolean removePrefix;
-
- protected Pattern uriPattern;
-
- protected int connectTimeOut, sendTimeOut, readTimeOut;
-
- protected boolean corsEnable;
-
- protected LoachClient loachClient;
-
- public void setPropertiesProxy(Ioc ioc, PropertiesProxy conf, String prefix) {
- // 需要匹配的域名
- String hostnames = conf.get(prefix + ".hostnames");
- if (!Strings.isBlank(hostnames)) {
- this.hostnames = Strings.splitIgnoreBlank(hostnames, "(;|,)");
- }
- // 固定转发的服务器vip
- String servers = conf.get(prefix + ".servers");
- if (!Strings.isBlank(servers)) {
- this.servers = Strings.splitIgnoreBlank(servers, "(;|,)");
- }
- else {
- // 服务名
- serviceName = conf.get(prefix + ".serviceName");
- if (!Strings.isBlank(serviceName)) {
- loachClient = ioc.get(LoachClient.class);
- }
- }
-
- String uriPrefixs = conf.get(prefix + ".uri.prefixs");
- if (!Strings.isBlank(uriPrefixs)) {
- this.uriPrefixs = Strings.splitIgnoreBlank(uriPrefixs, "(;|,)");
- }
- removePrefix = conf.getBoolean(prefix + ".uri.prefix.remove", false);
- String uripattern = conf.get(prefix + ".uri.match");
- if (!Strings.isBlank(uripattern)) {
- uriPattern = Pattern.compile(uripattern);
- }
- connectTimeOut = conf.getInt(prefix + ".time.connect", 2000);
- sendTimeOut = conf.getInt(prefix + ".time.send", 3000);
- readTimeOut = conf.getInt(prefix + ".time.read", 3000);
- corsEnable = conf.getBoolean(prefix + ".cors.enable");
- }
-
- @Override
- public boolean preRoute(RouteContext ctx) throws IOException {
- // 校验Host
- if (!checkHost(ctx))
- return true;
- // 校验uri前缀
- if (!checkUriPrefix(ctx))
- return true;
- // 校验uri正则表达式
- if (!checkUriPattern(ctx))
- return true;
- // 设置一些必要的超时设置
- ctx.connectTimeOut = connectTimeOut;
- ctx.sendTimeOut = sendTimeOut;
- ctx.readTimeOut = readTimeOut;
- // TODO 处理跨域
-
- if (servers != null) {
- ctx.targetHost = servers[R.random(0, servers.length)];
- }
- else {
- List services = loachClient.getService(serviceName);
- if (services.isEmpty()) {
- log.debugf("emtry server list for [%s]", serviceName);
- ctx.resp.sendError(500);
- return false; // 终止匹配
- }
- else {
- NutMap service = services.get(R.random(0, services.size() - 1));
- ctx.targetHost = service.getString("vip");
- ctx.targetPort = service.getInt("port");
- }
- }
-
- return RouteFilter.super.preRoute(ctx);
- }
-
- public boolean checkHost(RouteContext ctx) {
- if (hostnames == null)
- return true;
- boolean pass = false;
- for (String hostname : hostnames) {
- if (hostname.equals(ctx.host)) {
- pass = true;
- break;
- }
- }
- return pass;
- }
-
- public boolean checkUriPrefix(RouteContext ctx) {
- if (uriPrefixs == null)
- return true;
- boolean pass = false;
- // 校验URL前缀
- if (uriPrefixs != null) {
- for (String prefix : uriPrefixs) {
- if (ctx.uri.startsWith(prefix)) {
- pass = true;
- if (removePrefix) {
- if (ctx.uri.length() == prefix.length()) {
- ctx.targetUri = "/";
- }
- else {
- ctx.targetUri = ctx.uri.substring(prefix.length());
- }
- }
- }
- }
- }
- return pass;
- }
-
- public boolean checkUriPattern(RouteContext ctx) {
- if (uriPattern == null)
- return true;
- return uriPattern.matcher(ctx.uri).find();
- }
-
- public String nickname() {
- return "simple";
- }
-
-}
diff --git a/nutzboot-cloud/gateway-server/src/main/resources/application.properties b/nutzboot-cloud/gateway-server/src/main/resources/application.properties
deleted file mode 100644
index 502f2200..00000000
--- a/nutzboot-cloud/gateway-server/src/main/resources/application.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-server.port=8620
-server.host=0.0.0.0
-
-nutz.application.name=gateway
-
-gw.demo.filters=simple
-gw.demo.serviceName=demo
-gw.demo.url.prefixs=/
\ No newline at end of file
diff --git a/nutzboot-cloud/gateway-server/src/main/resources/log4j.properties b/nutzboot-cloud/gateway-server/src/main/resources/log4j.properties
deleted file mode 100644
index 9fc798df..00000000
--- a/nutzboot-cloud/gateway-server/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-log4j.rootLogger=debug,Console
-
-log4j.logger.org.eclipse.jetty=info
-
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=[%-5p] %d{HH:mm:ss.SSS} %l - %m%n
diff --git a/nutzboot-cloud/literpc/pom.xml b/nutzboot-cloud/literpc/pom.xml
deleted file mode 100644
index 0d4066e3..00000000
--- a/nutzboot-cloud/literpc/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
- 4.0.0
-
- org.nutz
- nutzboot-cloud
- 2.2-SNAPSHOT
-
- org.nutz.cloud
- literpc
-
-
- org.nutz.cloud
- loach-client
- 2.2-SNAPSHOT
-
-
-
\ No newline at end of file
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/LiteRpc.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/LiteRpc.java
deleted file mode 100644
index efb94bf3..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/LiteRpc.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package org.nutz.boot.starter.literpc;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.nutz.boot.starter.literpc.api.RpcSerializer;
-import org.nutz.boot.starter.literpc.impl.RpcInvoker;
-import org.nutz.boot.starter.literpc.impl.endpoint.RpcEndpoint;
-import org.nutz.boot.starter.loach.client.LoachClient;
-import org.nutz.ioc.Ioc;
-import org.nutz.ioc.loader.annotation.Inject;
-import org.nutz.ioc.loader.annotation.IocBean;
-import org.nutz.lang.Lang;
-import org.nutz.lang.util.NutMap;
-import org.nutz.log.Log;
-import org.nutz.log.Logs;
-
-@IocBean(create="init")
-public class LiteRpc implements LoachClient.UpdateListener {
-
- private static final Log log = Logs.get();
-
- protected static String RPC_REG_KEY = "literpc.v1";
-
- @Inject("refer:$ioc")
- protected Ioc ioc;
-
- /**
- * 持有所有的执行器
- */
- protected Map invokers = new ConcurrentHashMap<>();
-
- /**
- * 方法签名对应的可用服务器列表
- */
- protected Map> services = new HashMap<>();
-
- /**
- * 受支持的序列化器
- */
- protected Map serializers = new HashMap<>();
-
- /**
- * 受支持的通信方式
- */
- protected Map endpoints = new HashMap<>();
-
- public void init() {
- // 获取所有RpcSerializer实例,并注册
- for(String name : ioc.getNamesByType(RpcSerializer.class)) {
- registerSerializer(ioc.get(RpcSerializer.class, name));
- }
- // 获取所有RpcEndpoint实例,并注册
- for(String name : ioc.getNamesByType(RpcEndpoint.class)) {
- registerEndpoint(ioc.get(RpcEndpoint.class, name));
- }
- }
-
- public RpcInvoker getInvoker(String methodSign) {
- return invokers.get(methodSign);
- }
-
- public RpcInvoker registerInovker(String methodSign, RpcInvoker invoker) {
- return invokers.put(methodSign, invoker);
- }
-
- public static String getMethodSign(Method method) {
- return Lang.sha1(method.toGenericString());
- }
-
- public void updateLoachRegInfo() {
- LoachClient.EXT_REG_DATA.put(RPC_REG_KEY, new ArrayList<>(invokers.keySet()));
- }
-
- public List getServers(String methodSign) {
- return this.services.get(methodSign);
- }
-
- public void onUpdate(Map> services) {
- if (services == null || services.isEmpty()) {
- return; // fuck
- }
- Map> rpcMap = new HashMap<>();
- for (List _se : services.values()) {
- for (NutMap server : _se) {
- List rpcKeys = server.getList(RPC_REG_KEY, String.class);
- if (rpcKeys == null || rpcKeys.isEmpty())
- continue;
- for (String rpcKey : rpcKeys) {
- List servers = rpcMap.get(rpcKey);
- if (servers == null) {
- servers = new ArrayList<>();
- rpcMap.put(rpcKey, servers);
- }
- servers.add(server);
- }
- }
- }
- this.services = rpcMap;
- }
-
- public RpcSerializer getSerializer(String name) {
- return serializers.get(name);
- }
-
- public void registerSerializer(RpcSerializer serializer) {
- log.debug("add RpcSerializer name=" + serializer.getName());
- this.serializers.put(serializer.getName(), serializer);
- }
-
- public RpcEndpoint getEndpoint(String name) {
- return endpoints.get(name);
- }
-
- public void registerEndpoint(RpcEndpoint endpoint) {
- log.debug("add RpcEndpoint name=" + endpoint.getName());
- this.endpoints.put(endpoint.getName(), endpoint);
- }
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/RpcException.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/RpcException.java
deleted file mode 100644
index d6cc726e..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/RpcException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.nutz.boot.starter.literpc;
-
-@SuppressWarnings("serial")
-public class RpcException extends RuntimeException {
-
- public RpcException() {
- }
-
- public RpcException(String message) {
- super(message);
- }
-
- public RpcException(Throwable cause) {
- super(cause);
- }
-
- public RpcException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public RpcException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
- }
-
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/annotation/RpcInject.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/annotation/RpcInject.java
deleted file mode 100644
index 5c82120d..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/annotation/RpcInject.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.nutz.boot.starter.literpc.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.nutz.boot.starter.literpc.impl.proxy.DefaultRpcInjectProxy;
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.FIELD})
-@Documented
-public @interface RpcInject {
-
- Class extends DefaultRpcInjectProxy> by() default DefaultRpcInjectProxy.class;
-
- int connectTimeout() default -1;
-
- int timeout() default -1;
-
- String endpointType() default "";
-
- String serializer() default "";
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcReq.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcReq.java
deleted file mode 100644
index 2ffa563f..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcReq.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.nutz.boot.starter.literpc.api;
-
-import java.lang.reflect.Method;
-
-public class RpcReq {
- public Object object;
- public Method method;
- public String methodSign;
- public Object[] args;
- public int timeout, connectTimeout;
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcResp.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcResp.java
deleted file mode 100644
index 4218fb08..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcResp.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.nutz.boot.starter.literpc.api;
-
-import java.io.Serializable;
-
-public class RpcResp implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public Throwable err;
- public Object returnValue;
-
- public RpcResp() {
- }
-
- public RpcResp(Object returnValue) {
- this.returnValue = returnValue;
- }
-
- public RpcResp(Throwable err) {
- this.err = err;
- }
-
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcSerializer.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcSerializer.java
deleted file mode 100644
index b5852a0b..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcSerializer.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.nutz.boot.starter.literpc.api;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public interface RpcSerializer {
-
- void write(Object obj, OutputStream out) throws Exception;
-
- Object read(InputStream ins) throws Exception;
-
- String getName();
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcService.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcService.java
deleted file mode 100644
index 57a05265..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/api/RpcService.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.nutz.boot.starter.literpc.api;
-
-public interface RpcService {
-}
diff --git a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/impl/LiteRpcInjectFactory.java b/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/impl/LiteRpcInjectFactory.java
deleted file mode 100644
index 8c55b738..00000000
--- a/nutzboot-cloud/literpc/src/main/java/org/nutz/boot/starter/literpc/impl/LiteRpcInjectFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.nutz.boot.starter.literpc.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Proxy;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.nutz.boot.starter.literpc.LiteRpc;
-import org.nutz.boot.starter.literpc.annotation.RpcInject;
-import org.nutz.boot.starter.literpc.impl.proxy.AbstractRpcRefProxy;
-import org.nutz.ioc.Ioc;
-import org.nutz.ioc.IocEventListener;
-import org.nutz.ioc.loader.annotation.Inject;
-import org.nutz.ioc.loader.annotation.IocBean;
-import org.nutz.lang.Mirror;
-
-/**
- * 当一个ioc对象生成的时候,看看有无@RpcInject注解,如果有,注入代理对象
- *
- */
-@IocBean(depose="depose")
-public class LiteRpcInjectFactory implements IocEventListener {
-
- @Inject("refer:$ioc")
- protected Ioc ioc;
-
- @Inject
- protected LiteRpc liteRpc;
-
- protected Map rpcProxys = new HashMap<>();
-
- protected ClassLoader classLoader = getClass().getClassLoader();
-
- public Object afterBorn(Object obj, String beanName) {
- Mirror