Notes java scan the entire project

扫描编译后文件中的相关dubbo注解

Get the project, let's compile it. Use javaasist scanning project, we want to get all the interfaces, support for scanning xml files and corresponding notes

Supported types:

  • 1, scanned build directory
  • 2, the scanning jar / war package
  • 3, scanning tar.gz package (actually extract the first scan)

Related dependencies:

<dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.24.1-GA</version>
    </dependency>
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>15.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/dom4j/dom4j -->
    <dependency>
        <groupId>dom4j</groupId>
        <artifactId>dom4j</artifactId>
        <version>1.6.1</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress -->
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.20</version>
    </dependency>

Code has been uploaded warehouse

https://github.com/daleyzou/ScanAnnotations

Guess you like

Origin www.cnblogs.com/daleyzou/p/scanAnnotationAndXML.html