Skip to content

Commit 491b777

Browse files
committed
Register proper caching annotation runtime hints
See gh-28943
1 parent 8fe6a9f commit 491b777

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.lang.annotation.RetentionPolicy;
2424
import java.lang.annotation.Target;
2525

26+
import org.springframework.aot.hint.annotation.Reflective;
2627
import org.springframework.core.annotation.AliasFor;
2728

2829
/**
@@ -42,6 +43,7 @@
4243
@Retention(RetentionPolicy.RUNTIME)
4344
@Inherited
4445
@Documented
46+
@Reflective
4547
public @interface CacheEvict {
4648

4749
/**

spring-context/src/main/java/org/springframework/cache/annotation/CachePut.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.lang.annotation.RetentionPolicy;
2424
import java.lang.annotation.Target;
2525

26+
import org.springframework.aot.hint.annotation.Reflective;
2627
import org.springframework.core.annotation.AliasFor;
2728

2829
/**
@@ -50,6 +51,7 @@
5051
@Retention(RetentionPolicy.RUNTIME)
5152
@Inherited
5253
@Documented
54+
@Reflective
5355
public @interface CachePut {
5456

5557
/**

spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.lang.annotation.Target;
2525
import java.util.concurrent.Callable;
2626

27+
import org.springframework.aot.hint.annotation.Reflective;
2728
import org.springframework.core.annotation.AliasFor;
2829

2930
/**
@@ -58,6 +59,7 @@
5859
@Retention(RetentionPolicy.RUNTIME)
5960
@Inherited
6061
@Documented
62+
@Reflective
6163
public @interface Cacheable {
6264

6365
/**

spring-context/src/main/java/org/springframework/cache/annotation/Caching.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import java.lang.annotation.RetentionPolicy;
2424
import java.lang.annotation.Target;
2525

26+
import org.springframework.aot.hint.annotation.Reflective;
27+
2628
/**
2729
* Group annotation for multiple cache annotations (of different or the same type).
2830
*
@@ -37,6 +39,7 @@
3739
@Retention(RetentionPolicy.RUNTIME)
3840
@Inherited
3941
@Documented
42+
@Reflective
4043
public @interface Caching {
4144

4245
Cacheable[] cacheable() default {};

0 commit comments

Comments
 (0)