测试加载外部jar读取类信息
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
<modules>
|
||||
<module>zyplayer-doc-test</module>
|
||||
<module>zyplayer-doc-annotation</module>
|
||||
</modules>
|
||||
|
||||
|
||||
|
||||
44
zyplayer-doc-other/zyplayer-doc-annotation/pom.xml
Normal file
44
zyplayer-doc-other/zyplayer-doc-annotation/pom.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.zyplayer</groupId>
|
||||
<artifactId>zyplayer-doc-annotation</artifactId>
|
||||
<version>1.0.6</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>zyplayer-doc-annotation</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.zyplayer.doc.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface DocMethod {
|
||||
|
||||
/**
|
||||
* @return 方法的说明
|
||||
*/
|
||||
String value();
|
||||
|
||||
/**
|
||||
* @return 返回结果的说明
|
||||
*/
|
||||
String response() default "";
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.zyplayer.doc.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Repeatable(DocParams.class)
|
||||
public @interface DocParam {
|
||||
|
||||
/**
|
||||
* @return 说明
|
||||
*/
|
||||
String value();
|
||||
|
||||
/**
|
||||
* @return 字段名
|
||||
*/
|
||||
String name() default "";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zyplayer.doc.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface DocParams {
|
||||
|
||||
/**
|
||||
* @return 多个参数说明
|
||||
*/
|
||||
DocParam[] value();
|
||||
}
|
||||
Reference in New Issue
Block a user