File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
java/org/springframework/data/web/aot/hint
resources/META-INF/spring Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2024 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package org .springframework .data .web .aot .hint ;
17+
18+ import org .springframework .aot .hint .RuntimeHints ;
19+ import org .springframework .aot .hint .RuntimeHintsRegistrar ;
20+ import org .springframework .aot .hint .TypeReference ;
21+ import org .springframework .data .web .config .SpringDataJacksonConfiguration .PageModule ;
22+ import org .springframework .lang .Nullable ;
23+
24+ /**
25+ * @author Christoph Strobl
26+ * @since 3.2.3
27+ */
28+ public class WebRuntimeHints implements RuntimeHintsRegistrar {
29+
30+ @ Override
31+ public void registerHints (RuntimeHints hints , @ Nullable ClassLoader classLoader ) {
32+
33+ hints .reflection ().registerType (TypeReference .of ("org.springframework.data.domain.Unpaged" ), hint -> {
34+ hint .onReachableType (PageModule .class );
35+ });
36+ }
37+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor=\
33
44org.springframework.aot.hint.RuntimeHintsRegistrar=\
55org.springframework.data.repository.aot.hint.RepositoryRuntimeHints,\
6- org.springframework.data.querydsl.aot.QuerydslHints
6+ org.springframework.data.querydsl.aot.QuerydslHints,\
7+ org.springframework.data.web.aot.hint.WebRuntimeHints
78
89org.springframework.beans.factory.aot.BeanRegistrationAotProcessor=\
910 org.springframework.data.aot.AuditingBeanRegistrationAotProcessor
You can’t perform that action at this time.
0 commit comments