Bläddra i källkod

按项目id查询所有资产

FanXiaoyu 6 år sedan
förälder
incheckning
da3ae826ea
1 ändrade filer med 15 tillägg och 12 borttagningar
  1. 15 12
      src/main/java/com/sagacloud/route/Route.java

+ 15 - 12
src/main/java/com/sagacloud/route/Route.java

@@ -5,6 +5,8 @@ import com.sagacloud.Exceptions.InvalidPostException;
 import com.sagacloud.route.processors.GetInsuranceNoListProcessor;
 import com.sagacloud.route.processors.GetPropByPjProcessor;
 import com.sagacloud.utils.Const;
+import com.sagacloud.utils.VendersUtil;
+import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.commons.io.IOUtils;
 
@@ -68,18 +70,6 @@ public class Route extends RouteBuilder {
                 .route()
                 .process();
 
-//        from("direct:getPropertiesByPj")
-
-    }
-
-    protected void configExceptionHandler(){
-        onException(InvalidPostException.class).handled(true).process(new org.apache.camel.Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                Exception exception = (Exception) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
-                exchange.getOut().setBody(VendersUtil.errorJsonMsg(exception.getMessage()));
-            }
-        });
         //body位JSONObject,含有projectId字段
         from("direct:getPropertiesByPj")
                 .process(new GetPropByPjProcessor())
@@ -92,5 +82,18 @@ public class Route extends RouteBuilder {
                 .produces(MediaType.APPLICATION_JSON)
                 .route()
                 .to("direct:getPropertiesByPj");
+
+    }
+
+    protected void configExceptionHandler(){
+        onException(InvalidPostException.class).handled(true).process(new org.apache.camel.Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                Exception exception = (Exception) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
+                exchange.getOut().setBody(VendersUtil.errorJsonMsg(exception.getMessage()));
+            }
+        });
+
+
     }
 }