Browse Source

Merge branch '6.1.x'

pull/32782/head
Juergen Hoeller 2 years ago
parent
commit
645556a28c
  1. 2
      spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBeanRuntimeHints.java
  2. 3
      spring-core/src/main/java/org/springframework/aot/hint/annotation/RegisterReflectionForBinding.java
  3. 9
      spring-core/src/main/java/org/springframework/aot/hint/support/SpringFactoriesLoaderRuntimeHints.java
  4. 8
      spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryRuntimeHints.java
  5. 4
      spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerRuntimeHints.java
  6. 9
      spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionRuntimeHints.java
  7. 4
      spring-web/src/main/java/org/springframework/http/converter/json/JacksonModulesRuntimeHints.java
  8. 4
      spring-web/src/main/java/org/springframework/http/converter/json/ProblemDetailRuntimeHints.java
  9. 6
      spring-web/src/main/java/org/springframework/web/util/WebUtilRuntimeHints.java
  10. 7
      spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceRuntimeHints.java
  11. 6
      spring-websocket/src/main/java/org/springframework/web/socket/server/support/HandshakeHandlerRuntimeHints.java

2
spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBeanRuntimeHints.java

@ -27,7 +27,7 @@ import org.springframework.util.ClassUtils; @@ -27,7 +27,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link RuntimeHintsRegistrar} implementation that makes sure {@link SchedulerFactoryBean}
* reflection entries are registered.
* reflection hints are registered.
*
* @author Sebastien Deleuze
* @author Stephane Nicoll

3
spring-core/src/main/java/org/springframework/aot/hint/annotation/RegisterReflectionForBinding.java

