fix(gateway): fix routing prefix matching and cache fallback tools
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m9s
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m9s
This commit is contained in:
25
TestAnnotation.java
Normal file
25
TestAnnotation.java
Normal file
@@ -0,0 +1,25 @@
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import java.lang.annotation.*;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@interface MyTool {
|
||||
String value();
|
||||
}
|
||||
|
||||
interface MyUseCase {
|
||||
@MyTool("hello")
|
||||
void doSomething();
|
||||
}
|
||||
|
||||
class MyUseCaseImpl implements MyUseCase {
|
||||
public void doSomething() { }
|
||||
}
|
||||
|
||||
public class TestAnnotation {
|
||||
public static void main(String[] args) throws Exception {
|
||||
Method m = MyUseCaseImpl.class.getDeclaredMethod("doSomething");
|
||||
MyTool ann = AnnotationUtils.findAnnotation(m, MyTool.class);
|
||||
System.out.println("Annotation found: " + (ann != null ? ann.value() : "null"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user