Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spring-projects/spring-framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.2.11.RELEASE
Choose a base ref
...
head repository: spring-projects/spring-framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.2.12.RELEASE
Choose a head ref

Commits on Nov 10, 2020

  1. Copy the full SHA
    a637f6a View commit details
  2. Copy the full SHA
    d3d8f1a View commit details

Commits on Nov 12, 2020

  1. Copy the full SHA
    d8b7a59 View commit details
  2. Copy the full SHA
    9949a91 View commit details
  3. Copy the full SHA
    25cbc26 View commit details

Commits on Nov 13, 2020

  1. Copy the full SHA
    763fa98 View commit details

Commits on Nov 16, 2020

  1. Copy the full SHA
    db27862 View commit details
  2. Polishing

    jhoeller committed Nov 16, 2020
    Copy the full SHA
    240cfb1 View commit details
  3. Upgrade to Reactor Dysprosium-SR14, OpenPDF 1.3.23, AssertJ 3.18.1, M…

    …ockK 1.10.2, Checkstyle 8.37
    jhoeller committed Nov 16, 2020
    Copy the full SHA
    fdab75a View commit details

Commits on Nov 17, 2020

  1. Encode hash symbol in jar file path (for compatibility with JDK 11+)

    Closes gh-26104
    
    (cherry picked from commit b297236)
    jhoeller committed Nov 17, 2020
    Copy the full SHA
    4e720e8 View commit details
  2. Copy the full SHA
    322babc View commit details

Commits on Nov 19, 2020

  1. Copy the full SHA
    37bda56 View commit details
  2. Copy the full SHA
    990c74b View commit details
  3. Upgrade to Hibernate ORM 5.4.24

    (cherry picked from commit 135682e)
    jhoeller committed Nov 19, 2020
    Copy the full SHA
    9e99fd5 View commit details

Commits on Nov 20, 2020

  1. Copy the full SHA
    e238c8a View commit details

Commits on Nov 23, 2020

  1. Copy the full SHA
    346445e View commit details

Commits on Nov 26, 2020

  1. Remove misleading default note on ISO.DATE_TIME

    Closes gh-26134
    
    (cherry picked from commit 86f9716)
    jhoeller committed Nov 26, 2020
    Copy the full SHA
    50803ce View commit details
  2. Remove unused package-private class o.s.w.u.p.SubSequence

    (cherry picked from commit 42216b7)
    stsypanov authored and jhoeller committed Nov 26, 2020
    Copy the full SHA
    b929edb View commit details
  3. MessageHeaderAccessor handle self-copy correctly

    1. Revert changes in setHeader from 5.2.9 that caused regression on self-copy.
    2. Update copyHeaders/IfAbsent to ensure a copy of native headers.
    3. Exit if source and target are the same instance, as an optimization.
    
    Closes gh-26155
    rstoyanchev committed Nov 26, 2020
    Copy the full SHA
    3703be5 View commit details

Commits on Nov 27, 2020

  1. Copy the full SHA
    81c1b60 View commit details
  2. Polishing

    jhoeller committed Nov 27, 2020
    Copy the full SHA
    7c33c70 View commit details

Commits on Nov 30, 2020

  1. Copy the full SHA
    a495bd6 View commit details

Commits on Dec 1, 2020

  1. Copy the full SHA
    736af46 View commit details

Commits on Dec 2, 2020

  1. Support for multi-threaded addConverter calls

    Closes gh-26183
    
    (cherry picked from commit 396fb0c)
    jhoeller committed Dec 2, 2020
    Copy the full SHA
    ce67b89 View commit details
  2. Copy the full SHA
    f7605ea View commit details

Commits on Dec 7, 2020

  1. Clarify intended advice execution behavior (includes related polishing)

    Closes gh-26202
    
    (cherry picked from commit 834032d)
    jhoeller committed Dec 7, 2020
    Copy the full SHA
    a7efa96 View commit details
  2. Polishing

    (cherry picked from commit c970c31)
    jhoeller committed Dec 7, 2020
    Copy the full SHA
    b0c6e5e View commit details

