├── src ├── main │ ├── resources │ │ ├── META-INF │ │ │ ├── app.properties │ │ │ ├── services │ │ │ │ └── com.mallbiz.spi.Search │ │ │ ├── dubbo │ │ │ │ └── com.alibaba.dubbo.rpc.Filter │ │ │ └── spring │ │ │ │ ├── webmvc-config.xml │ │ │ │ └── applicationContext.xml │ │ ├── dubbo.properties │ │ ├── log4j.xml │ │ └── spy.properties │ ├── webapp │ │ ├── images │ │ │ ├── add.png │ │ │ ├── en.png │ │ │ ├── list.png │ │ │ ├── show.png │ │ │ ├── create.png │ │ │ ├── delete.png │ │ │ ├── favicon.ico │ │ │ ├── update.png │ │ │ ├── banner-graphic.png │ │ │ ├── resultset_first.png │ │ │ ├── resultset_last.png │ │ │ ├── resultset_next.png │ │ │ ├── resultset_previous.png │ │ │ └── springsource-logo.png │ │ ├── WEB-INF │ │ │ ├── web.xml │ │ │ └── spring │ │ │ │ └── webmvc-config.xml │ │ └── styles │ │ │ ├── alt.css │ │ │ └── standard.css │ └── java │ │ └── com │ │ └── mallbiz │ │ ├── spi │ │ ├── Search.java │ │ ├── FileSearch.java │ │ ├── BufferSearch.java │ │ └── DoSearch.java │ │ ├── api │ │ ├── TestRegistryService.java │ │ └── Notify.java │ │ ├── service │ │ ├── Provider.java │ │ ├── NotifyImpl.java │ │ └── RegistryServiceImpl.java │ │ ├── catcommon │ │ ├── CatContext.java │ │ ├── CatConstants.java │ │ └── CatInterceptor.java │ │ ├── dubbofilter │ │ ├── AppNameAppendFilter.java │ │ ├── registry │ │ │ └── CatRegistryFactoryWrapper.java │ │ └── DubboCatFilter.java │ │ └── controller │ │ ├── CatDubboTest.java │ │ └── GoodsController.java └── test │ └── java │ └── com │ └── mallbiz │ └── service │ └── UserSyncServiceTest.java ├── .gitignore ├── README.md ├── spy.log └── pom.xml /src/main/resources/META-INF/app.properties: -------------------------------------------------------------------------------- 1 | app.name=cat-web-client -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/com.mallbiz.spi.Search: -------------------------------------------------------------------------------- 1 | com.mallbiz.spi.BufferSearch -------------------------------------------------------------------------------- /src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Filter: -------------------------------------------------------------------------------- 1 | dubboCatFilter=com.mallbiz.dubbofilter.DubboCatFilter -------------------------------------------------------------------------------- /src/main/webapp/images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/add.png -------------------------------------------------------------------------------- /src/main/webapp/images/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/en.png -------------------------------------------------------------------------------- /src/main/webapp/images/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/list.png -------------------------------------------------------------------------------- /src/main/webapp/images/show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/show.png -------------------------------------------------------------------------------- /src/main/webapp/images/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/create.png -------------------------------------------------------------------------------- /src/main/webapp/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/delete.png -------------------------------------------------------------------------------- /src/main/webapp/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/favicon.ico -------------------------------------------------------------------------------- /src/main/webapp/images/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/update.png -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/spi/Search.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.spi; 2 | 3 | public interface Search { 4 | public void search(); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/webapp/images/banner-graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/banner-graphic.png -------------------------------------------------------------------------------- /src/main/webapp/images/resultset_first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/resultset_first.png -------------------------------------------------------------------------------- /src/main/webapp/images/resultset_last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/resultset_last.png -------------------------------------------------------------------------------- /src/main/webapp/images/resultset_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/resultset_next.png -------------------------------------------------------------------------------- /src/main/webapp/images/resultset_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/resultset_previous.png -------------------------------------------------------------------------------- /src/main/webapp/images/springsource-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/songwie/cat-dubbo-demo/HEAD/src/main/webapp/images/springsource-logo.png -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/api/TestRegistryService.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.api; 2 | 3 | public interface TestRegistryService { 4 | public String hello(String root,String parent,String child); 5 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/* 2 | target/test-classes/* 3 | target/m2e-wtp/* 4 | .classpath 5 | .settings/* 6 | .project 7 | /target 8 | 9 | *.iml 10 | .idea/* 11 | .spy.log 12 | /disconf/* 13 | /.apt_generated/ 14 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/api/Notify.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.api; 2 | 3 | 4 | public interface Notify { 5 | public void onreturn(String msg, String id); 6 | public void onthrow(Throwable ex, String id); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/spi/FileSearch.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.spi; 2 | 3 | public class FileSearch implements Search { 4 | 5 | @Override 6 | public void search() { 7 | System.err.println("FileSearch"); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/spi/BufferSearch.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.spi; 2 | 3 | public class BufferSearch implements Search { 4 | 5 | @Override 6 | public void search() { 7 | System.err.println("BufferSearch"); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/dubbo.properties: -------------------------------------------------------------------------------- 1 | dubbo.registry.address=zookeeper://121.40.121.133:4180 2 | dubbo.service.protocol=dubbo 3 | dubbo.service.server.port=8086 4 | dubbo.application.name=dubbo_client2 5 | dubbo.service.max.thread.threads.size=100 6 | alibaba.intl.commons.dubbo.service.allow.no.provider=false 7 | dubbo.admin.root.password=root 8 | dubbo.admin.guest.password=root -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/spi/DoSearch.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.spi; 2 | 3 | import java.util.Iterator; 4 | import java.util.ServiceLoader; 5 | 6 | public class DoSearch { 7 | 8 | public static void main(String[] args) { 9 | ServiceLoader sl = ServiceLoader.load(Search.class); 10 | Iterator s = sl.iterator(); 11 | if (s.hasNext()) { 12 | Search ss = s.next(); 13 | ss.search(); 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/service/Provider.java: -------------------------------------------------------------------------------- 1 | package com.sw.dubbo.regist.service; 2 | 3 | 4 | import org.springframework.context.support.ClassPathXmlApplicationContext; 5 | 6 | public class Provider { 7 | 8 | public static void main(String[] args) throws Exception { 9 | ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( 10 | new String[] {"http://10.20.160.198/wiki/display/dubbo/provider.xml"}); 11 | context.start(); 12 | 13 | System.in.read(); // 按任意键退出 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/service/NotifyImpl.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.service; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import com.mallbiz.api.Notify; 7 | 8 | public class NotifyImpl implements Notify { 9 | public Map ret = new HashMap(); 10 | public Map errors = new HashMap(); 11 | public void onreturn(String msg, String id) { 12 | System.out.println("onreturn:" + msg); 13 | ret.put(id, msg); 14 | } 15 | public void onthrow(Throwable ex, String id) { 16 | System.out.println("onthrow:" + ex.getMessage()); 17 | errors.put(id, ex); 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/catcommon/CatContext.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.catcommon; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | import com.dianping.cat.Cat; 6 | 7 | /** 8 | * 实现CAT上下文,以用来传递messageTreeId 9 | * @author potato 10 | * @date 2016-6-8 11 | */ 12 | public class CatContext implements Cat.Context { 13 | 14 | private Map properties = new HashMap(); 15 | 16 | @Override 17 | public void addProperty(String key, String value) { 18 | properties.put(key, value); 19 | } 20 | 21 | @Override 22 | public String getProperty(String key) { 23 | return properties.get(key); 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "CatContext [properties=" + properties + "]"; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/com/mallbiz/service/UserSyncServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.service; 2 | 3 | import org.junit.Ignore; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.beans.factory.annotation.Configurable; 7 | import org.springframework.test.context.ActiveProfiles; 8 | import org.springframework.test.context.ContextConfiguration; 9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 10 | 11 | @Ignore 12 | @Configurable 13 | @RunWith(SpringJUnit4ClassRunner.class) 14 | @ContextConfiguration(locations = "classpath*:/META-INF/spring/applicationContext*.xml") 15 | @ActiveProfiles(profiles={"dev"}) 16 | public class UserSyncServiceTest { 17 | 18 | @Test 19 | public void testSyncBizUser2Mall() throws Exception { 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/catcommon/CatConstants.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.catcommon; 2 | 3 | public class CatConstants { 4 | public static final String CROSS_CONSUMER = "PigeonCall"; 5 | 6 | public static final String CROSS_SERVER = "PigeonService"; 7 | 8 | public static final String CONSUMER_CALL_SERVER = "PigeonCall.server"; 9 | 10 | public static final String CONSUMER_CALL_APP = "PigeonCall.app"; 11 | 12 | public static final String CONSUMER_CALL_PORT = "PigeonCall.port"; 13 | 14 | public static final String PROVIDER_SERVICE_CLIENT = "PigeonService.client"; 15 | 16 | public static final String PROVIDER_SERVICE_APP = "PigeonService.app"; 17 | 18 | public static final String CLIENT_APPLICATION_NAME = "ClientApplication.Name"; 19 | 20 | public static final String DUBBO_PROVIDER_APPLICATION_NAME = "serverApplicationName"; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/dubbofilter/AppNameAppendFilter.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.dubbofilter; 2 | 3 | import com.alibaba.dubbo.common.Constants; 4 | import com.alibaba.dubbo.common.extension.Activate; 5 | import com.alibaba.dubbo.rpc.Filter; 6 | import com.alibaba.dubbo.rpc.Invocation; 7 | import com.alibaba.dubbo.rpc.Invoker; 8 | import com.alibaba.dubbo.rpc.Result; 9 | import com.alibaba.dubbo.rpc.RpcContext; 10 | import com.alibaba.dubbo.rpc.RpcException; 11 | 12 | /** 13 | * 获取application-name 14 | * @author potato 15 | */ 16 | @Activate(group = {Constants.CONSUMER}) 17 | public class AppNameAppendFilter implements Filter { 18 | 19 | @Override 20 | public Result invoke(Invoker invoker, Invocation invocation) throws RpcException { 21 | RpcContext.getContext().setAttachment(Constants.APPLICATION_KEY, invoker.getUrl().getParameter(Constants.APPLICATION_KEY)); 22 | return invoker.invoke(invocation); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/service/RegistryServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import com.mallbiz.api.TestRegistryService; 6 | 7 | @Service("testRegistryServiceImpl") 8 | public class RegistryServiceImpl implements TestRegistryService { 9 | public String hello(String root,String parent,String child) { 10 | /* 11 | //服务端 12 | Transaction t = Cat.newTransaction("PigeonService", "cross-server-Transaction"); 13 | 14 | Cat.Context context2 = new CatContext(); 15 | 16 | context2.addProperty(Context.ROOT, root); 17 | context2.addProperty(Context.PARENT, parent); 18 | context2.addProperty(Context.CHILD, child); 19 | 20 | Event crossAppEvent = Cat.newEvent("PigeonService.app", "cat-dubbo-web"); 21 | Event crossServerEvent = Cat.newEvent("PigeonService.client", "127.0.0.1"); 22 | crossAppEvent.setStatus(Event.SUCCESS); 23 | crossServerEvent.setStatus(Event.SUCCESS); 24 | crossAppEvent.complete(); 25 | crossServerEvent.complete(); 26 | t.addChild(crossAppEvent); 27 | t.addChild(crossServerEvent); 28 | 29 | Cat.logRemoteCallServer(context2); 30 | System.err.println("logRemoteCallServer:"+context2); 31 | 32 | 33 | t.setStatus(Transaction.SUCCESS); 34 | t.complete(); 35 | 36 | */ 37 | 38 | return "hello return "; 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/webmvc-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/catcommon/CatInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.catcommon; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | import org.springframework.web.servlet.HandlerInterceptor; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | import com.dianping.cat.Cat; 10 | import com.dianping.cat.message.Message; 11 | import com.dianping.cat.message.Transaction; 12 | 13 | public class CatInterceptor implements HandlerInterceptor { 14 | 15 | private ThreadLocal tranLocal = new ThreadLocal(); 16 | private ThreadLocal pageLocal = new ThreadLocal(); 17 | 18 | @Override 19 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 20 | String uri = request.getRequestURI(); 21 | Transaction t = Cat.newTransaction("URL", uri); 22 | Cat.logEvent("URL.Method", request.getMethod(),Message.SUCCESS,request.getRequestURL().toString()); 23 | Cat.logEvent("URL.Host", request.getMethod(),Message.SUCCESS,request.getRemoteHost()); 24 | tranLocal.set(t); 25 | 26 | System.err.println("preHandle"); 27 | 28 | return true; 29 | } 30 | 31 | @Override 32 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 33 | 34 | String viewName = modelAndView != null?modelAndView.getViewName():"无"; 35 | Transaction t = Cat.newTransaction("View", viewName); 36 | pageLocal.set(t); 37 | 38 | System.err.println("postHandle"); 39 | } 40 | 41 | @Override 42 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 43 | //请求-页面渲染前 44 | Transaction pt = pageLocal.get(); 45 | pt.setStatus(Transaction.SUCCESS); 46 | pt.complete(); 47 | 48 | //总计 49 | Transaction t = tranLocal.get(); 50 | t.setStatus(Transaction.SUCCESS); 51 | t.complete(); 52 | 53 | System.err.println("afterCompletion"); 54 | 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/dubbofilter/registry/CatRegistryFactoryWrapper.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.dubbofilter.registry; 2 | 3 | import java.util.List; 4 | 5 | import com.alibaba.dubbo.common.Constants; 6 | import com.alibaba.dubbo.common.URL; 7 | import com.alibaba.dubbo.registry.NotifyListener; 8 | import com.alibaba.dubbo.registry.Registry; 9 | import com.alibaba.dubbo.registry.RegistryFactory; 10 | import com.mallbiz.catcommon.CatConstants; 11 | 12 | /** 13 | * 获取应用名称 14 | * @author potato 15 | */ 16 | public class CatRegistryFactoryWrapper implements RegistryFactory { 17 | 18 | private RegistryFactory registryFactory; 19 | 20 | public CatRegistryFactoryWrapper(RegistryFactory registryFactory) { 21 | this.registryFactory = registryFactory; 22 | } 23 | 24 | @Override 25 | public Registry getRegistry(URL url) { 26 | return new RegistryWrapper(registryFactory.getRegistry(url)); 27 | } 28 | 29 | class RegistryWrapper implements Registry { 30 | private Registry originRegistry; 31 | private URL appendProviderAppName(URL url){ 32 | String side = url.getParameter(Constants.SIDE_KEY); 33 | if(Constants.PROVIDER_SIDE.equals(side)){ 34 | url = url.addParameter(CatConstants.DUBBO_PROVIDER_APPLICATION_NAME, url.getParameter(Constants.APPLICATION_KEY)); 35 | } 36 | return url; 37 | } 38 | 39 | public RegistryWrapper(Registry originRegistry) { 40 | this.originRegistry = originRegistry; 41 | } 42 | 43 | @Override 44 | public URL getUrl() { 45 | return originRegistry.getUrl(); 46 | } 47 | 48 | @Override 49 | public boolean isAvailable() { 50 | return originRegistry.isAvailable(); 51 | } 52 | 53 | @Override 54 | public void destroy() { 55 | originRegistry.destroy(); 56 | } 57 | 58 | @Override 59 | public void register(URL url) { 60 | originRegistry.register(appendProviderAppName(url)); 61 | } 62 | 63 | @Override 64 | public void unregister(URL url) { 65 | originRegistry.unregister(appendProviderAppName(url)); 66 | } 67 | 68 | @Override 69 | public void subscribe(URL url, NotifyListener listener) { 70 | originRegistry.subscribe(url, listener); 71 | } 72 | 73 | @Override 74 | public void unsubscribe(URL url, NotifyListener listener) { 75 | originRegistry.unsubscribe(url, listener); 76 | } 77 | 78 | @Override 79 | public List lookup(URL url) { 80 | return originRegistry.lookup(appendProviderAppName(url)); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 点评cat-dubbo-demo 2 | 3 | 点评cat监控远程调用链与dubbo集成,可以通过点评CAT监控dubbo服务调用关系。 4 | 详细说明地址:http://songwie.com/articlelist/171 5 | 6 | 7 | 点评远程PigeonCall 原理为通过Cat.Context上下文,来传递客户端与服务端的调用关系。 8 | 如下: CatContext 是实现的Cat.Context 类, 然后客户端在调用Cat.logRemoteCallClient(completeEvent);方法的时候会自动生成客户端的 9 | root,parent,child3个调用id,然后自己发送到服务端 比如通过rpc调用上下文或者http方式,然后服务端获取到3个参数然后生成调用链。 10 | 11 | Cat.Context context2 = new CatContext(); 12 | 13 | context2.addProperty(Context.ROOT, root); 14 | context2.addProperty(Context.PARENT, parent); 15 | context2.addProperty(Context.CHILD, child); 16 | 17 | 注意客户端与服务端的PigeonCall.app,PigeonCall.server,PigeonCall.port,PigeonService.app等几个参数必须是这样写,负责无法在cross报表及 18 | dependen 报表看到数据。 19 | 20 | 21 | 22 | 客户端: 23 | Transaction t = Cat.newTransaction("PigeonCall", "cross-client-Transaction"); 24 | 25 | Cat.Context completeEvent = new CatContext(); 26 | 27 | Event crossAppEvent = Cat.newEvent("PigeonCall.app", "cat-dubbo-web"); 28 | Event crossServerEvent = Cat.newEvent("PigeonCall.server", "127.0.0.1"); 29 | Event crossPortEvent = Cat.newEvent("PigeonCall.port", "8081"); 30 | crossAppEvent.setStatus(Event.SUCCESS); 31 | crossServerEvent.setStatus(Event.SUCCESS); 32 | crossPortEvent.setStatus(Event.SUCCESS); 33 | crossPortEvent.complete(); 34 | crossServerEvent.complete(); 35 | crossPortEvent.complete(); 36 | t.addChild(crossAppEvent); 37 | t.addChild(crossPortEvent); 38 | t.addChild(crossServerEvent); 39 | 40 | Cat.logRemoteCallClient(completeEvent); 41 | System.err.println("logRemoteCallServer:"+completeEvent); 42 | 43 | String name = testRegistryService.hello(completeEvent.getProperty(Context.ROOT), 44 | completeEvent.getProperty(Context.PARENT), 45 | completeEvent.getProperty(Context.CHILD)); 46 | System.err.println(System.currentTimeMillis() + ","+ Thread.currentThread() + ","+ name); 47 | 48 | 49 | t.setStatus(Transaction.SUCCESS); 50 | t.complete(); 51 | 52 | 服务端: 53 | Transaction t = Cat.newTransaction("PigeonService", "cross-server-Transaction"); 54 | 55 | Cat.Context context2 = new CatContext(); 56 | 57 | context2.addProperty(Context.ROOT, root); 58 | context2.addProperty(Context.PARENT, parent); 59 | context2.addProperty(Context.CHILD, child); 60 | 61 | Event crossAppEvent = Cat.newEvent("PigeonService.app", "cat-dubbo-web"); 62 | Event crossServerEvent = Cat.newEvent("PigeonService.client", "127.0.0.1"); 63 | crossAppEvent.setStatus(Event.SUCCESS); 64 | crossServerEvent.setStatus(Event.SUCCESS); 65 | crossAppEvent.complete(); 66 | crossServerEvent.complete(); 67 | t.addChild(crossAppEvent); 68 | t.addChild(crossServerEvent); 69 | 70 | Cat.logRemoteCallServer(context2); 71 | System.err.println("logRemoteCallServer:"+context2); 72 | 73 | 74 | t.setStatus(Transaction.SUCCESS); 75 | t.complete(); 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /spy.log: -------------------------------------------------------------------------------- 1 | 1460092685558|-1||debug||com.p6spy.engine.common.P6SpyOptions reloading properties 2 | 2016-04-08|-1||info||Using properties file: E:\wirkproject_git\xuriMall-Biz\XuriMall-Biz\target\classes\spy.properties 3 | 2016-04-08|-1||info||No value in environment for: getStackTrace, using: false 4 | 2016-04-08|-1||info||No value in environment for: getAppender, using: com.p6spy.engine.logging.appender.StdoutLogger 5 | 2016-04-08|-1||info||No value in environment for: getFilter, using: true 6 | 2016-04-08|-1||info||No value in environment for: getDeregisterDrivers, using: true 7 | 2016-04-08|-1||info||No value in environment for: getSQLExpression, using: null 8 | 2016-04-08|-1||info||No value in environment for: getExcludecategories, using: error,info,resultset,batch 9 | 2016-04-08|-1||info||No value in environment for: getJNDIContextFactory, using: null 10 | 2016-04-08|-1||info||No value in environment for: getJNDIContextProviderURL, using: null 11 | 2016-04-08|-1||info||No value in environment for: getStringmatcher, using: com.p6spy.engine.common.SubstringMatcher 12 | 2016-04-08|-1||info||No value in environment for: getReloadProperties, using: false 13 | 2016-04-08|-1||info||No value in environment for: getJNDIContextCustom, using: null 14 | 2016-04-08|-1||info||No value in environment for: getRealDataSource, using: null 15 | 2016-04-08|-1||info||No value in environment for: getDateformatter, using: java.text.SimpleDateFormat@f67a0200 16 | 2016-04-08|-1||info||No value in environment for: getRealDataSourceClass, using: null 17 | 2016-04-08|-1||info||No value in environment for: getReloadPropertiesInterval, using: 60 18 | 2016-04-08|-1||info||No value in environment for: getExecutionThreshold, using: 0 19 | 2016-04-08|-1||info||No value in environment for: getRealdriver3, using: null 20 | 2016-04-08|-1||info||No value in environment for: getStackTraceClass, using: 21 | 2016-04-08|-1||info||No value in environment for: getRealdriver2, using: null 22 | 2016-04-08|-1||info||No value in environment for: getIncludecategories, using: statement, commit, rollback 23 | 2016-04-08|-1||info||No value in environment for: getStringMatcherEngine, using: com.p6spy.engine.common.SubstringMatcher@20f2e4b5 24 | 2016-04-08|-1||info||No value in environment for: getRealDataSourceProperties, using: null 25 | 2016-04-08|-1||info||No value in environment for: getAppend, using: true 26 | 2016-04-08|-1||info||No value in environment for: getAutoflush, using: true 27 | 2016-04-08|-1||info||No value in environment for: getUsePrefix, using: false 28 | 2016-04-08|-1||info||No value in environment for: getRealdriver, using: com.mysql.jdbc.Driver 29 | 2016-04-08|-1||info||No value in environment for: getInclude, using: 30 | 2016-04-08|-1||info||No value in environment for: getLogfile, using: 31 | 2016-04-08|-1||info||No value in environment for: getExclude, using: 32 | 2016-04-08|-1||info||No value in environment for: getDateformat, using: yyyy-MM-dd 33 | 2016-04-08|-1||info||No value in environment for: getSpydriver, using: com.p6spy.engine.spy.P6SpyDriver 34 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cat-dubbo-web 4 | cat-web application 5 | 6 | spring.profiles.default 7 | dev 8 | 9 | 10 | spring.profiles.active 11 | dev 12 | 13 | 14 | defaultHtmlEscape 15 | true 16 | 17 | 18 | contextConfigLocation 19 | classpath*:META-INF/spring/applicationContext*.xml 20 | 21 | 22 | CharacterEncodingFilter 23 | org.springframework.web.filter.CharacterEncodingFilter 24 | 25 | encoding 26 | UTF-8 27 | 28 | 29 | forceEncoding 30 | true 31 | 32 | 33 | 34 | HttpMethodFilter 35 | org.springframework.web.filter.HiddenHttpMethodFilter 36 | 37 | 38 | CharacterEncodingFilter 39 | /* 40 | 41 | 42 | HttpMethodFilter 43 | /* 44 | 45 | 46 | org.springframework.web.context.ContextLoaderListener 47 | 48 | 49 | cat-filter 50 | com.dianping.cat.servlet.CatFilter 51 | 52 | 53 | cat-filter 54 | /* 55 | REQUEST 56 | FORWARD 57 | 58 | 59 | cat-web 60 | org.springframework.web.servlet.DispatcherServlet 61 | 62 | contextConfigLocation 63 | WEB-INF/spring/webmvc-config.xml 64 | 65 | 1 66 | 67 | 68 | cat-web 69 | / 70 | 71 | 72 | 10 73 | 74 | 75 | java.lang.Exception 76 | /uncaughtException 77 | 78 | 79 | 404 80 | /resourceNotFound 81 | 82 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/spring/webmvc-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | dataAccessFailure 54 | resourceNotFound 55 | resourceNotFound 56 | resourceNotFound 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/controller/CatDubboTest.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.controller; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.test.context.ContextConfiguration; 7 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 8 | 9 | import com.alibaba.dubbo.config.ProtocolConfig; 10 | import com.mallbiz.api.TestRegistryService; 11 | 12 | 13 | @RunWith(SpringJUnit4ClassRunner.class) 14 | @ContextConfiguration(locations = "classpath*:/META-INF/spring/applicationContext*.xml") 15 | public class CatDubboTest { 16 | 17 | @Autowired 18 | private TestRegistryService testRegistryService; 19 | 20 | //@Autowired 21 | //private NotifyImpl notify; 22 | 23 | @Test 24 | public void indexServer() throws Exception{ 25 | Thread.currentThread().sleep(10000000); 26 | ProtocolConfig.destroyAll(); 27 | } 28 | 29 | @SuppressWarnings("static-access") 30 | @Test 31 | public void testCat() throws Exception{ 32 | /*//客户端 33 | Transaction t = Cat.newTransaction("PigeonCall", "cross-client-Transaction"); 34 | 35 | Cat.Context completeEvent = new CatContext(); 36 | 37 | Event crossAppEvent = Cat.newEvent("PigeonCall.app", "cat-dubbo-web"); 38 | Event crossServerEvent = Cat.newEvent("PigeonCall.server", "127.0.0.1"); 39 | Event crossPortEvent = Cat.newEvent("PigeonCall.port", "8081"); 40 | crossAppEvent.setStatus(Event.SUCCESS); 41 | crossServerEvent.setStatus(Event.SUCCESS); 42 | crossPortEvent.setStatus(Event.SUCCESS); 43 | crossPortEvent.complete(); 44 | crossServerEvent.complete(); 45 | crossPortEvent.complete(); 46 | t.addChild(crossAppEvent); 47 | t.addChild(crossPortEvent); 48 | t.addChild(crossServerEvent); 49 | 50 | Cat.logRemoteCallClient(completeEvent); 51 | System.err.println("logRemoteCallServer:"+completeEvent); 52 | 53 | String name = testRegistryService.hello(completeEvent.getProperty(Context.ROOT), 54 | completeEvent.getProperty(Context.PARENT), 55 | completeEvent.getProperty(Context.CHILD)); 56 | System.err.println(System.currentTimeMillis() + ","+ Thread.currentThread() + ","+ name); 57 | 58 | 59 | t.setStatus(Transaction.SUCCESS); 60 | t.complete(); 61 | */ 62 | 63 | String name = testRegistryService.hello("1","1","2"); 64 | System.err.println(System.currentTimeMillis() + ","+ Thread.currentThread() + ","+ name); 65 | 66 | Thread.currentThread().sleep(10000000); 67 | } 68 | 69 | @Test 70 | public void index() throws Exception{ 71 | String requestKey = "1mogo"; 72 | String name = testRegistryService.hello("1","1","1"); 73 | System.err.println(System.currentTimeMillis() 74 | + ","+ Thread.currentThread() + ","+ name); 75 | /* 76 | Future pFuture = RpcContext.getContext().getFuture(); 77 | 78 | String p = pFuture.get(); 79 | System.err.println(System.currentTimeMillis() 80 | + ","+ Thread.currentThread() + ","+ p);*/ 81 | 82 | 83 | Thread.currentThread().sleep(100000); 84 | 85 | ProtocolConfig.destroyAll(); 86 | 87 | /*while (true) { 88 | if (!notify.ret.containsKey(requestKey)) { 89 | Thread.sleep(200); 90 | } else { 91 | System.err.println(notify.ret.get(requestKey)); 92 | break; 93 | } 94 | 95 | }*/ 96 | /*final AtomicInteger count = new AtomicInteger(1); 97 | final long starttime = System.currentTimeMillis(); 98 | final int threadCount = 8; 99 | for(int i=0;i 800? "800px": "auto" ); 27 | 28 | overflow:hidden; 29 | display:block; 30 | } 31 | 32 | /* header and footer elements */ 33 | 34 | #main { 35 | overflow:hidden; 36 | display:box; 37 | } 38 | 39 | #menu { 40 | background: #eee; 41 | position:relative; 42 | float:right; 43 | left:0px; 44 | width:220px; 45 | margin-left:15px; 46 | } 47 | 48 | #menu ul{ 49 | list-style: none; 50 | margin: 0; 51 | padding: 0; 52 | } 53 | 54 | #menu ul li{ 55 | padding: 0px; 56 | } 57 | 58 | 59 | #menu a, #menu h2 { 60 | display: block; 61 | margin: 0; 62 | padding: 2px 6px; 63 | color:#FFFFFF; 64 | } 65 | 66 | #menu h2 { 67 | color: #fff; 68 | background: #648C1D; 69 | text-transform: uppercase; 70 | font-weight:bold; 71 | font-size: 12px; 72 | } 73 | 74 | #menu a { 75 | color: #666666; 76 | background: #efefef; 77 | text-decoration: none; 78 | padding: 2px 12px; 79 | } 80 | 81 | #menu a:hover { 82 | color: #648C1D; 83 | background: #fff; 84 | } 85 | 86 | #footer { 87 | background:#fff; 88 | border:none; 89 | margin-top:15px; 90 | border-top:1px solid #999999; 91 | } 92 | 93 | #footer .new { 94 | float:left; 95 | } 96 | 97 | #footer a:link {color: #7db223;} 98 | 99 | .quicklinks { 100 | clear:both; 101 | padding-bottom: 15px 102 | } 103 | .quicklinks span { 104 | float: right; 105 | } 106 | 107 | label { 108 | width:100px; 109 | float:left; 110 | margin-left: 5px; 111 | margin-top: 0px; 112 | } 113 | 114 | input { 115 | height:20px; 116 | } 117 | 118 | input, textarea, select { 119 | border:1px solid #B3B3B3; 120 | } 121 | 122 | input.image { 123 | border: none; 124 | height: auto; 125 | vertical-align: middle; 126 | } 127 | 128 | submit { 129 | height:25px; 130 | } 131 | 132 | div { 133 | text-align: left; 134 | } 135 | 136 | div .box { 137 | display:block; 138 | margin-left:105px; 139 | } 140 | 141 | /* menu elements*/ 142 | 143 | a.menu, a.menu:link, a.menu:visited {display:block; width:150px; height:25px;} 144 | 145 | /* text styles */ 146 | 147 | h1,h2,h3 { 148 | font-family: Helvetica, sans-serif; 149 | color: #7db223; 150 | } 151 | 152 | h1 { 153 | font-size: 20px; 154 | line-height: 26px; 155 | } 156 | 157 | h2 { 158 | font-size: 18px; 159 | line-height: 20px; 160 | } 161 | 162 | h3 { 163 | font-size: 15px; 164 | line-height: 21px; 165 | color:#555; 166 | } 167 | 168 | h4 { 169 | font-size: 14px; 170 | line-height: 20px; 171 | } 172 | 173 | .errors { 174 | color: red; 175 | font-weight: bold; 176 | display: block; 177 | margin-left: 105px; 178 | } 179 | 180 | a { 181 | text-decoration: underline; 182 | font-size: 12px; 183 | } 184 | 185 | a img { 186 | border: 0 none; 187 | vertical-align: middle; 188 | } 189 | 190 | tr:nth-child(odd) { 191 | background-color: #FFFFFF; 192 | } 193 | 194 | tr:nth-child(even) { 195 | background-color: #EFEFEF; 196 | } 197 | 198 | a:link { 199 | color: #7db223; 200 | } 201 | 202 | a:hover { 203 | color: #456314; 204 | } 205 | 206 | a:active { 207 | color: #7db223; 208 | } 209 | 210 | a:visited { 211 | color: #7db223; 212 | } 213 | 214 | li { 215 | padding-top: 5px; 216 | text-align: left; 217 | } 218 | 219 | ul li { 220 | margin:0 0 0.25em 0; 221 | padding:0; 222 | } 223 | /* table elements */ 224 | 225 | table { 226 | background: #EEEEEE; 227 | margin: 2px 0 0 0; 228 | border: 1px solid #BBBBBB; 229 | border-collapse: collapse; 230 | width: 100% 231 | } 232 | 233 | table table { 234 | margin: -5px 0; 235 | border: 0px solid #e0e7d3; 236 | width: 100%; 237 | } 238 | 239 | table td,table th { 240 | padding: 2px; 241 | border: 1px solid #CCCCCC; 242 | } 243 | 244 | table td form { 245 | text-align:center; 246 | vertical-align: middle; 247 | margin: 0px; 248 | } 249 | 250 | table th { 251 | font-size: 0.9em; 252 | text-align: left; 253 | font-weight: bold; 254 | color: #FFF; 255 | background: #999; 256 | } 257 | 258 | table thead { 259 | font-weight: bold; 260 | font-style: italic; 261 | background-color: #BBBBBB; 262 | } 263 | 264 | table a:link {color: #303030;} 265 | 266 | .utilbox {width: 18px;} 267 | 268 | caption { 269 | caption-side: top; 270 | width: auto; 271 | text-align: left; 272 | font-size: 12px; 273 | color: #848f73; 274 | padding-bottom: 4px; 275 | } 276 | 277 | fieldset { 278 | background: #e0e7d3; 279 | padding: 8px; 280 | padding-bottom: 22px; 281 | border: none; 282 | width: 560px; 283 | } 284 | 285 | fieldset label { 286 | width: 70px; 287 | float: left; 288 | margin-top: 1.7em; 289 | margin-left: 20px; 290 | } 291 | 292 | fieldset textfield { 293 | margin: 3px; 294 | height: 20px; 295 | background: #e0e7d3; 296 | } 297 | 298 | fieldset textarea { 299 | margin: 3px; 300 | height: 165px; 301 | background: #e0e7d3; 302 | } 303 | 304 | fieldset input { 305 | margin: 3px; 306 | height: 20px; 307 | background: #e0e7d3; 308 | } 309 | 310 | fieldset table { 311 | width: 100%; 312 | } 313 | 314 | fieldset th { 315 | padding-left: 25px; 316 | } 317 | 318 | .table-buttons { 319 | background-color:#fff; 320 | border:none; 321 | } 322 | 323 | .table-buttons td { 324 | border:none; 325 | } 326 | 327 | .submit input { 328 | border: 1px solid #BBBBBB; 329 | color:#777777; 330 | padding:2px 7px; 331 | font-size:11px; 332 | text-transform:uppercase; 333 | font-weight:bold; 334 | height:24px; 335 | } 336 | 337 | .updated { 338 | background:#ecf1e5; 339 | font-size:11px; 340 | margin-left:2px; 341 | border:4px solid #ecf1e5; 342 | } 343 | 344 | .updated td { 345 | padding:2px 8px; 346 | font-size:11px; 347 | color:#888888; 348 | } 349 | 350 | .dijitArrowButton { 351 | height: 20px; 352 | } 353 | 354 | .dijitTextArea{ 355 | min-height:5.5em !important; 356 | max-height:22em !important; 357 | overflow-y: auto !important; 358 | max-width: 175px; 359 | } 360 | 361 | .RichTextEditable{ 362 | min-height:18em !important; 363 | max-height:18em !important; 364 | } 365 | 366 | .flag { 367 | height: 11px; 368 | width: 16px; 369 | } -------------------------------------------------------------------------------- /src/main/webapp/styles/standard.css: -------------------------------------------------------------------------------- 1 | /* main elements */ 2 | 3 | body,div,td { 4 | font-family: Arial, Helvetica, sans-serif; 5 | font-size: 12px; 6 | color: #666; 7 | } 8 | 9 | body { 10 | background-color: #fff; 11 | text-align: center; 12 | } 13 | 14 | #header { 15 | margin-bottom: 1em; 16 | } 17 | 18 | #wrapper { 19 | width:800px; 20 | min-width: 800px; 21 | max-width: 800px; 22 | margin-right: auto; 23 | margin-left: auto; 24 | 25 | /* fix max-width incompatibility in IE6 */ 26 | width:expression(document.body.clientWidth > 800? "800px": "auto" ); 27 | 28 | overflow:hidden; 29 | display:block; 30 | } 31 | 32 | /* header and footer elements */ 33 | 34 | #main { 35 | overflow:hidden; 36 | display:box; 37 | } 38 | 39 | #menu { 40 | background: #eee; 41 | position:relative; 42 | float:left; 43 | left:0px; 44 | width:220px; 45 | margin-right:15px; 46 | } 47 | 48 | #menu ul{ 49 | list-style: none; 50 | margin: 0; 51 | padding: 0; 52 | } 53 | 54 | #menu ul li{ 55 | padding: 0px; 56 | } 57 | 58 | 59 | #menu a, #menu h2 { 60 | display: block; 61 | margin: 0; 62 | padding: 2px 6px; 63 | color:#FFFFFF; 64 | } 65 | 66 | #menu h2 { 67 | color: #fff; 68 | background: #648C1D; 69 | text-transform: uppercase; 70 | font-weight:bold; 71 | font-size: 12px; 72 | } 73 | 74 | #menu a { 75 | color: #666666; 76 | background: #efefef; 77 | text-decoration: none; 78 | padding: 2px 12px; 79 | } 80 | 81 | #menu a:hover { 82 | color: #648C1D; 83 | background: #fff; 84 | } 85 | 86 | #footer { 87 | background:#fff; 88 | border:none; 89 | margin-top:15px; 90 | border-top:1px solid #999999; 91 | } 92 | 93 | #footer .new { 94 | float:left; 95 | } 96 | 97 | #footer a:link {color: #7db223;} 98 | 99 | .quicklinks { 100 | clear:both; 101 | padding-bottom: 15px 102 | } 103 | .quicklinks span { 104 | float: right; 105 | } 106 | 107 | table.navigation { 108 | border: 0px; 109 | } 110 | 111 | label { 112 | width:100px; 113 | float:left; 114 | margin-left: 5px; 115 | margin-top: 0px; 116 | } 117 | 118 | input { 119 | height:20px; 120 | } 121 | 122 | input, textarea, select { 123 | border:1px solid #B3B3B3; 124 | } 125 | 126 | input.image { 127 | border: none; 128 | height: auto; 129 | vertical-align: middle; 130 | } 131 | 132 | submit { 133 | height:25px; 134 | } 135 | 136 | div { 137 | text-align: left; 138 | } 139 | 140 | div .box { 141 | display:block; 142 | margin-left:105px; 143 | } 144 | 145 | /* menu elements*/ 146 | 147 | a.menu, a.menu:link, a.menu:visited {display:block; width:150px; height:25px;} 148 | 149 | /* text styles */ 150 | 151 | h1,h2,h3 { 152 | font-family: Helvetica, sans-serif; 153 | color: #7db223; 154 | } 155 | 156 | h1 { 157 | font-size: 20px; 158 | line-height: 26px; 159 | } 160 | 161 | h2 { 162 | font-size: 18px; 163 | line-height: 20px; 164 | } 165 | 166 | h3 { 167 | font-size: 15px; 168 | line-height: 21px; 169 | color:#555; 170 | } 171 | 172 | h4 { 173 | font-size: 14px; 174 | line-height: 20px; 175 | } 176 | 177 | .errors { 178 | color: red; 179 | font-weight: bold; 180 | display: block; 181 | margin-left: 105px; 182 | } 183 | 184 | a { 185 | text-decoration: underline; 186 | font-size: 12px; 187 | } 188 | 189 | a img { 190 | border: 0 none; 191 | vertical-align: middle; 192 | } 193 | 194 | tr:nth-child(odd) { 195 | background-color: #FFFFFF; 196 | } 197 | 198 | tr:nth-child(even) { 199 | background-color: #EFEFEF; 200 | } 201 | 202 | a:link { 203 | color: #7db223; 204 | } 205 | 206 | a:hover { 207 | color: #456314; 208 | } 209 | 210 | a:active { 211 | color: #7db223; 212 | } 213 | 214 | a:visited { 215 | color: #7db223; 216 | } 217 | 218 | li { 219 | padding-top: 5px; 220 | text-align: left; 221 | } 222 | 223 | ul li { 224 | margin:0 0 0.25em 0; 225 | padding:0; 226 | } 227 | /* table elements */ 228 | 229 | table { 230 | background: #EEEEEE; 231 | margin: 2px 0 0 0; 232 | border: 1px solid #BBBBBB; 233 | border-collapse: collapse; 234 | width: 100% 235 | } 236 | 237 | table table { 238 | margin: -5px 0; 239 | border: 0px solid #e0e7d3; 240 | width: 100%; 241 | } 242 | 243 | table td,table th { 244 | padding: 2px; 245 | border: 1px solid #CCCCCC; 246 | } 247 | 248 | table td form { 249 | text-align:center; 250 | vertical-align: middle; 251 | margin: 0px; 252 | } 253 | 254 | table th { 255 | font-size: 0.9em; 256 | text-align: left; 257 | font-weight: bold; 258 | color: #FFF; 259 | background: #999; 260 | } 261 | 262 | table thead { 263 | font-weight: bold; 264 | font-style: italic; 265 | background-color: #BBBBBB; 266 | } 267 | 268 | table a:link {color: #303030;} 269 | 270 | .utilbox {width: 18px;} 271 | 272 | caption { 273 | caption-side: top; 274 | width: auto; 275 | text-align: left; 276 | font-size: 12px; 277 | color: #848f73; 278 | padding-bottom: 4px; 279 | } 280 | 281 | fieldset { 282 | background: #e0e7d3; 283 | padding: 8px; 284 | padding-bottom: 22px; 285 | border: none; 286 | width: 560px; 287 | } 288 | 289 | fieldset label { 290 | width: 70px; 291 | float: left; 292 | margin-top: 1.7em; 293 | margin-left: 20px; 294 | } 295 | 296 | fieldset textfield { 297 | margin: 3px; 298 | height: 20px; 299 | background: #e0e7d3; 300 | } 301 | 302 | fieldset textarea { 303 | margin: 3px; 304 | height: 165px; 305 | background: #e0e7d3; 306 | } 307 | 308 | fieldset input { 309 | margin: 3px; 310 | height: 20px; 311 | background: #e0e7d3; 312 | } 313 | 314 | fieldset table { 315 | width: 100%; 316 | } 317 | 318 | fieldset th { 319 | padding-left: 25px; 320 | } 321 | 322 | .table-buttons { 323 | background-color:#fff; 324 | border:none; 325 | } 326 | 327 | .table-buttons td { 328 | border:none; 329 | } 330 | 331 | .submit input { 332 | border: 1px solid #BBBBBB; 333 | color:#777777; 334 | padding:2px 7px; 335 | font-size:11px; 336 | text-transform:uppercase; 337 | font-weight:bold; 338 | height:24px; 339 | } 340 | 341 | .updated { 342 | background:#ecf1e5; 343 | font-size:11px; 344 | margin-left:2px; 345 | border:4px solid #ecf1e5; 346 | } 347 | 348 | .updated td { 349 | padding:2px 8px; 350 | font-size:11px; 351 | color:#888888; 352 | } 353 | 354 | .dijitArrowButton { 355 | height: 20px; 356 | } 357 | 358 | .dijitTextArea{ 359 | min-height:5.5em !important; 360 | max-height:22em !important; 361 | overflow-y: auto !important; 362 | max-width: 175px; 363 | } 364 | 365 | .RichTextEditable{ 366 | min-height:18em !important; 367 | max-height:18em !important; 368 | } 369 | 370 | .flag { 371 | height: 11px; 372 | width: 16px; 373 | } -------------------------------------------------------------------------------- /src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | ################################################################# 2 | # P6Spy Options File # 3 | # See documentation for detailed instructions # 4 | ################################################################# 5 | 6 | ################################################################# 7 | # MODULES # 8 | # # 9 | # Modules provide the P6Spy functionality. If a module, such # 10 | # as module_log is commented out, that functionality will not # 11 | # be available. If it is not commented out (if it is active), # 12 | # the functionality will be active. # 13 | # # 14 | # Values set in Modules cannot be reloaded using the # 15 | # reloadproperties variable. Once they are loaded, they remain # 16 | # in memory until the application is restarted. # 17 | # # 18 | ################################################################# 19 | 20 | module.log=com.p6spy.engine.logging.P6LogFactory 21 | #module.outage=com.p6spy.engine.outage.P6OutageFactory 22 | 23 | ################################################################# 24 | # REALDRIVER(s) # 25 | # # 26 | # In your application server configuration file you replace the # 27 | # "real driver" name with com.p6spy.engine.P6SpyDriver. This is # 28 | # where you put the name of your real driver P6Spy can find and # 29 | # register your real driver to do the database work. # 30 | # # 31 | # If your application uses several drivers specify them in # 32 | # realdriver2, realdriver3. See the documentation for more # 33 | # details. # 34 | # # 35 | # Values set in REALDRIVER(s) cannot be reloaded using the # 36 | # reloadproperties variable. Once they are loaded, they remain # 37 | # in memory until the application is restarted. # 38 | # # 39 | ################################################################# 40 | #realdriver=com.microsoft.jdbc.sqlserver.SQLServerDriver 41 | 42 | realdriver=com.mysql.jdbc.Driver 43 | 44 | 45 | #the DriverManager class sequentially tries every driver that is 46 | #registered to find the right driver. In some instances, it's possible to 47 | #load up the realdriver before the p6spy driver, in which case your connections 48 | #will not get wrapped as the realdriver will "steal" the connection before 49 | #p6spy sees it. Set the following property to "true" to cause p6spy to 50 | #explicitily deregister the realdrivers 51 | deregisterdrivers=true 52 | 53 | ################################################################ 54 | # P6LOG SPECIFIC PROPERTIES # 55 | ################################################################ 56 | # no properties currently available 57 | 58 | ################################################################ 59 | # EXECUTION THRESHOLD PROPERTIES # 60 | ################################################################ 61 | # This feature applies to the standard logging of P6Spy. # 62 | # While the standard logging logs out every statement # 63 | # regardless of its execution time, this feature puts a time # 64 | # condition on that logging. Only statements that have taken # 65 | # longer than the time specified (in milliseconds) will be # 66 | # logged. This way it is possible to see only statements that # 67 | # have exceeded some high water mark. # 68 | # This time is reloadable. # 69 | # 70 | # executionthreshold=integer time (milliseconds) 71 | # 72 | executionthreshold= 73 | 74 | ################################################################ 75 | # P6OUTAGE SPECIFIC PROPERTIES # 76 | ################################################################ 77 | # Outage Detection 78 | # 79 | # This feature detects long-running statements that may be indicative of 80 | # a database outage problem. If this feature is turned on, it will log any 81 | # statement that surpasses the configurable time boundary during its execution. 82 | # When this feature is enabled, no other statements are logged except the long 83 | # running statements. The interval property is the boundary time set in seconds. 84 | # For example, if this is set to 2, then any statement requiring at least 2 85 | # seconds will be logged. Note that the same statement will continue to be logged 86 | # for as long as it executes. So if the interval is set to 2, and the query takes 87 | # 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals). 88 | # 89 | # outagedetection=true|false 90 | # outagedetectioninterval=integer time (seconds) 91 | # 92 | outagedetection=false 93 | outagedetectioninterval= 94 | 95 | ################################################################ 96 | # COMMON PROPERTIES # 97 | ################################################################ 98 | 99 | # filter what is logged 100 | filter=true 101 | 102 | # comma separated list of tables to include when filtering 103 | include = 104 | # comma separated list of tables to exclude when filtering 105 | exclude = 106 | 107 | # sql expression to evaluate if using regex filtering 108 | sqlexpression = 109 | 110 | 111 | # turn on tracing 112 | autoflush = true 113 | 114 | # sets the date format using Java's SimpleDateFormat routine 115 | dateformat=yyyy-MM-dd 116 | 117 | #list of categories to explicitly include 118 | includecategories=statement, commit, rollback 119 | 120 | #list of categories to exclude: error, info, batch, debug, statement, 121 | #commit, rollback and result are valid values 122 | excludecategories=error,info,resultset,batch 123 | 124 | 125 | #allows you to use a regex engine or your own matching engine to determine 126 | #which statements to log 127 | # 128 | #stringmatcher=com.p6spy.engine.common.GnuRegexMatcher 129 | #stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher 130 | stringmatcher= 131 | 132 | # prints a stack trace for every statement logged 133 | stacktrace=false 134 | # if stacktrace=true, specifies the stack trace to print 135 | stacktraceclass= 136 | 137 | # determines if property file should be reloaded 138 | reloadproperties=false 139 | # determines how often should be reloaded in seconds 140 | reloadpropertiesinterval=60 141 | 142 | #if=true then url must be prefixed with p6spy: 143 | useprefix=false 144 | 145 | #specifies the appender to use for logging 146 | #appender=com.p6spy.engine.logging.appender.Log4jLogger 147 | appender=com.p6spy.engine.logging.appender.StdoutLogger 148 | #appender=com.p6spy.engine.logging.appender.FileLogger 149 | 150 | # name of logfile to use, note Windows users should make sure to use forward slashes in their pathname (e:/test/spy.log) (used for file logger only) 151 | logfile = 152 | 153 | # append to the p6spy log file. if this is set to false the 154 | # log file is truncated every time. (file logger only) 155 | append=true 156 | 157 | -------------------------------------------------------------------------------- /src/main/java/com/mallbiz/dubbofilter/DubboCatFilter.java: -------------------------------------------------------------------------------- 1 | package com.mallbiz.dubbofilter; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import com.alibaba.dubbo.common.Constants; 7 | import com.alibaba.dubbo.common.URL; 8 | import com.alibaba.dubbo.common.extension.Activate; 9 | import com.alibaba.dubbo.common.utils.StringUtils; 10 | import com.alibaba.dubbo.remoting.RemotingException; 11 | import com.alibaba.dubbo.remoting.TimeoutException; 12 | import com.alibaba.dubbo.rpc.Filter; 13 | import com.alibaba.dubbo.rpc.Invocation; 14 | import com.alibaba.dubbo.rpc.Invoker; 15 | import com.alibaba.dubbo.rpc.Result; 16 | import com.alibaba.dubbo.rpc.RpcContext; 17 | import com.alibaba.dubbo.rpc.RpcException; 18 | import com.dianping.cat.Cat; 19 | import com.dianping.cat.message.Event; 20 | import com.dianping.cat.message.Message; 21 | import com.dianping.cat.message.Transaction; 22 | import com.dianping.cat.message.internal.AbstractMessage; 23 | 24 | /** 25 | * 消息树串联:dubbo-rpc服务调用 26 | * @author potato 27 | * 28 | */ 29 | @Activate(group = {Constants.PROVIDER, Constants.CONSUMER}, order = -9000) 30 | public class DubboCatFilter implements Filter { 31 | 32 | private static final ThreadLocal CAT_CONTEXT = new ThreadLocal(); 33 | 34 | @Override 35 | public Result invoke(Invoker invoker, Invocation invocation) throws RpcException { 36 | System.err.println("invoke"); 37 | 38 | URL url = invoker.getUrl(); 39 | String sideKey = url.getParameter(Constants.SIDE_KEY); 40 | String loggerName = invoker.getInterface().getSimpleName() + "." + invocation.getMethodName(); 41 | String type = "PigeonCall"; 42 | if (Constants.PROVIDER_SIDE.equals(sideKey)) { 43 | type = "PigeonService"; 44 | } 45 | Transaction t = Cat.newTransaction(type, loggerName); 46 | Result result = null; 47 | try { 48 | Cat.Context context = getContext(); 49 | if (Constants.CONSUMER_SIDE.equals(sideKey)) { 50 | createConsumerCross(url, t); 51 | Cat.logRemoteCallClient(context); 52 | } else { 53 | createProviderCross(url, t); 54 | Cat.logRemoteCallServer(context); 55 | } 56 | setAttachment(context); 57 | result = invoker.invoke(invocation); 58 | 59 | if (result.hasException()) { 60 | //给调用接口出现异常进行打点 61 | Throwable throwable = result.getException(); 62 | Event event = null; 63 | if (RpcException.class == throwable.getClass()) { 64 | Throwable caseBy = throwable.getCause(); 65 | if (caseBy != null && caseBy.getClass() == TimeoutException.class) { 66 | event = Cat.newEvent("DUBBO_TIMEOUT_ERROR", loggerName); 67 | } else { 68 | event = Cat.newEvent("DUBBO_REMOTING_ERROR", loggerName); 69 | } 70 | } else if (RemotingException.class.isAssignableFrom(throwable.getClass())) { 71 | event = Cat.newEvent("DUBBO_REMOTING_ERROR", loggerName); 72 | }else{ 73 | event = Cat.newEvent("DUBBO_BIZ_ERROR", loggerName); 74 | } 75 | event.setStatus(result.getException()); 76 | completeEvent(event); 77 | t.addChild(event); 78 | t.setStatus(result.getException().getClass().getSimpleName()); 79 | } else { 80 | t.setStatus(Message.SUCCESS); 81 | } 82 | return result; 83 | } catch (RuntimeException e) { 84 | Event event = null; 85 | if (RpcException.class == e.getClass()) { 86 | Throwable caseBy = e.getCause(); 87 | if (caseBy !=null && caseBy.getClass() == TimeoutException.class) { 88 | event = Cat.newEvent("DUBBO_TIMEOUT_ERROR", loggerName); 89 | } else { 90 | event = Cat.newEvent("DUBBO_REMOTING_ERROR", loggerName); 91 | } 92 | } else { 93 | event = Cat.newEvent("DUBBO_BIZ_ERROR", loggerName); 94 | } 95 | event.setStatus(e); 96 | completeEvent(event); 97 | t.addChild(event); 98 | t.setStatus(e.getClass().getSimpleName()); 99 | if (result == null) { 100 | throw e; 101 | } else { 102 | return result; 103 | } 104 | } finally { 105 | t.complete(); 106 | CAT_CONTEXT.remove(); 107 | } 108 | } 109 | 110 | static class DubboCatContext implements Cat.Context { 111 | private Map properties = new HashMap(); 112 | 113 | @Override 114 | public void addProperty(String key, String value) { 115 | properties.put(key,value); 116 | } 117 | 118 | @Override 119 | public String getProperty(String key) { 120 | return properties.get(key); 121 | } 122 | } 123 | 124 | private void setAttachment(Cat.Context context) { 125 | RpcContext.getContext().setAttachment(Cat.Context.ROOT,context.getProperty(Cat.Context.ROOT)); 126 | RpcContext.getContext().setAttachment(Cat.Context.CHILD,context.getProperty(Cat.Context.CHILD)); 127 | RpcContext.getContext().setAttachment(Cat.Context.PARENT,context.getProperty(Cat.Context.PARENT)); 128 | } 129 | 130 | private Cat.Context getContext(){ 131 | Cat.Context context = CAT_CONTEXT.get(); 132 | if (context==null) { 133 | context = initContext(); 134 | CAT_CONTEXT.set(context); 135 | } 136 | return context; 137 | } 138 | 139 | private Cat.Context initContext() { 140 | Cat.Context context = new DubboCatContext(); 141 | Map attachments = RpcContext.getContext().getAttachments(); 142 | if (attachments!=null&&attachments.size()>0) { 143 | for (Map.Entry entry:attachments.entrySet()) { 144 | if (Cat.Context.CHILD.equals(entry.getKey()) || Cat.Context.ROOT.equals(entry.getKey()) || Cat.Context.PARENT.equals(entry.getKey())) { 145 | context.addProperty(entry.getKey(),entry.getValue()); 146 | } 147 | } 148 | } 149 | return context; 150 | } 151 | 152 | private void createConsumerCross(URL url, Transaction t) { 153 | Event crossAppEvent = Cat.newEvent("PigeonCall.app", getProviderAppName(url)); 154 | Event crossServerEvent = Cat.newEvent("PigeonCall.server", url.getHost()); 155 | Event crossPortEvent = Cat.newEvent("PigeonCall.port", url.getPort() + ""); 156 | crossAppEvent.setStatus(Event.SUCCESS); 157 | crossServerEvent.setStatus(Event.SUCCESS); 158 | crossPortEvent.setStatus(Event.SUCCESS); 159 | completeEvent(crossAppEvent); 160 | completeEvent(crossPortEvent); 161 | completeEvent(crossServerEvent); 162 | t.addChild(crossAppEvent); 163 | t.addChild(crossPortEvent); 164 | t.addChild(crossServerEvent); 165 | } 166 | 167 | private String getProviderAppName(URL url) { 168 | RpcContext.getContext().setAttachment(Constants.APPLICATION_KEY, url.getParameter(Constants.APPLICATION_KEY)); 169 | System.err.println(url.getParameter(Constants.APPLICATION_KEY)); 170 | return url.getParameter(Constants.APPLICATION_KEY); 171 | } 172 | 173 | private void createProviderCross(URL url, Transaction t) { 174 | String consumerAppName = RpcContext.getContext().getAttachment(Constants.APPLICATION_KEY); 175 | if (StringUtils.isEmpty(consumerAppName)) { 176 | consumerAppName = RpcContext.getContext().getRemoteHost() + ":" + RpcContext.getContext().getRemotePort(); 177 | } 178 | Event crossAppEvent = Cat.newEvent("PigeonService.app", consumerAppName); 179 | Event crossServerEvent = Cat.newEvent("PigeonService.client", url.getHost()); 180 | crossAppEvent.setStatus(Event.SUCCESS); 181 | crossServerEvent.setStatus(Event.SUCCESS); 182 | completeEvent(crossAppEvent); 183 | completeEvent(crossServerEvent); 184 | t.addChild(crossAppEvent); 185 | t.addChild(crossServerEvent); 186 | } 187 | 188 | private void completeEvent(Event event) { 189 | AbstractMessage message = (AbstractMessage) event; 190 | message.setCompleted(true); 191 | } 192 | 193 | } 194 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | com.sw 6 | cat-dubbo-web 7 | war 8 | 1.0.BUILD-SNAPSHOT 9 | cat-dubbo-web 10 | 11 | XuriMall-Biz 12 | 1.7.2 13 | 6 14 | UTF-8 15 | 16 | 1.7.2 17 | 3.2.3.RELEASE 18 | 19 | 20 | 21 | 22 | spring-maven-release 23 | Spring Maven Release Repository 24 | http://maven.springframework.org/release 25 | 26 | 27 | spring-maven-milestone 28 | Spring Maven Milestone Repository 29 | http://maven.springframework.org/milestone 30 | 31 | 33 | 34 | 35 | 36 | spring-maven-release 37 | Spring Maven Release Repository 38 | http://maven.springframework.org/release 39 | 40 | 41 | spring-maven-milestone 42 | Spring Maven Milestone Repository 43 | http://maven.springframework.org/milestone 44 | 45 | 48 | 49 | 50 | 51 | 52 | junit 53 | junit 54 | 4.10 55 | test 56 | 57 | 58 | log4j 59 | log4j 60 | 1.2.17 61 | 62 | 63 | org.slf4j 64 | slf4j-api 65 | ${slf4j.version} 66 | 67 | 68 | org.slf4j 69 | jcl-over-slf4j 70 | ${slf4j.version} 71 | 72 | 73 | org.slf4j 74 | slf4j-log4j12 75 | ${slf4j.version} 76 | 77 | 78 | org.aspectj 79 | aspectjrt 80 | ${aspectj.version} 81 | 82 | 83 | org.aspectj 84 | aspectjweaver 85 | ${aspectj.version} 86 | 87 | 88 | javax.servlet 89 | servlet-api 90 | 2.5 91 | provided 92 | 93 | 94 | net.sf.flexjson 95 | flexjson 96 | 2.1 97 | 98 | 99 | org.apache.commons 100 | commons-lang3 101 | 3.1 102 | 103 | 104 | org.springframework 105 | spring-core 106 | ${spring.version} 107 | 108 | 109 | commons-logging 110 | commons-logging 111 | 112 | 113 | 114 | 115 | org.springframework 116 | spring-test 117 | ${spring.version} 118 | test 119 | 120 | 121 | org.springframework 122 | spring-context 123 | ${spring.version} 124 | 125 | 126 | org.springframework 127 | spring-aop 128 | ${spring.version} 129 | 130 | 131 | org.springframework 132 | spring-aspects 133 | ${spring.version} 134 | 135 | 136 | org.springframework 137 | spring-webmvc 138 | ${spring.version} 139 | 140 | 141 | org.springframework.webflow 142 | spring-js-resources 143 | 2.2.1.RELEASE 144 | 145 | 146 | commons-digester 147 | commons-digester 148 | 2.1 149 | 150 | 151 | commons-logging 152 | commons-logging 153 | 154 | 155 | 156 | 157 | commons-fileupload 158 | commons-fileupload 159 | 1.2.2 160 | 161 | 162 | javax.servlet.jsp.jstl 163 | jstl-api 164 | 1.2 165 | 166 | 167 | org.glassfish.web 168 | jstl-impl 169 | 1.2 170 | 171 | 172 | javax.el 173 | el-api 174 | 2.2 175 | provided 176 | 177 | 178 | joda-time 179 | joda-time 180 | 1.6 181 | 182 | 183 | javax.servlet.jsp 184 | jsp-api 185 | 2.1 186 | provided 187 | 188 | 189 | commons-codec 190 | commons-codec 191 | 1.5 192 | 193 | 194 | org.apache.tiles 195 | tiles-jsp 196 | 2.2.2 197 | 198 | 199 | org.hibernate 200 | hibernate-core 201 | 4.1.8.Final 202 | 203 | 204 | org.hibernate 205 | hibernate-entitymanager 206 | 4.1.8.Final 207 | 208 | 209 | cglib 210 | cglib 211 | 212 | 213 | dom4j 214 | dom4j 215 | 216 | 217 | 218 | 219 | org.hibernate.javax.persistence 220 | hibernate-jpa-2.0-api 221 | 1.0.1.Final 222 | 223 | 224 | commons-collections 225 | commons-collections 226 | 3.2.1 227 | 228 | 229 | org.hibernate 230 | hibernate-validator 231 | 4.3.1.Final 232 | 233 | 234 | javax.validation 235 | validation-api 236 | 1.0.0.GA 237 | 238 | 239 | cglib 240 | cglib-nodep 241 | 2.2.2 242 | 243 | 244 | javax.transaction 245 | jta 246 | 1.1 247 | 248 | 249 | org.springframework 250 | spring-jdbc 251 | ${spring.version} 252 | 253 | 254 | org.springframework 255 | spring-orm 256 | ${spring.version} 257 | 258 | 259 | commons-pool 260 | commons-pool 261 | 1.5.6 262 | 263 | 264 | commons-dbcp 265 | commons-dbcp 266 | 1.3 267 | 268 | 269 | commons-logging 270 | commons-logging 271 | 272 | 273 | xml-apis 274 | xml-apis 275 | 276 | 277 | 278 | 279 | mysql 280 | mysql-connector-java 281 | 5.1.18 282 | 283 | 284 | p6spy 285 | p6spy 286 | 1.3 287 | 288 | 289 | com.dianping.cat 290 | cat-client 291 | 1.3.6 292 | 293 | 294 | 295 | com.alibaba 296 | druid 297 | 1.0.14 298 | 299 | 300 | com.alibaba 301 | dubbo 302 | 2.5.3 303 | 304 | 305 | org.apache.zookeeper 306 | zookeeper 307 | 3.4.6 308 | 309 | 310 | com.github.sgroschupf 311 | zkclient 312 | 0.1 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | dev 321 | 322 | dev 323 | 324 | 325 | 326 | true 327 | 328 | 329 | 330 | 331 | pro 332 | 333 | pro 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | org.apache.maven.plugins 342 | maven-war-plugin 343 | 2.2 344 | 345 | ${project.artifactId} 346 | 347 | 348 | 349 | true 350 | src/main/webapp 351 | 352 | **/web.xml 353 | 354 | 355 | 356 | src/main/webapp 357 | src/main/webapp/WEB-INF/web.xml 358 | 359 | 360 | 361 | org.apache.maven.plugins 362 | maven-compiler-plugin 363 | 2.5.1 364 | 365 | ${java.version} 366 | ${java.version} 367 | ${project.build.sourceEncoding} 368 | 369 | 370 | 371 | org.codehaus.mojo 372 | aspectj-maven-plugin 373 | 1.2 374 | 376 | 377 | 379 | 380 | org.aspectj 381 | aspectjrt 382 | ${aspectj.version} 383 | 384 | 385 | org.aspectj 386 | aspectjtools 387 | ${aspectj.version} 388 | 389 | 390 | 391 | 392 | 393 | compile 394 | test-compile 395 | 396 | 397 | 398 | 399 | true 400 | 401 | 402 | org.springframework 403 | spring-aspects 404 | 405 | 406 | ${java.version} 407 | ${java.version} 408 | 409 | 410 | 411 | org.apache.maven.plugins 412 | maven-resources-plugin 413 | 2.6 414 | 415 | ${project.build.sourceEncoding} 416 | 417 | 418 | 419 | org.apache.maven.plugins 420 | maven-surefire-plugin 421 | 2.12 422 | 423 | false 424 | true 425 | 426 | **/*_Roo_* 427 | 428 | 429 | 430 | 431 | org.apache.maven.plugins 432 | maven-assembly-plugin 433 | 2.3 434 | 435 | 436 | jar-with-dependencies 437 | 438 | 439 | 440 | 441 | org.apache.maven.plugins 442 | maven-deploy-plugin 443 | 2.7 444 | 445 | 446 | 447 | org.apache.maven.plugins 448 | maven-eclipse-plugin 449 | 2.9 450 | 451 | 452 | true 453 | false 454 | 2.0 455 | 456 | 457 | org.eclipse.ajdt.core.ajbuilder 458 | 459 | org.springframework.aspects 460 | 461 | 462 | 463 | org.springframework.ide.eclipse.core.springbuilder 464 | 465 | 466 | 467 | org.eclipse.ajdt.ui.ajnature 468 | 469 | org.springframework.ide.eclipse.core.springnature 470 | 471 | 472 | 473 | 474 | org.apache.maven.plugins 475 | maven-idea-plugin 476 | 2.2 477 | 478 | true 479 | true 480 | 481 | 482 | 483 | org.codehaus.mojo 484 | tomcat-maven-plugin 485 | 1.1 486 | 487 | org.mortbay.jetty jetty-maven-plugin 488 | 8.1.4.v20120524 /${project.name} 489 | 490 | 491 | 492 | 493 | --------------------------------------------------------------------------------