Skip to content

Commit e3e5f49

Browse files
committed
Adapt to changed AOT packages in Spring Data Commons.
Closes #2661
1 parent 3a3c937 commit e3e5f49

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/aot/JpaRuntimeHints.java renamed to spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.jpa.aot;
16+
package org.springframework.data.jpa.repository.aot;
1717

1818
import java.util.Arrays;
1919

@@ -29,10 +29,12 @@
2929
import org.springframework.util.ClassUtils;
3030

3131
/**
32+
* Runtime hints for JPA AOT processing.
33+
*
3234
* @author Christoph Strobl
3335
* @since 3.0
3436
*/
35-
public class JpaRuntimeHints implements RuntimeHintsRegistrar {
37+
class JpaRuntimeHints implements RuntimeHintsRegistrar {
3638

3739
@Override
3840
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
@@ -49,9 +51,10 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
4951
.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS));
5052

5153
hints.reflection().registerTypes(Arrays.asList( //
52-
TypeReference.of(AuditingBeanFactoryPostProcessor.class), //
53-
TypeReference.of(AuditingEntityListener.class)),
54-
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS));
54+
TypeReference.of(AuditingBeanFactoryPostProcessor.class), //
55+
TypeReference.of(AuditingEntityListener.class)),
56+
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
57+
MemberCategory.INVOKE_DECLARED_METHODS));
5558
}
5659

5760
hints.reflection().registerType(TypeReference.of(SimpleJpaRepository.class),
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
org.springframework.aot.hint.RuntimeHintsRegistrar=\
2-
org.springframework.data.jpa.aot.JpaRuntimeHints
2+
org.springframework.data.jpa.repository.aot.JpaRuntimeHints

spring-data-jpa/src/test/java/org/springframework/data/jpa/aot/JpaRuntimeHintsUnitTests.java renamed to spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHintsUnitTests.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.jpa.aot;
16+
package org.springframework.data.jpa.repository.aot;
1717

1818
import static org.assertj.core.api.AssertionsForClassTypes.*;
19-
import static org.springframework.aot.hint.predicate.RuntimeHintsPredicates.reflection;
19+
import static org.springframework.aot.hint.predicate.RuntimeHintsPredicates.*;
2020

2121
import org.junit.jupiter.api.Test;
22+
2223
import org.springframework.aot.hint.RuntimeHints;
2324
import org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect;
2425
import org.springframework.data.jpa.domain.support.AuditingBeanFactoryPostProcessor;
2526
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
2627
import org.springframework.data.jpa.util.HidingClassLoader;
2728

2829
/**
30+
* Unit tests for {@link JpaRuntimeHints}.
31+
*
2932
* @author Christoph Strobl
3033
*/
3134
class JpaRuntimeHintsUnitTests {

0 commit comments

Comments
 (0)