GithubHelp home page GithubHelp logo

yinwer81 / aop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xwqiang/aop

0.0 2.0 0.0 160 KB

通过aop对项目进行拦截,记录调用链的相关信息

License: Apache License 2.0

Java 100.00%

aop's Introduction

aop

通过aop对项目进行拦截,记录调用链的相关信息

目的:取得调用链的相关信息(进程、线程、执行时长、类、方法、参数等)。

方法:通过使用javassist和Instrumentation来实现对应用系统的调用关系进行记录,此种方式是在类加载器加载类时进行拦截,然后在字节码中添加自定义代码实现的。

1、普通JAVA项目:在项目启动参数中加入:-javaagent:D:\Workspaces\Eclipse\core-aop\target\core-aop-0.0.1.jar来实现

2、Web项目(需要部署在Tomcat中): a、修改catalina.sh文件 CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/tomcat-zookeeper/shared/core-aop-0.0.1.jar" CLASSPATH="$CLASSPATH:/opt/tomcat-zookeeper/shared/javassist-3.18.1-GA.jar:/opt/tomcat-zookeeper/shared/json-20090211.jar"

b、把依赖的jar包放到tomcat的shared目录下面(core-aop-0.0.1.jar、javassist-3.18.1-GA.jar、json-20090211.jar)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.