@ -77,8 +77,7 @@ public @interface RegisterReflectionForBinding { @@ -77,8 +77,7 @@ public @interface RegisterReflectionForBinding {
/**
* Classes for which reflection hints should be registered.
* <p>At least one class must be specified either via {@link #value} or
* {@code #classes}.
* <p>At least one class must be specified either via {@link #value} or {@code classes}.
* @see #value()
*/
@AliasFor("value")

9
spring-core/src/main/java/org/springframework/aot/hint/support/SpringFactoriesLoaderRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -48,8 +48,8 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar { @@ -48,8 +48,8 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
ClassLoader classLoaderToUse = (classLoader != null ? classLoader
: SpringFactoriesLoaderRuntimeHints.class.getClassLoader());
ClassLoader classLoaderToUse = (classLoader != null ? classLoader :
SpringFactoriesLoaderRuntimeHints.class.getClassLoader());
for (String resourceLocation : RESOURCE_LOCATIONS) {
registerHints(hints, classLoaderToUse, resourceLocation);
}
@ -65,6 +65,7 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar { @@ -65,6 +65,7 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar {
private void registerHints(RuntimeHints hints, ClassLoader classLoader,
String factoryClassName, List<String> implementationClassNames) {
Class<?> factoryClass = resolveClassName(classLoader, factoryClassName);
if (factoryClass == null) {
if (logger.isTraceEnabled()) {
@ -102,6 +103,7 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar { @@ -102,6 +103,7 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar {
}
}
private static class ExtendedSpringFactoriesLoader extends SpringFactoriesLoader {
ExtendedSpringFactoriesLoader(@Nullable ClassLoader classLoader, Map<String, List<String>> factories) {
@ -111,7 +113,6 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar { @@ -111,7 +113,6 @@ class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar {
static Map<String, List<String>> accessLoadFactoriesResource(ClassLoader classLoader, String resourceLocation) {
return SpringFactoriesLoader.loadFactoriesResource(classLoader, resourceLocation);
}
}
}

8
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 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.
@ -24,9 +24,9 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar; @@ -24,9 +24,9 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.lang.Nullable;
/**
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints for
* {@code EmbeddedDataSourceProxy#shutdown} in order to allow it to be used as a bean
* destroy method.
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
* for {@code EmbeddedDataSourceProxy#shutdown} in order to allow it to be used
* as a bean destroy method.
*
* @author Sebastien Deleuze
* @since 6.0

4
spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -42,6 +42,7 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar { @@ -42,6 +42,7 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar {
private static final String NATIVE_QUERY_IMPL_CLASS_NAME = "org.hibernate.query.sql.internal.NativeQueryImpl";
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
if (ClassUtils.isPresent(HIBERNATE_SESSION_FACTORY_CLASS_NAME, classLoader)) {
@ -71,4 +72,5 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar { @@ -71,4 +72,5 @@ class EntityManagerRuntimeHints implements RuntimeHintsRegistrar {
catch (ClassNotFoundException ignored) {
}
}
}

9
spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -24,8 +24,8 @@ import org.springframework.aot.hint.TypeReference; @@ -24,8 +24,8 @@ import org.springframework.aot.hint.TypeReference;
import org.springframework.lang.Nullable;
/**
* {@link RuntimeHintsRegistrar} implementation that registers runtime hints for
* transaction management.
* {@link RuntimeHintsRegistrar} implementation that registers runtime hints
* for transaction management.
*
* @author Sebastien Deleuze
* @since 6.0
@ -35,7 +35,8 @@ class TransactionRuntimeHints implements RuntimeHintsRegistrar { @@ -35,7 +35,8 @@ class TransactionRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
hints.reflection().registerTypes(TypeReference.listOf(Isolation.class, Propagation.class),
hints.reflection().registerTypes(
TypeReference.listOf(Isolation.class, Propagation.class),
TypeHint.builtWith(MemberCategory.DECLARED_FIELDS));
}

4
spring-web/src/main/java/org/springframework/http/converter/json/JacksonModulesRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 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.
@ -25,7 +25,7 @@ import org.springframework.aot.hint.TypeHint.Builder; @@ -25,7 +25,7 @@ import org.springframework.aot.hint.TypeHint.Builder;
import org.springframework.lang.Nullable;
/**
* {@link RuntimeHintsRegistrar} implementation that registers reflection entries
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
* for {@link Jackson2ObjectMapperBuilder} well-known modules.
*
* @author Sebastien Deleuze

4
spring-web/src/main/java/org/springframework/http/converter/json/ProblemDetailRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -24,7 +24,7 @@ import org.springframework.lang.Nullable; @@ -24,7 +24,7 @@ import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
/**
* {@link RuntimeHintsRegistrar} implementation that registers binding reflection entries
* {@link RuntimeHintsRegistrar} implementation that registers binding reflection hints
* for {@link ProblemDetail} serialization support with Jackson.
*
* @author Brian Clozel

6
spring-web/src/main/java/org/springframework/web/util/WebUtilRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 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.
@ -22,8 +22,8 @@ import org.springframework.core.io.ClassPathResource; @@ -22,8 +22,8 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.lang.Nullable;
/**
* {@link RuntimeHintsRegistrar} implementation that registers resource
* hints for web util resources.
* {@link RuntimeHintsRegistrar} implementation that registers resource hints
* for resources in the {@code web.util} package.
*
* @author Sebastien Deleuze
* @since 6.0

7
spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 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.
@ -22,8 +22,8 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar; @@ -22,8 +22,8 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.lang.Nullable;
/**
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints related to
* {@link HandshakeWebSocketService}.
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
* related to {@link HandshakeWebSocketService}.
*
* @author Sebastien Deleuze
* @since 6.0
@ -35,4 +35,5 @@ class HandshakeWebSocketServiceRuntimeHints implements RuntimeHintsRegistrar { @@ -35,4 +35,5 @@ class HandshakeWebSocketServiceRuntimeHints implements RuntimeHintsRegistrar {
hints.reflection().registerType(HandshakeWebSocketService.initUpgradeStrategy().getClass(),
MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
}
}

6
spring-websocket/src/main/java/org/springframework/web/socket/server/support/HandshakeHandlerRuntimeHints.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -25,7 +25,7 @@ import org.springframework.lang.Nullable; @@ -25,7 +25,7 @@ import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
/**
* {@link RuntimeHintsRegistrar} implementation that registers reflection entries
* {@link RuntimeHintsRegistrar} implementation that registers reflection hints
* for {@link AbstractHandshakeHandler}.
*
* @author Sebastien Deleuze
@ -61,6 +61,7 @@ class HandshakeHandlerRuntimeHints implements RuntimeHintsRegistrar { @@ -61,6 +61,7 @@ class HandshakeHandlerRuntimeHints implements RuntimeHintsRegistrar {
"com.ibm.websphere.wsoc.WsWsocServerContainer", classLoader);
}
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
ReflectionHints reflectionHints = hints.reflection();
@ -88,4 +89,5 @@ class HandshakeHandlerRuntimeHints implements RuntimeHintsRegistrar { @@ -88,4 +89,5 @@ class HandshakeHandlerRuntimeHints implements RuntimeHintsRegistrar {
reflectionHints.registerType(TypeReference.of(className),
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
}
}

Loading…
Cancel
Save