From 8ccf05adeefa3fd2a377eba067a156ea163dd616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Thu, 7 Jul 2022 18:07:27 +0200 Subject: [PATCH] Remove SpringProxyRuntimeHintsRegistrar A dynamic mechanism to register proxy and reflection hints for classes annotated by @Transactional is needed instead. See gh-28717 --- .../aop/SpringProxyRuntimeHintsRegistrar.java | 37 ------------------- .../resources/META-INF/spring/aot.factories | 2 - 2 files changed, 39 deletions(-) delete mode 100644 spring-aop/src/main/java/org/springframework/aop/SpringProxyRuntimeHintsRegistrar.java diff --git a/spring-aop/src/main/java/org/springframework/aop/SpringProxyRuntimeHintsRegistrar.java b/spring-aop/src/main/java/org/springframework/aop/SpringProxyRuntimeHintsRegistrar.java deleted file mode 100644 index 41f311562ef..00000000000 --- a/spring-aop/src/main/java/org/springframework/aop/SpringProxyRuntimeHintsRegistrar.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2002-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.aop; - -import org.springframework.aop.framework.Advised; -import org.springframework.aot.hint.RuntimeHints; -import org.springframework.aot.hint.RuntimeHintsRegistrar; -import org.springframework.core.DecoratingProxy; - -/** - * {@link RuntimeHintsRegistrar} implementation that registers runtime hints for - * AOP proxies. - * - * @author Sebastien Deleuze - * @since 6.0 - */ -public class SpringProxyRuntimeHintsRegistrar implements RuntimeHintsRegistrar { - - @Override - public void registerHints(RuntimeHints hints, ClassLoader classLoader) { - hints.proxies().registerJdkProxy(SpringProxy.class, Advised.class, DecoratingProxy.class); - } -} diff --git a/spring-aop/src/main/resources/META-INF/spring/aot.factories b/spring-aop/src/main/resources/META-INF/spring/aot.factories index e514abff10e..7264434e5cb 100644 --- a/spring-aop/src/main/resources/META-INF/spring/aot.factories +++ b/spring-aop/src/main/resources/META-INF/spring/aot.factories @@ -1,4 +1,2 @@ org.springframework.beans.factory.aot.BeanRegistrationAotProcessor=\ org.springframework.aop.scope.ScopedProxyBeanRegistrationAotProcessor -org.springframework.aot.hint.RuntimeHintsRegistrar=\ -org.springframework.aop.SpringProxyRuntimeHintsRegistrar \ No newline at end of file