Commits on Dec 8, 2020

  1. Upgrade to Reactor Dysprosium-SR15

    Closes gh-26175
    snicoll committed Dec 8, 2020
    Copy the full SHA
    085825f View commit details
  2. Copy the full SHA
    396fdf1 View commit details
  3. Avoid closing Jackson JsonGenerator for error cases

    Prior to this commit, a change introduced in gh-25910 would close the
    `JsonGenerator` after it's been used for JSON serialization. This would
    not only close it and recycle resources, but also flush the underlyning
    buffer to the output.
    In a case where the JSON serialization process would throw an exception,
    the buffer would be still flushed to the response output. Before the
    change introduced in gh-25910, the response body could be still empty at
    that point and error handling could write an error body instead.
    
    This commits only closes the `JsonGenerator` when serialization has been
    successful.
    
    Note that we're changing this in the spirit of backwards compatibility
    in the 5.2.x line, but change this won't be merged forward on the 5.3.x
    line, for several reasons:
    
    * this behavior is not consistent. If the JSON output exceeds a
    certain size, or if Jackson has been configured to flush after each
    write, the response output might still contain an incomplete JSON
    payload (just like before this change)
    
    * this behavior is not consistent with the WebFlux and Messaging codecs,
    which are flushing or closing the generator
    
    * not closing the generator for error cases prevents resources from
    being recycled as expected by Jackson
    
    Fixes gh-26246
    bclozel committed Dec 8, 2020
    Copy the full SHA
    a8091b9 View commit details
  4. 1
    Copy the full SHA
    33476a2 View commit details

Commits on Dec 9, 2020

  1. Copy the full SHA
    1c5e9fa View commit details
Showing with 710 additions and 508 deletions.
  1. +8 −8 build.gradle
  2. +1 −1 gradle.properties
  3. +1 −2 gradle/ide.gradle
  4. +3 −2 spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj
  5. +1 −2 spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java
  6. +7 −5 spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
  7. +16 −11 spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java
  8. +16 −22 spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
  9. +1 −2 spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java
  10. +8 −6 ...-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java
  11. +3 −3 ...text/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests.java
  12. +7 −4 ...xt/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java
  13. +3 −3 spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt
  14. +8 −8 spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
  15. +3 −6 spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java
  16. +3 −0 ...g-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
  17. +21 −8 spring-core/src/main/java/org/springframework/util/MimeType.java
  18. +18 −0 spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java
  19. +7 −3 spring-core/src/test/java/org/springframework/core/io/buffer/LimitedDataBufferListTests.java
  20. +18 −11 spring-core/src/test/java/org/springframework/util/MimeTypeTests.java
  21. +2 −3 spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java
  22. +5 −5 ...ression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java
  23. +2 −4 spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java
  24. +3 −3 spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java
  25. +3 −8 spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java
  26. +9 −6 ...-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplateTests.java
  27. +14 −12 spring-messaging/src/main/java/org/springframework/messaging/support/MessageHeaderAccessor.java
  28. +52 −20 ...ng-messaging/src/main/java/org/springframework/messaging/support/NativeMessageHeaderAccessor.java
  29. +35 −8 ...ssaging/src/test/java/org/springframework/messaging/support/NativeMessageHeaderAccessorTests.java
  30. +9 −6 spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
  31. +14 −5 spring-tx/src/main/java/org/springframework/transaction/annotation/Transactional.java
  32. +2 −2 ...g-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java
  33. +3 −3 spring-web/src/main/java/org/springframework/http/MediaType.java
  34. +2 −1 spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java
  35. +3 −1 ...b/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java
  36. +22 −4 spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpResponse.java
  37. +3 −1 spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java
  38. +5 −9 spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java
  39. +4 −1 spring-web/src/main/java/org/springframework/web/util/ContentCachingResponseWrapper.java
  40. +1 −1 spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java
  41. +0 −64 spring-web/src/main/java/org/springframework/web/util/pattern/SubSequence.java
  42. +12 −2 spring-web/src/test/java/org/springframework/http/MediaTypeTests.java
  43. +25 −14 ...c/test/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverterTests.java
  44. +28 −0 spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpResponseTests.java
  45. +39 −39 spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java
  46. +69 −0 spring-web/src/test/java/org/springframework/web/filter/ContentCachingResponseWrapperTests.java
  47. +13 −5 spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java
  48. +3 −2 spring-webflux/src/main/java/org/springframework/web/reactive/config/CorsRegistration.java
  49. +3 −2 spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/CorsRegistration.java
  50. +1 −0 spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd
  51. +96 −107 src/docs/asciidoc/core/core-aop.adoc
  52. +2 −1 src/docs/asciidoc/core/core-appendix.adoc
  53. +64 −53 src/docs/asciidoc/data-access.adoc
  54. +9 −9 src/docs/asciidoc/languages/dynamic-languages.adoc
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@ plugins {
id 'org.asciidoctor.jvm.pdf' version '2.4.0'
id 'de.undercouch.download' version '4.1.1'
id "io.freefair.aspectj" version '4.1.6' apply false
id "com.github.ben-manes.versions" version '0.28.0'
id 'com.gradle.build-scan' version '3.2'
id "com.jfrog.artifactory" version '4.12.0' apply false
id "com.github.ben-manes.versions" version '0.24.0'
}

