- private MicroServiceInfo createMicroServiceInfo() {
- String[] serviceAddrInfo = MicroServiceConfig.getServiceAddrInfo();
- MicroServiceInfo msinfo = new MicroServiceInfo();
- msinfo.setServiceName("holmes-rule-mgmt");
- msinfo.setVersion("v1");
- msinfo.setUrl("/api/holmes-rule-mgmt/v1");
- msinfo.setProtocol("REST");
- msinfo.setVisualRange("0|1");
- Set<Node> nodes = new HashSet<>();
- Node node = new Node();
- node.setIp(serviceAddrInfo[0]);
- node.setPort(serviceAddrInfo[1]);
- nodes.add(node);
- msinfo.setNodes(nodes);
- return msinfo;
+ environment.servlets().addFilter("customFilter", new TransactionIdFilter()).addMappingForUrlPatterns(EnumSet
+ .allOf(DispatcherType.class), true, "/*");