apply from: "$rootDir/gradle/build-scan-user-data.gradle"
@@ -29,7 +29,7 @@ configure(allprojects) { project ->
imports {
mavenBom "com.fasterxml.jackson:jackson-bom:2.10.5"
mavenBom "io.netty:netty-bom:4.1.51.Final"
mavenBom "io.projectreactor:reactor-bom:Dysprosium-SR13"
mavenBom "io.projectreactor:reactor-bom:Dysprosium-SR15"
mavenBom "io.rsocket:rsocket-bom:1.0.3"
mavenBom "org.eclipse.jetty:jetty-bom:9.4.31.v20200723"
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.3.72"
@@ -89,7 +89,7 @@ configure(allprojects) { project ->

dependency "com.h2database:h2:1.4.200"
dependency "com.github.ben-manes.caffeine:caffeine:2.8.6"
dependency "com.github.librepdf:openpdf:1.3.22"
dependency "com.github.librepdf:openpdf:1.3.23"
dependency "com.rometools:rome:1.12.2"
dependency "commons-io:commons-io:2.5"
dependency "io.vavr:vavr:0.10.3"
@@ -116,7 +116,7 @@ configure(allprojects) { project ->
dependency "net.sf.ehcache:ehcache:2.10.6"
dependency "org.ehcache:jcache:1.0.1"
dependency "org.ehcache:ehcache:3.4.0"
dependency "org.hibernate:hibernate-core:5.4.23.Final"
dependency "org.hibernate:hibernate-core:5.4.25.Final"
dependency "org.hibernate:hibernate-validator:6.1.6.Final"
dependency "org.webjars:webjars-locator-core:0.46"
dependency "org.webjars:underscorejs:1.8.3"
@@ -147,7 +147,7 @@ configure(allprojects) { project ->
entry 'okhttp'
entry 'mockwebserver'
}
dependency("org.apache.httpcomponents:httpclient:4.5.12") {
dependency("org.apache.httpcomponents:httpclient:4.5.13") {
exclude group: "commons-logging", name: "commons-logging"
}
dependency("org.apache.httpcomponents:httpasyncclient:4.1.4") {
@@ -180,7 +180,7 @@ configure(allprojects) { project ->
dependency "org.testng:testng:6.14.3"
dependency "org.hamcrest:hamcrest:2.1"
dependency "org.awaitility:awaitility:3.1.6"
dependency "org.assertj:assertj-core:3.17.2"
dependency "org.assertj:assertj-core:3.18.1"
dependencySet(group: 'org.xmlunit', version: '2.6.2') {
entry 'xmlunit-assertj'
entry('xmlunit-matchers') {
@@ -193,7 +193,7 @@ configure(allprojects) { project ->
}
entry 'mockito-junit-jupiter'
}
dependency "io.mockk:mockk:1.10.0"
dependency "io.mockk:mockk:1.10.2"

dependency("net.sourceforge.htmlunit:htmlunit:2.43.0") {
exclude group: "commons-logging", name: "commons-logging"
@@ -326,7 +326,7 @@ configure([rootProject] + javaProjects) { project ->
}

checkstyle {
toolVersion = "8.36.2"
toolVersion = "8.38"
configDir = rootProject.file("src/checkstyle")
}

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=5.2.11.BUILD-SNAPSHOT
version=5.2.12.RELEASE
org.gradle.jvmargs=-Xmx1536M
org.gradle.caching=true
org.gradle.parallel=true
3 changes: 1 addition & 2 deletions gradle/ide.gradle
Original file line number Diff line number Diff line change
@@ -29,12 +29,11 @@ eclipse.classpath.file.whenMerged { classpath ->
classpath.entries.removeAll { entry -> (entry.path =~ /(?!.*?repack.*\.jar).*?\/([^\/]+)\/build\/libs\/[^\/]+\.jar/) }
}


// Use separate main/test outputs (prevents WTP from packaging test classes)
eclipse.classpath.defaultOutputDir = file(project.name+"/bin/eclipse")
eclipse.classpath.file.beforeMerged { classpath ->
classpath.entries.findAll{ it instanceof SourceFolder }.each {
if(it.output.startsWith("bin/")) {
if (it.output.startsWith("bin/")) {
it.output = null
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2020 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.
@@ -59,7 +59,8 @@ public abstract aspect AbstractTransactionAspect extends TransactionAspectSuppor

@Override
public void destroy() {
clearTransactionManagerCache(); // An aspect is basically a singleton
// An aspect is basically a singleton -> cleanup on destruction
clearTransactionManagerCache();
}

@SuppressAjWarnings("adviceDidNotMatch")
Original file line number Diff line number Diff line change
@@ -141,8 +141,7 @@ public void clear(@Nullable PropertyValues pvs) {
* Return an {@code InjectionMetadata} instance, possibly for empty elements.
* @param elements the elements to inject (possibly empty)
* @param clazz the target class
* @return a new {@link #InjectionMetadata(Class, Collection)} instance,
* or {@link #EMPTY} in case of no elements
* @return a new {@link #InjectionMetadata(Class, Collection)} instance
* @since 5.2
*/
public static InjectionMetadata forElements(Collection<InjectedElement> elements, Class<?> clazz) {
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@

/**
* Delegate for resolving constructors and factory methods.
*
* <p>Performs constructor resolution through argument matching.
*
* @author Juergen Hoeller
@@ -84,7 +85,7 @@ class ConstructorResolver {
private static final Object[] EMPTY_ARGS = new Object[0];

/**
* Marker for autowired arguments in a cached argument array, to be later replaced
* Marker for autowired arguments in a cached argument array, to be replaced
* by a {@linkplain #resolveAutowiredArgument resolved autowired argument}.
*/
private static final Object autowiredArgumentMarker = new Object();
@@ -148,7 +149,7 @@ public BeanWrapper autowireConstructor(String beanName, RootBeanDefinition mbd,
}
}
if (argsToResolve != null) {
argsToUse = resolvePreparedArguments(beanName, mbd, bw, constructorToUse, argsToResolve, true);
argsToUse = resolvePreparedArguments(beanName, mbd, bw, constructorToUse, argsToResolve);
}
}

@@ -409,6 +410,7 @@ public BeanWrapper instantiateUsingFactoryMethod(
if (mbd.isSingleton() && this.beanFactory.containsSingleton(beanName)) {
throw new ImplicitlyAppearedSingletonException();
}
this.beanFactory.registerDependentBean(factoryBeanName, beanName);
factoryClass = factoryBean.getClass();
isStatic = false;
}
@@ -443,7 +445,7 @@ public BeanWrapper instantiateUsingFactoryMethod(
}
}
if (argsToResolve != null) {
argsToUse = resolvePreparedArguments(beanName, mbd, bw, factoryMethodToUse, argsToResolve, true);
argsToUse = resolvePreparedArguments(beanName, mbd, bw, factoryMethodToUse, argsToResolve);
}
}

@@ -815,7 +817,7 @@ private ArgumentsHolder createArgumentArray(
* Resolve the prepared arguments stored in the given bean definition.
*/
private Object[] resolvePreparedArguments(String beanName, RootBeanDefinition mbd, BeanWrapper bw,
Executable executable, Object[] argsToResolve, boolean fallback) {
Executable executable, Object[] argsToResolve) {

TypeConverter customConverter = this.beanFactory.getCustomTypeConverter();
TypeConverter converter = (customConverter != null ? customConverter : bw);
@@ -828,7 +830,7 @@ private Object[] resolvePreparedArguments(String beanName, RootBeanDefinition mb
Object argValue = argsToResolve[argIndex];
MethodParameter methodParam = MethodParameter.forExecutable(executable, argIndex);
if (argValue == autowiredArgumentMarker) {
argValue = resolveAutowiredArgument(methodParam, beanName, null, converter, fallback);
argValue = resolveAutowiredArgument(methodParam, beanName, null, converter, true);
}
else if (argValue instanceof BeanMetadataElement) {
argValue = valueResolver.resolveValueIfNecessary("constructor argument", argValue);
Original file line number Diff line number Diff line change
@@ -63,9 +63,8 @@ public class BeanFactoryUtilsTests {


@BeforeEach
public void setUp() {
public void setup() {
// Interesting hierarchical factory to test counts.
// Slow to read so we cache it.

DefaultListableBeanFactory grandParent = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(grandParent).loadBeanDefinitions(ROOT_CONTEXT);
@@ -93,22 +92,22 @@ public void testHierarchicalCountBeansWithNonHierarchicalFactory() {
* Check that override doesn't count as two separate beans.
*/
@Test
public void testHierarchicalCountBeansWithOverride() throws Exception {
public void testHierarchicalCountBeansWithOverride() {
// Leaf count
assertThat(this.listableBeanFactory.getBeanDefinitionCount() == 1).isTrue();
// Count minus duplicate
assertThat(BeanFactoryUtils.countBeansIncludingAncestors(this.listableBeanFactory) == 8).as("Should count 8 beans, not " + BeanFactoryUtils.countBeansIncludingAncestors(this.listableBeanFactory)).isTrue();
}

@Test
public void testHierarchicalNamesWithNoMatch() throws Exception {
public void testHierarchicalNamesWithNoMatch() {
List<String> names = Arrays.asList(
BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.listableBeanFactory, NoOp.class));
assertThat(names.size()).isEqualTo(0);
}

@Test
public void testHierarchicalNamesWithMatchOnlyInRoot() throws Exception {
public void testHierarchicalNamesWithMatchOnlyInRoot() {
List<String> names = Arrays.asList(
BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.listableBeanFactory, IndexedTestBean.class));
assertThat(names.size()).isEqualTo(1);
@@ -118,7 +117,7 @@ public void testHierarchicalNamesWithMatchOnlyInRoot() throws Exception {
}

@Test
public void testGetBeanNamesForTypeWithOverride() throws Exception {
public void testGetBeanNamesForTypeWithOverride() {
List<String> names = Arrays.asList(
BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.listableBeanFactory, ITestBean.class));
// includes 2 TestBeans from FactoryBeans (DummyFactory definitions)
@@ -236,7 +235,7 @@ public void testFindsBeansOfTypeWithDefaultFactory() {
}

@Test
public void testHierarchicalResolutionWithOverride() throws Exception {
public void testHierarchicalResolutionWithOverride() {
Object test3 = this.listableBeanFactory.getBean("test3");
Object test = this.listableBeanFactory.getBean("test");

@@ -276,14 +275,14 @@ public void testHierarchicalResolutionWithOverride() throws Exception {
}

@Test
public void testHierarchicalNamesForAnnotationWithNoMatch() throws Exception {
public void testHierarchicalNamesForAnnotationWithNoMatch() {
List<String> names = Arrays.asList(
BeanFactoryUtils.beanNamesForAnnotationIncludingAncestors(this.listableBeanFactory, Override.class));
assertThat(names.size()).isEqualTo(0);
}

@Test
public void testHierarchicalNamesForAnnotationWithMatchOnlyInRoot() throws Exception {
public void testHierarchicalNamesForAnnotationWithMatchOnlyInRoot() {
List<String> names = Arrays.asList(
BeanFactoryUtils.beanNamesForAnnotationIncludingAncestors(this.listableBeanFactory, TestAnnotation.class));
assertThat(names.size()).isEqualTo(1);
@@ -293,7 +292,7 @@ public void testHierarchicalNamesForAnnotationWithMatchOnlyInRoot() throws Excep
}

@Test
public void testGetBeanNamesForAnnotationWithOverride() throws Exception {
public void testGetBeanNamesForAnnotationWithOverride() {
AnnotatedBean annotatedBean = new AnnotatedBean();
this.listableBeanFactory.registerSingleton("anotherAnnotatedBean", annotatedBean);
List<String> names = Arrays.asList(
@@ -433,6 +432,7 @@ public void isSingletonAndIsPrototypeWithStaticFactory() {
String basePackage() default "";
}


@Retention(RetentionPolicy.RUNTIME)
@ControllerAdvice
@interface RestControllerAdvice {
@@ -444,18 +444,23 @@ public void isSingletonAndIsPrototypeWithStaticFactory() {
String basePackage() default "";
}


@ControllerAdvice("com.example")
static class ControllerAdviceClass {
}


@RestControllerAdvice("com.example")
static class RestControllerAdviceClass {
}


static class TestBeanSmartFactoryBean implements SmartFactoryBean<TestBean> {

private final TestBean testBean = new TestBean("enigma", 42);

private final boolean singleton;

private final boolean prototype;

TestBeanSmartFactoryBean(boolean singleton, boolean prototype) {
@@ -478,7 +483,7 @@ public Class<TestBean> getObjectType() {
return TestBean.class;
}

public TestBean getObject() throws Exception {
public TestBean getObject() {
// We don't really care if the actual instance is a singleton or prototype
// for the tests that use this factory.
return this.testBean;
Loading