john hai 9 meses
achega
1e47c62b5b
Modificáronse 100 ficheiros con 6718 adicións e 0 borrados
  1. BIN=BIN
      .DS_Store
  2. BIN=BIN
      mybatis/.DS_Store
  3. 8 0
      mybatis/.idea/.gitignore
  4. 13 0
      mybatis/.idea/compiler.xml
  5. 20 0
      mybatis/.idea/jarRepositories.xml
  6. 14 0
      mybatis/.idea/misc.xml
  7. 2 0
      mybatis/mybatis.iml
  8. 56 0
      mybatis/pom.xml
  9. 13 0
      mybatis/src/main/java/com/admin/AdminApplication.java
  10. 24 0
      mybatis/src/main/java/com/admin/controller/UserController.java
  11. 10 0
      mybatis/src/main/java/com/admin/mapper/UserMapper.java
  12. 31 0
      mybatis/src/main/java/com/admin/pojo/Users.java
  13. 10 0
      mybatis/src/main/java/com/admin/service/UserService.java
  14. 25 0
      mybatis/src/main/java/com/admin/service/impl/UserServiceImpl.java
  15. 17 0
      mybatis/src/main/resources/application.yml
  16. 10 0
      mybatis/src/main/resources/mapper/UsersMappper.xml
  17. 17 0
      mybatis/target/classes/application.yml
  18. BIN=BIN
      mybatis/target/classes/com/admin/AdminApplication.class
  19. BIN=BIN
      mybatis/target/classes/com/admin/controller/UserController.class
  20. BIN=BIN
      mybatis/target/classes/com/admin/mapper/UserMapper.class
  21. BIN=BIN
      mybatis/target/classes/com/admin/pojo/Users.class
  22. BIN=BIN
      mybatis/target/classes/com/admin/service/UserService.class
  23. BIN=BIN
      mybatis/target/classes/com/admin/service/impl/UserServiceImpl.class
  24. 10 0
      mybatis/target/classes/mapper/UsersMappper.xml
  25. 11 0
      spring-5.2.9.RELEASE.pom.txt
  26. BIN=BIN
      spring-framework-5.2.12.RELEASE.zip
  27. 10 0
      spring-framework-5.2.12.RELEASE/.editorconfig
  28. 16 0
      spring-framework-5.2.12.RELEASE/.gitattributes
  29. 17 0
      spring-framework-5.2.12.RELEASE/.github/ISSUE_TEMPLATE.md
  30. 10 0
      spring-framework-5.2.12.RELEASE/.github/workflows/gradle-wrapper-validation.yml
  31. 43 0
      spring-framework-5.2.12.RELEASE/.gitignore
  32. 23 0
      spring-framework-5.2.12.RELEASE/.mailmap
  33. 44 0
      spring-framework-5.2.12.RELEASE/CODE_OF_CONDUCT.adoc
  34. 134 0
      spring-framework-5.2.12.RELEASE/CONTRIBUTING.md
  35. 202 0
      spring-framework-5.2.12.RELEASE/LICENSE.txt
  36. 30 0
      spring-framework-5.2.12.RELEASE/README.md
  37. 11 0
      spring-framework-5.2.12.RELEASE/SECURITY.md
  38. 412 0
      spring-framework-5.2.12.RELEASE/build.gradle
  39. 41 0
      spring-framework-5.2.12.RELEASE/buildSrc/README.md
  40. 30 0
      spring-framework-5.2.12.RELEASE/buildSrc/build.gradle
  41. 1 0
      spring-framework-5.2.12.RELEASE/buildSrc/gradle.properties
  42. 1 0
      spring-framework-5.2.12.RELEASE/buildSrc/settings.gradle
  43. 115 0
      spring-framework-5.2.12.RELEASE/buildSrc/src/main/java/org/springframework/build/api/ApiDiffPlugin.java
  44. 106 0
      spring-framework-5.2.12.RELEASE/buildSrc/src/main/java/org/springframework/build/compile/CompilerConventionsPlugin.java
  45. 64 0
      spring-framework-5.2.12.RELEASE/buildSrc/src/main/java/org/springframework/build/optional/OptionalDependenciesPlugin.java
  46. 29 0
      spring-framework-5.2.12.RELEASE/framework-bom/framework-bom.gradle
  47. 4 0
      spring-framework-5.2.12.RELEASE/gradle.properties
  48. 18 0
      spring-framework-5.2.12.RELEASE/gradle/build-cache-settings.gradle
  49. 16 0
      spring-framework-5.2.12.RELEASE/gradle/build-scan-user-data.gradle
  50. 80 0
      spring-framework-5.2.12.RELEASE/gradle/custom-java-home.gradle
  51. 285 0
      spring-framework-5.2.12.RELEASE/gradle/docs.gradle
  52. 119 0
      spring-framework-5.2.12.RELEASE/gradle/ide.gradle
  53. 55 0
      spring-framework-5.2.12.RELEASE/gradle/publications.gradle
  54. 71 0
      spring-framework-5.2.12.RELEASE/gradle/spring-module.gradle
  55. BIN=BIN
      spring-framework-5.2.12.RELEASE/gradle/wrapper/gradle-wrapper.jar
  56. 5 0
      spring-framework-5.2.12.RELEASE/gradle/wrapper/gradle-wrapper.properties
  57. 188 0
      spring-framework-5.2.12.RELEASE/gradlew
  58. 100 0
      spring-framework-5.2.12.RELEASE/gradlew.bat
  59. 52 0
      spring-framework-5.2.12.RELEASE/import-into-eclipse.md
  60. 36 0
      spring-framework-5.2.12.RELEASE/import-into-idea.md
  61. 30 0
      spring-framework-5.2.12.RELEASE/integration-tests/integration-tests.gradle
  62. 119 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerAdviceOrderIntegrationTests.java
  63. 137 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java
  64. 318 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java
  65. 233 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AspectJAutoProxyAdviceOrderIntegrationTests.java
  66. 44 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/Component.java
  67. 63 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentBeanDefinitionParser.java
  68. 81 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentBeanDefinitionParserTests.java
  69. 56 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentFactoryBean.java
  70. 25 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentNamespaceHandler.java
  71. 136 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java
  72. 405 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java
  73. 341 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java
  74. 710 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java
  75. 40 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java
  76. 26 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan1/Config.java
  77. 32 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan1/DevConfig.java
  78. 32 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan1/ProdConfig.java
  79. 25 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan2/DevBean.java
  80. 26 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan2/ProdBean.java
  81. 111 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java
  82. 63 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/expression/spel/support/Spr7538Tests.java
  83. 250 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java
  84. 331 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java
  85. 129 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java
  86. 1 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/META-INF/spring.handlers
  87. 1 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/META-INF/spring.schemas
  88. 13 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/log4j2-test.xml
  89. 23 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceOrderIntegrationTests-afterFirst.xml
  90. 23 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceOrderIntegrationTests-afterLast.xml
  91. 31 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml
  92. 107 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml
  93. 17 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/beans/factory/xml/component-config.xml
  94. 19 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/beans/factory/xml/component.xsd
  95. 20 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml
  96. 9 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml
  97. 9 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml
  98. 11 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml
  99. 10 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/transaction/annotation/enable-caching.xml
  100. 2 0
      spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/util/testlog4j.properties

BIN=BIN
.DS_Store


BIN=BIN
mybatis/.DS_Store


+ 8 - 0
mybatis/.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/../../../../../:\code\java\mybatis\.idea/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/

+ 13 - 0
mybatis/.idea/compiler.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="mybatis" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>

+ 20 - 0
mybatis/.idea/jarRepositories.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://repo.maven.apache.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+  </component>
+</project>

+ 14 - 0
mybatis/.idea/misc.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 2 - 0
mybatis/mybatis.iml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4" />

+ 56 - 0
mybatis/pom.xml

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.example</groupId>
+    <artifactId>mybatis</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+    <dependencies>
+        <!--1.添加 Spring 启动依赖-->
+        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-dependencies</artifactId>
+            <version>2.3.7.RELEASE</version>
+            <type>pom</type>
+            <scope>provided</scope>
+        </dependency>
+        <!--2.添加 Spring MVC 启动依赖-->
+        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>2.3.7.RELEASE</version>
+        </dependency>
+        <!--2.添加 mybatis 启动依赖-->
+        <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.1.2</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>42.2.18</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis-spring</artifactId>
+            <version>2.0.5</version>
+        </dependency>
+
+    </dependencies>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+</project>

+ 13 - 0
mybatis/src/main/java/com/admin/AdminApplication.java

@@ -0,0 +1,13 @@
+package com.admin;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@MapperScan("com.admin.mapper")
+public class AdminApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(AdminApplication.class);
+    }
+}

+ 24 - 0
mybatis/src/main/java/com/admin/controller/UserController.java

@@ -0,0 +1,24 @@
+package com.admin.controller;
+
+
+import com.admin.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+//@Controller
+@RestController
+public class UserController {
+
+    @Autowired
+    private UserService userService;
+
+    public void setUserService(UserService userService) {
+        this.userService = userService;
+    }
+
+    @RequestMapping("/show")
+    public String Show() {
+        return "hello";
+    }
+}

+ 10 - 0
mybatis/src/main/java/com/admin/mapper/UserMapper.java

@@ -0,0 +1,10 @@
+package com.admin.mapper;
+
+import com.admin.pojo.Users;
+
+import java.util.List;
+
+public interface UserMapper {
+
+    List<Users> selectAll();
+}

+ 31 - 0
mybatis/src/main/java/com/admin/pojo/Users.java

@@ -0,0 +1,31 @@
+package com.admin.pojo;
+
+public class Users {
+    private int id;
+    private String name;
+    private String password;
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

+ 10 - 0
mybatis/src/main/java/com/admin/service/UserService.java

@@ -0,0 +1,10 @@
+package com.admin.service;
+
+import com.admin.pojo.Users;
+
+import java.util.List;
+
+public interface UserService {
+
+    List<Users> selectAll();
+}

+ 25 - 0
mybatis/src/main/java/com/admin/service/impl/UserServiceImpl.java

@@ -0,0 +1,25 @@
+package com.admin.service.impl;
+
+import com.admin.mapper.UserMapper;
+import com.admin.pojo.Users;
+import com.admin.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class UserServiceImpl implements UserService {
+
+    @Autowired
+    public UserMapper userMapper;
+
+    public void setUserMapper(UserMapper userMapper) {
+        this.userMapper = userMapper;
+    }
+
+    @Override
+    public List<Users> selectAll() {
+        return userMapper.selectAll();
+    }
+}

+ 17 - 0
mybatis/src/main/resources/application.yml

@@ -0,0 +1,17 @@
+#spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
+#spring.datasource.username=postgres
+#spring.datasource.password=123456
+#spring.datasource.driverClassName=org.postgresql.Driver
+#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+#spring.jpa.properties.hibernate.hbm2ddl.auto=update
+
+server:
+  port: 8866
+spring:
+  datasource:
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://localhost:5432/postgres
+    username: postgres
+    password: 123456
+mybatis:
+  mapper-locations: classpath:mapper/*.xml

+ 10 - 0
mybatis/src/main/resources/mapper/UsersMappper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.admin.mapper.UserMapper">
+    <select id="selectAll" parameterType="Integer" resultType="com.admin.pojo.Users">
+        select *
+        from user01
+    </select>
+</mapper>

+ 17 - 0
mybatis/target/classes/application.yml

@@ -0,0 +1,17 @@
+#spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
+#spring.datasource.username=postgres
+#spring.datasource.password=123456
+#spring.datasource.driverClassName=org.postgresql.Driver
+#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+#spring.jpa.properties.hibernate.hbm2ddl.auto=update
+
+server:
+  port: 8866
+spring:
+  datasource:
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://localhost:5432/postgres
+    username: postgres
+    password: 123456
+mybatis:
+  mapper-locations: classpath:mapper/*.xml

BIN=BIN
mybatis/target/classes/com/admin/AdminApplication.class


BIN=BIN
mybatis/target/classes/com/admin/controller/UserController.class


BIN=BIN
mybatis/target/classes/com/admin/mapper/UserMapper.class


BIN=BIN
mybatis/target/classes/com/admin/pojo/Users.class


BIN=BIN
mybatis/target/classes/com/admin/service/UserService.class


BIN=BIN
mybatis/target/classes/com/admin/service/impl/UserServiceImpl.class


+ 10 - 0
mybatis/target/classes/mapper/UsersMappper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.admin.mapper.UserMapper">
+    <select id="selectAll" parameterType="Integer" resultType="com.admin.pojo.Users">
+        select *
+        from user01
+    </select>
+</mapper>

+ 11 - 0
spring-5.2.9.RELEASE.pom.txt

@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+Version: BCPG v1.53
+
+iQEcBAABCAAGBQJfYH78AAoJEJosepjkV8U9HTYH/jdqglOInyt/ltPxT2oM76n5
+bLSuqf8DWVRe62JazLKcbPKRJSgbSiJxTUhO5WEq8eigE2XIDFAEqFF+Ghini2vd
+VC7ElQoQRaE/QDhpoqJ+Kc/J33F6ovq+5poxcEVNz/t/yIKmiKnHatnucV2DkO+E
+6fQeh0FyDaDN5hSQNbAbeuP8w4FO1dx0R0m30c7b/ksD6fS5FVEcA79LMq3isDMR
+42Tx62jeinUJyUEZGb27Ww2bUZQ7dwc6ddV4Yv1XsuLacYSo7twDtBAnPywNoPvt
+DeYArVUqscHqNGKFmMoEFjra31yMA5XF2tOUsbnGmYqBlA5WFbOET8SykiaYXmE=
+=y+zC
+-----END PGP SIGNATURE-----

BIN=BIN
spring-framework-5.2.12.RELEASE.zip


+ 10 - 0
spring-framework-5.2.12.RELEASE/.editorconfig

@@ -0,0 +1,10 @@
+root = true
+
+[*.{adoc,bat,groovy,html,java,js,jsp,kt,kts,md,properties,py,rb,sh,sql,svg,txt,xml,xsd}]
+charset = utf-8
+
+[*.{groovy,java,kt,kts,xml,xsd}]
+indent_style = tab
+indent_size = 4
+continuation_indent_size = 8
+end_of_line = lf

+ 16 - 0
spring-framework-5.2.12.RELEASE/.gitattributes

@@ -0,0 +1,16 @@
+# Normalize line endings to LF.
+* text eol=lf
+
+# Ensure that line endings for multipart files in spring-web are not modified.
+*.multipart -text
+
+# Ensure that line endings for DOS batch files are not modified.
+*.bat -text
+
+# Ensure the following are treated as binary.
+*.gif   binary
+*.jar   binary
+*.jpeg  binary
+*.jpg   binary
+*.png   binary
+*.vsd   binary

+ 17 - 0
spring-framework-5.2.12.RELEASE/.github/ISSUE_TEMPLATE.md

@@ -0,0 +1,17 @@
+<!--
+!!! For Security Vulnerabilities, please go to https://pivotal.io/security !!!
+-->
+**Affects:** \<Spring Framework version>
+
+---
+<!--
+Thanks for taking the time to create an issue. Please read the following:
+
+- Questions should be asked on Stack Overflow.
+- For bugs, specify affected versions and explain what you are trying to do.
+- For enhancements, provide context and describe the problem.
+
+Issue or Pull Request? Create only one, not both. GitHub treats them as the same.
+If unsure, start with an issue, and if you submit a pull request later, the
+issue will be closed as superseded.
+-->

+ 10 - 0
spring-framework-5.2.12.RELEASE/.github/workflows/gradle-wrapper-validation.yml

@@ -0,0 +1,10 @@
+name: "Validate Gradle Wrapper"
+on: [push, pull_request]
+
+jobs:
+  validation:
+    name: "Validation"
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: gradle/wrapper-validation-action@v1

+ 43 - 0
spring-framework-5.2.12.RELEASE/.gitignore

@@ -0,0 +1,43 @@
+*.java.hsp
+*.sonarj
+*.sw*
+.DS_Store
+.settings
+.springBeans
+bin
+build.sh
+integration-repo
+ivy-cache
+jxl.log
+jmx.log
+derby.log
+spring-test/test-output/
+.gradle
+argfile*
+pom.xml
+activemq-data/
+
+classes/
+/build
+buildSrc/build
+/spring-*/build
+/spring-core/kotlin-coroutines/build
+/framework-bom/build
+/integration-tests/build
+/src/asciidoc/build
+target/
+
+# Eclipse artifacts, including WTP generated manifests
+.classpath
+.project
+spring-*/src/main/java/META-INF/MANIFEST.MF
+
+# IDEA artifacts and output dirs
+*.iml
+*.ipr
+*.iws
+.idea
+out
+test-output
+atlassian-ide-plugin.xml
+.gradletasknamecache

+ 23 - 0
spring-framework-5.2.12.RELEASE/.mailmap

@@ -0,0 +1,23 @@
+Juergen Hoeller <jhoeller@pivotal.io> jhoeller <jhoeller@vmware.com>
+<jhoeller@pivotal.io> <jhoeller@vmware.com>
+<jhoeller@pivotal.io> <jhoeller@gopivotal.com>
+<rstoyanchev@pivotal.io> <rstoyanchev@vmware.com>
+<rstoyanchev@pivotal.io> <rstoyanchev@gopivotal.com>
+<pwebb@pivotal.io> <pwebb@vmware.com>
+<pwebb@pivotal.io> <pwebb@gopivotal.com>
+<cbeams@pivotal.io> <cbeams@vmware.com>
+<cbeams@pivotal.io> <cbeams@gopivotal.com>
+<cbeams@pivotal.io> <cbeams@gmail.com>
+<apoutsma@pivotal.io> <apoutsma@vmware.com>
+<apoutsma@pivotal.io> <apoutsma@gopivotal.com>
+<apoutsma@pivotal.io> <poutsma@mac.com>
+<ogierke@pivotal.io> <ogierke@vmware.com>
+<ogierke@pivotal.io> <ogierke@gopivotal.com>
+<dsyer@pivotal.io> <dsyer@vmware.com>
+<dsyer@pivotal.io> <dsyer@gopivotal.com>
+<dsyer@pivotal.io> <david_syer@hotmail.com>
+<aclement@pivotal.io> <aclement@vmware.com>
+<aclement@pivotal.io> <aclement@gopivotal.com>
+<aclement@pivotal.io> <andrew.clement@gmail.com>
+<dmitry.katsubo@gmail.com> <dmitry.katsubo@gmai.com>
+Nick Williams <nicholas@nicholaswilliams.net> Nicholas Williams <nicholas@nicholaswilliams.net>

+ 44 - 0
spring-framework-5.2.12.RELEASE/CODE_OF_CONDUCT.adoc

@@ -0,0 +1,44 @@
+= Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of fostering an open
+and welcoming community, we pledge to respect all people who contribute through reporting
+issues, posting feature requests, updating documentation, submitting pull requests or
+patches, and other activities.
+
+We are committed to making participation in this project a harassment-free experience for
+everyone, regardless of level of experience, gender, gender identity and expression,
+sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
+religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information, such as physical or electronic addresses,
+  without explicit permission
+* Other unethical or unprofessional conduct
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments,
+commits, code, wiki edits, issues, and other contributions that are not aligned to this
+Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors
+that they deem inappropriate, threatening, offensive, or harmful.
+
+By adopting this Code of Conduct, project maintainers commit themselves to fairly and
+consistently applying these principles to every aspect of managing this project. Project
+maintainers who do not follow or enforce the Code of Conduct may be permanently removed
+from the project team.
+
+This Code of Conduct applies both within project spaces and in public spaces when an
+individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
+contacting a project maintainer at spring-code-of-conduct@pivotal.io . All complaints will
+be reviewed and investigated and will result in a response that is deemed necessary and
+appropriate to the circumstances. Maintainers are obligated to maintain confidentiality
+with regard to the reporter of an incident.
+
+This Code of Conduct is adapted from the
+https://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at
+https://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/]

+ 134 - 0
spring-framework-5.2.12.RELEASE/CONTRIBUTING.md

@@ -0,0 +1,134 @@
+# Contributing  to the Spring Framework
+
+First off, thank you for taking the time to contribute! :+1: :tada: 
+
+### Table of Contents
+
+* [Code of Conduct](#code-of-conduct)
+* [How to Contribute](#how-to-contribute)
+  * [Discuss](#discuss)
+  * [Create an Issue](#create-an-issue)
+  * [Issue Lifecycle](#issue-lifecycle)
+  * [Submit a Pull Request](#submit-a-pull-request)
+* [Build from Source](#build-from-source)
+* [Source Code Style](#source-code-style)
+* [Reference Docs](#reference-docs)
+
+### Code of Conduct
+
+This project is governed by the [Spring Code of Conduct](CODE_OF_CONDUCT.adoc).
+By participating you are expected to uphold this code.
+Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
+
+### How to Contribute
+
+#### Discuss
+
+If you have a question, check Stack Overflow using
+[this list of tags](https://stackoverflow.com/questions/tagged/spring+or+spring-mvc+or+spring-aop+or+spring-jdbc+or+spring-transactions+or+spring-annotations+or+spring-jms+or+spring-el+or+spring-test+or+spring+or+spring-remoting+or+spring-orm+or+spring-jmx+or+spring-cache+or+spring-webflux?tab=Newest).
+Find an existing discussion, or start a new one if necessary.
+
+If you believe there is an issue, search through
+[existing issues](https://github.com/spring-projects/spring-framework/issues) trying a
+few different ways to find discussions, past or current, that are related to the issue.
+Reading those discussions helps you to learn about the issue, and helps us to make a
+decision.
+
+
+#### Create an Issue
+
+Reporting an issue or making a feature request is a great way to contribute. Your feedback
+and the conversations that result from it provide a continuous flow of ideas. However,
+before creating a ticket, please take the time to [discuss and research](#discuss) first.
+
+If creating an issue after a discussion on Stack Overflow, please provide a description
+in the issue instead of simply referring to Stack Overflow. The issue tracker is an
+important place of record for design discussions and should be self-sufficient.
+
+Once you're ready, create an issue on
+[GitHub](https://github.com/spring-projects/spring-framework/issues).
+
+#### Issue Lifecycle
+
+When an issue is first created, it is flagged `waiting-for-triage` waiting for a team
+member to triage it. Once the issue has been reviewed, the team may ask for further
+information if needed, and based on the findings, the issue is either assigned a target
+milestone or is closed with a specific status.
+
+When a fix is ready, the issue is closed and may still be re-opened until the fix is
+released. After that the issue will typically no longer be reopened. In rare cases if the
+issue was not at all fixed, the issue may be re-opened. In most cases however any
+follow-up reports will need to be created as new issues with a fresh description.
+
+#### Submit a Pull Request
+
+1. If you have not previously done so, please sign the
+[Contributor License Agreement](https://cla.pivotal.io/sign/spring). You will be reminded
+automatically when you submit the PR.
+
+1. Should you create an issue first? No, just create the pull request and use the
+description to provide context and motivation, as you would for an issue. If you want
+to start a discussion first or have already created an issue, once a pull request is
+created, we will close the issue as superseded by the pull request, and the discussion
+about the issue will continue under the pull request.
+
+1. Always check out the `master` branch and submit pull requests against it
+(for target version see [settings.gradle](settings.gradle)).
+Backports to prior versions will be considered on a case-by-case basis and reflected as
+the fix version in the issue tracker.
+
+1. Choose the granularity of your commits consciously and squash commits that represent
+multiple edits or corrections of the same logical change. See
+[Rewriting History section of Pro Git](https://git-scm.com/book/en/Git-Tools-Rewriting-History)
+for an overview of streamlining the commit history.
+
+1. Format commit messages using 55 characters for the subject line, 72 characters per line
+for the description, followed by the issue fixed, e.g. `Closes gh-22276`. See the
+[Commit Guidelines section of Pro Git](https://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines)
+for best practices around commit messages, and use `git log` to see some examples.
+
+1. If there is a prior issue, reference the GitHub issue number in the description of the
+pull request.
+
+If accepted, your contribution may be heavily modified as needed prior to merging.
+You will likely retain author attribution for your Git commits granted that the bulk of
+your changes remain intact. You may also be asked to rework the submission.
+
+If asked to make corrections, simply push the changes against the same branch, and your
+pull request will be updated. In other words, you do not need to create a new pull request
+when asked to make changes.
+
+#### Participate in Reviews
+
+Helping to review pull requests is another great way to contribute. Your feedback
+can help to shape the implementation of new features. When reviewing pull requests,
+however, please refrain from approving or rejecting a PR unless you are a core
+committer for the Spring Framework.
+
+### Build from Source
+
+See the [Build from Source](https://github.com/spring-projects/spring-framework/wiki/Build-from-Source)
+wiki page for instructions on how to check out, build, and import the Spring Framework
+source code into your IDE.
+
+### Source Code Style
+
+The wiki pages
+[Code Style](https://github.com/spring-projects/spring-framework/wiki/Code-Style) and
+[IntelliJ IDEA Editor Settings](https://github.com/spring-projects/spring-framework/wiki/IntelliJ-IDEA-Editor-Settings)
+define the source file coding standards we use along with some IDEA editor settings we customize.
+
+### Reference Docs
+
+The reference documentation is in the [src/docs/asciidoc](src/docs/asciidoc) directory, in
+[Asciidoctor](https://asciidoctor.org/) format. For trivial changes, you may be able to browse,
+edit source files, and submit directly from GitHub.
+
+When making changes locally, execute `./gradlew asciidoctor` and then browse the result under
+`build/asciidoc/html5/index.html`.
+
+Asciidoctor also supports live editing. For more details read
+[Editing AsciiDoc with Live Preview](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/).
+Note that if you choose the
+[System Monitor](https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/#using-a-system-monitor)
+option, you can find a Guardfile under `src/docs/asciidoc`.

+ 202 - 0
spring-framework-5.2.12.RELEASE/LICENSE.txt

@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        https://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   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.

+ 30 - 0
spring-framework-5.2.12.RELEASE/README.md

@@ -0,0 +1,30 @@
+# <img src="src/docs/asciidoc/images/spring-framework.png" width="80" height="80"> Spring Framework [![Build Status](https://build.spring.io/plugins/servlet/wittified/build-status/SPR-PUBM)](https://build.spring.io/browse/SPR)
+
+This is the home of the Spring Framework: the foundation for all [Spring projects](https://spring.io/projects). Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring". 
+
+Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the [Overview](https://docs.spring.io/spring/docs/current/spring-framework-reference/overview.html#spring-introduction) section as reference for a more complete introduction.
+
+## Code of Conduct
+
+This project is governed by the [Spring Code of Conduct](CODE_OF_CONDUCT.adoc). By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
+
+## Access to Binaries
+
+For access to artifacts or a distribution zip, see the [Spring Framework Artifacts](https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Artifacts) wiki page.
+
+## Documentation
+
+The Spring Framework maintains reference documentation ([published](https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/) and [source](src/docs/asciidoc)), Github [wiki pages](https://github.com/spring-projects/spring-framework/wiki), and an
+[API reference](https://docs.spring.io/spring-framework/docs/current/javadoc-api/). There are also [guides and tutorials](https://spring.io/guides) across Spring projects.
+
+## Build from Source
+
+See the [Build from Source](https://github.com/spring-projects/spring-framework/wiki/Build-from-Source) Wiki page and the [CONTRIBUTING.md](CONTRIBUTING.md) file.
+
+## Stay in Touch
+
+Follow [@SpringCentral](https://twitter.com/springcentral), [@SpringFramework](https://twitter.com/springframework), and its [team members](https://twitter.com/springframework/lists/team/members) on Twitter. In-depth articles can be found at [The Spring Blog](https://spring.io/blog/), and releases are announced via our [news feed](https://spring.io/blog/category/news).
+
+## License
+
+The Spring Framework is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).

+ 11 - 0
spring-framework-5.2.12.RELEASE/SECURITY.md

@@ -0,0 +1,11 @@
+# Security Policy
+
+## Supported Versions
+
+Please see the
+[Spring Framework Versions](https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions)
+wiki page.
+
+## Reporting a Vulnerability
+
+Please see https://pivotal.io/security.

+ 412 - 0
spring-framework-5.2.12.RELEASE/build.gradle

@@ -0,0 +1,412 @@
+plugins {
+	id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
+	id 'io.spring.gradle-enterprise-conventions' version '0.0.2'
+	id 'io.spring.nohttp' version '0.0.5.RELEASE'
+	id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false
+	id 'org.jetbrains.dokka' version '0.10.1' apply false
+	id 'org.asciidoctor.jvm.convert' version '2.4.0'
+	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
+}
+
+apply from: "$rootDir/gradle/build-scan-user-data.gradle"
+ext {
+	moduleProjects = subprojects.findAll { it.name.startsWith("spring-") }
+	javaProjects = subprojects - project(":framework-bom")
+	withoutJclOverSlf4j = {
+		exclude group: "org.slf4j", name: "jcl-over-slf4j"
+	}
+}
+
+configure(allprojects) { project ->
+	apply plugin: "io.spring.dependency-management"
+
+	dependencyManagement {
+		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-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"
+			mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.5"
+			mavenBom "org.junit:junit-bom:5.6.3"
+		}
+		dependencies {
+			dependencySet(group: 'org.apache.logging.log4j', version: '2.13.3') {
+				entry 'log4j-api'
+				entry 'log4j-core'
+				entry 'log4j-jul'
+				entry 'log4j-slf4j-impl'
+			}
+			dependency "org.slf4j:slf4j-api:1.7.30"
+			dependency "com.google.code.findbugs:jsr305:3.0.2"
+
+			dependencySet(group: 'org.aspectj', version: '1.9.6') {
+				entry 'aspectjrt'
+				entry 'aspectjtools'
+				entry 'aspectjweaver'
+			}
+			dependencySet(group: 'org.codehaus.groovy', version: '2.5.13') {
+				entry 'groovy'
+				entry 'groovy-jsr223'
+				entry 'groovy-templates'
+				entry 'groovy-test'
+				entry 'groovy-xml'
+			}
+
+			dependency "io.reactivex:rxjava:1.3.8"
+			dependency "io.reactivex:rxjava-reactive-streams:1.2.1"
+			dependency "io.reactivex.rxjava2:rxjava:2.2.19"
+			dependency "io.projectreactor.tools:blockhound:1.0.4.RELEASE"
+
+			dependency "com.caucho:hessian:4.0.63"
+			dependency "com.fasterxml:aalto-xml:1.2.2"
+			dependency("com.fasterxml.woodstox:woodstox-core:6.2.3") {
+				exclude group: "stax", name: "stax-api"
+			}
+			dependency "com.google.code.gson:gson:2.8.6"
+			dependency "com.google.protobuf:protobuf-java-util:3.11.4"
+			dependency "com.googlecode.protobuf-java-format:protobuf-java-format:1.4"
+			dependency("com.thoughtworks.xstream:xstream:1.4.11.1") {
+				exclude group: "xpp3", name: "xpp3_min"
+				exclude group: "xmlpull", name: "xmlpull"
+			}
+			dependency "org.apache.johnzon:johnzon-jsonb:1.2.8"
+			dependency("org.codehaus.jettison:jettison:1.3.8") {
+				exclude group: "stax", name: "stax-api"
+			}
+			dependencySet(group: 'org.jibx', version: '1.3.3') {
+				entry 'jibx-bind'
+				entry 'jibx-run'
+			}
+			dependency "org.ogce:xpp3:1.1.6"
+			dependency "org.yaml:snakeyaml:1.27"
+
+			dependency "com.h2database:h2:1.4.200"
+			dependency "com.github.ben-manes.caffeine:caffeine:2.8.6"
+			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"
+			dependency "net.sf.jopt-simple:jopt-simple:5.0.4"
+			dependencySet(group: 'org.apache.activemq', version: '5.8.0') {
+				entry 'activemq-broker'
+				entry('activemq-kahadb-store') {
+					exclude group: "org.springframework", name: "spring-context"
+				}
+				entry 'activemq-stomp'
+			}
+			dependency "org.apache.bcel:bcel:6.0"
+			dependency "org.apache.commons:commons-pool2:2.8.1"
+			dependencySet(group: 'org.apache.derby', version: '10.14.2.0') {
+				entry 'derby'
+				entry 'derbyclient'
+			}
+			dependency "org.apache.poi:poi-ooxml:4.1.2"
+			dependency "org.apache-extras.beanshell:bsh:2.0b6"
+			dependency "org.freemarker:freemarker:2.3.30"
+			dependency "org.hsqldb:hsqldb:2.5.1"
+			dependency "org.quartz-scheduler:quartz:2.3.2"
+			dependency "org.codehaus.fabric3.api:commonj:1.1.0"
+			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.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"
+
+			dependencySet(group: 'org.apache.tomcat', version: '9.0.37') {
+				entry 'tomcat-util'
+				entry('tomcat-websocket') {
+					exclude group: "org.apache.tomcat", name: "tomcat-websocket-api"
+					exclude group: "org.apache.tomcat", name: "tomcat-servlet-api"
+				}
+			}
+			dependencySet(group: 'org.apache.tomcat.embed', version: '9.0.37') {
+				entry 'tomcat-embed-core'
+				entry 'tomcat-embed-websocket'
+			}
+			dependencySet(group: 'io.undertow', version: '2.0.32.Final') {
+				entry 'undertow-core'
+				entry('undertow-websockets-jsr') {
+					exclude group: "org.jboss.spec.javax.websocket", name: "jboss-websocket-api_1.1_spec"
+				}
+				entry('undertow-servlet') {
+					exclude group: "org.jboss.spec.javax.servlet", name: "jboss-servlet-api_3.1_spec"
+					exclude group: "org.jboss.spec.javax.annotation", name: "jboss-annotations-api_1.2_spec"
+				}
+			}
+
+			dependencySet(group: 'com.squareup.okhttp3', version: '3.14.9') {
+				entry 'okhttp'
+				entry 'mockwebserver'
+			}
+			dependency("org.apache.httpcomponents:httpclient:4.5.13") {
+				exclude group: "commons-logging", name: "commons-logging"
+			}
+			dependency("org.apache.httpcomponents:httpasyncclient:4.1.4") {
+				exclude group: "commons-logging", name: "commons-logging"
+			}
+			dependency "org.eclipse.jetty:jetty-reactive-httpclient:1.1.4"
+
+			dependency "org.jruby:jruby:9.2.11.1"
+			dependency "org.python:jython-standalone:2.7.1"
+			dependency "org.mozilla:rhino:1.7.11"
+
+			dependency "commons-fileupload:commons-fileupload:1.4"
+			dependency "org.synchronoss.cloud:nio-multipart-parser:1.1.0"
+
+			dependency("dom4j:dom4j:1.6.1") {
+				exclude group: "xml-apis", name: "xml-apis"
+			}
+			dependency("jaxen:jaxen:1.1.1") {
+				exclude group: "xml-apis", name: "xml-apis"
+				exclude group: "xom", name: "xom"
+				exclude group: "xerces", name: "xercesImpl"
+			}
+
+			dependency("junit:junit:4.12") {
+				exclude group: "org.hamcrest", name: "hamcrest-core"
+			}
+			dependency("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1") {
+				exclude group: "junit", name: "junit"
+			}
+			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.18.1"
+			dependencySet(group: 'org.xmlunit', version: '2.6.2') {
+				entry 'xmlunit-assertj'
+				entry('xmlunit-matchers') {
+					exclude group: "org.hamcrest", name: "hamcrest-core"
+				}
+			}
+			dependencySet(group: 'org.mockito', version: '3.3.3') {
+				entry('mockito-core') {
+					exclude group: "org.hamcrest", name: "hamcrest-core"
+				}
+				entry 'mockito-junit-jupiter'
+			}
+			dependency "io.mockk:mockk:1.10.2"
+
+			dependency("net.sourceforge.htmlunit:htmlunit:2.43.0") {
+				exclude group: "commons-logging", name: "commons-logging"
+			}
+			dependency("org.seleniumhq.selenium:htmlunit-driver:2.43.1") {
+				exclude group: "commons-logging", name: "commons-logging"
+			}
+			dependency("org.seleniumhq.selenium:selenium-java:3.141.59") {
+				exclude group: "commons-logging", name: "commons-logging"
+				exclude group: "io.netty", name: "netty"
+			}
+			dependency "org.skyscreamer:jsonassert:1.5.0"
+			dependency "com.jayway.jsonpath:json-path:2.4.0"
+
+			dependencySet(group: 'org.apache.tiles', version: '3.0.8') {
+				entry 'tiles-api'
+				entry('tiles-core', withoutJclOverSlf4j)
+				entry('tiles-servlet', withoutJclOverSlf4j)
+				entry('tiles-jsp', withoutJclOverSlf4j)
+				entry('tiles-el', withoutJclOverSlf4j)
+				entry('tiles-extras') {
+					exclude group: "org.springframework", name: "spring-web"
+					exclude group: "org.slf4j", name: "jcl-over-slf4j"
+				}
+			}
+			dependency("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") {
+				exclude group: "org.apache.taglibs", name: "taglibs-standard-spec"
+			}
+
+			dependency "com.ibm.websphere:uow:6.0.2.17"
+			dependency "com.jamonapi:jamon:2.82"
+			dependency "joda-time:joda-time:2.10.6"
+			dependency "org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.7"
+			dependency "org.javamoney:moneta:1.3"
+
+			dependency "com.sun.activation:javax.activation:1.2.0"
+			dependency "com.sun.mail:javax.mail:1.6.2"
+			dependencySet(group: 'com.sun.xml.bind', version: '2.3.0.1') {
+				entry 'jaxb-core'
+				entry 'jaxb-impl'
+				entry 'jaxb-xjc'
+			}
+
+			dependency "javax.activation:javax.activation-api:1.2.0"
+			dependency "javax.annotation:javax.annotation-api:1.3.2"
+			dependency "javax.cache:cache-api:1.1.0"
+			dependency "javax.ejb:javax.ejb-api:3.2"
+			dependency "javax.el:javax.el-api:3.0.1-b04"
+			dependency "javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0"
+			dependency "javax.faces:javax.faces-api:2.2"
+			dependency "javax.inject:javax.inject:1"
+			dependency "javax.inject:javax.inject-tck:1"
+			dependency "javax.interceptor:javax.interceptor-api:1.2.2"
+			dependency "javax.jms:javax.jms-api:2.0.1"
+			dependency "javax.json:javax.json-api:1.1.4"
+			dependency "javax.json.bind:javax.json.bind-api:1.0"
+			dependency "javax.mail:javax.mail-api:1.6.2"
+			dependency "javax.money:money-api:1.0.3"
+			dependency "javax.resource:javax.resource-api:1.7.1"
+			dependency "javax.servlet:javax.servlet-api:4.0.1"
+			dependency "javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02"
+			dependency "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1"
+			dependency "javax.transaction:javax.transaction-api:1.3"
+			dependency "javax.validation:validation-api:2.0.1.Final"
+			dependency "javax.websocket:javax.websocket-api:1.1"
+			dependency "javax.xml.bind:jaxb-api:2.3.1"
+			dependency "javax.xml.ws:jaxws-api:2.3.1"
+
+			dependency "org.eclipse.persistence:javax.persistence:2.2.0"
+
+			// Substitute for "javax.management:jmxremote_optional:1.0.1_04" which
+			// is not available on Maven Central
+			dependency "org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea"
+			dependency "org.glassfish:javax.el:3.0.1-b08"
+			dependency "org.glassfish.main:javax.jws:4.0-b33"
+			dependency "org.glassfish.tyrus:tyrus-container-servlet:1.13.1"
+		}
+		generatedPomCustomization {
+			enabled = false
+		}
+		resolutionStrategy {
+			cacheChangingModulesFor 0, "seconds"
+		}
+		repositories {
+			mavenCentral()
+			maven { url "https://repo.spring.io/libs-spring-framework-build" }
+		}
+	}
+	configurations.all {
+		resolutionStrategy {
+			cacheChangingModulesFor 0, "seconds"
+			cacheDynamicVersionsFor 0, "seconds"
+		}
+	}
+}
+
+configure([rootProject] + javaProjects) { project ->
+	group = "org.springframework"
+
+	apply plugin: "java"
+	apply plugin: "java-test-fixtures"
+	apply plugin: "checkstyle"
+	apply plugin: 'org.springframework.build.compile'
+	apply from: "${rootDir}/gradle/custom-java-home.gradle"
+	apply from: "${rootDir}/gradle/ide.gradle"
+
+	pluginManager.withPlugin("kotlin") {
+		apply plugin: "org.jetbrains.dokka"
+		compileKotlin {
+			kotlinOptions {
+				jvmTarget = "1.8"
+				freeCompilerArgs = ["-Xjsr305=strict"]
+				allWarningsAsErrors = true
+			}
+		}
+		compileTestKotlin {
+			kotlinOptions {
+				jvmTarget = "1.8"
+				freeCompilerArgs = ["-Xjsr305=strict"]
+			}
+		}
+	}
+
+	test {
+		useJUnitPlatform()
+		include(["**/*Tests.class", "**/*Test.class"])
+		systemProperty("java.awt.headless", "true")
+		systemProperty("testGroups", project.properties.get("testGroups"))
+		systemProperty("io.netty.leakDetection.level", "paranoid")
+	}
+
+	checkstyle {
+		toolVersion = "8.38"
+		configDir = rootProject.file("src/checkstyle")
+	}
+
+	dependencies {
+		testCompile("org.junit.jupiter:junit-jupiter-api")
+		testCompile("org.junit.jupiter:junit-jupiter-params")
+		testCompile("org.mockito:mockito-core")
+		testCompile("org.mockito:mockito-junit-jupiter")
+		testCompile("io.mockk:mockk")
+		testCompile("org.assertj:assertj-core")
+		// Pull in the latest JUnit 5 Launcher API to ensure proper support in IDEs.
+		testRuntime("org.junit.platform:junit-platform-launcher")
+		testRuntime("org.junit.jupiter:junit-jupiter-engine")
+		testRuntime("org.apache.logging.log4j:log4j-core")
+		testRuntime("org.apache.logging.log4j:log4j-slf4j-impl")
+		testRuntime("org.apache.logging.log4j:log4j-jul")
+		// JSR-305 only used for non-required meta-annotations
+		compileOnly("com.google.code.findbugs:jsr305")
+		testCompileOnly("com.google.code.findbugs:jsr305")
+		checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.15")
+	}
+
+	ext.javadocLinks = [
+			"https://docs.oracle.com/javase/8/docs/api/",
+			"https://docs.oracle.com/javaee/7/api/",
+			"https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/",  // CommonJ
+			"https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.javadoc.doc/web/apidocs/",
+			"https://glassfish.java.net/nonav/docs/v3/api/",
+			"https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
+			"https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
+			"https://tiles.apache.org/tiles-request/apidocs/",
+			"https://tiles.apache.org/framework/apidocs/",
+			"https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
+			"https://www.ehcache.org/apidocs/2.10.4/",
+			"https://www.quartz-scheduler.org/api/2.3.0/",
+			"https://fasterxml.github.io/jackson-core/javadoc/2.10/",
+			"https://fasterxml.github.io/jackson-databind/javadoc/2.10/",
+			"https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.10/",
+			"https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/",
+			"https://junit.org/junit4/javadoc/4.12/",
+			"https://junit.org/junit5/docs/5.6.3/api/"
+	] as String[]
+}
+
+configure(moduleProjects) { project ->
+	apply from: "${rootDir}/gradle/spring-module.gradle"
+}
+
+configure(rootProject) {
+	description = "Spring Framework"
+
+	apply plugin: "groovy"
+	apply plugin: "kotlin"
+	apply plugin: "io.spring.nohttp"
+	apply plugin: 'org.springframework.build.api-diff'
+	apply from: "${rootDir}/gradle/publications.gradle"
+	apply from: "${rootDir}/gradle/docs.gradle"
+
+	nohttp {
+		source.exclude "**/test-output/**"
+		allowlistFile = project.file("src/nohttp/allowlist.lines")
+		def rootPath = file(rootDir).toPath()
+		def projectDirs = allprojects.collect { it.projectDir } + "${rootDir}/buildSrc"
+		projectDirs.forEach { dir ->
+			[ 'bin', 'build', 'out', '.settings' ]
+				.collect { rootPath.relativize(new File(dir, it).toPath()) }
+				.forEach { source.exclude "$it/**" }
+			[ '.classpath', '.project' ]
+				.collect { rootPath.relativize(new File(dir, it).toPath()) }
+				.forEach { source.exclude "$it" }
+		}
+	}
+
+	publishing {
+		publications {
+			mavenJava(MavenPublication) {
+				artifact docsZip
+				artifact schemaZip
+				artifact distZip
+			}
+		}
+	}
+}

+ 41 - 0
spring-framework-5.2.12.RELEASE/buildSrc/README.md

@@ -0,0 +1,41 @@
+# Spring Framework Build
+
+This folder contains the custom plugins and conventions for the Spring Framework build.
+They are declared in the `build.gradle` file in this folder.
+
+## Build Conventions
+
+### Compiler conventions
+
+The `org.springframework.build.compile` plugin applies the Java compiler conventions to the build.
+By default, the build compiles sources with Java `1.8` source and target compatibility.
+You can test a different source compatibility version on the CLI with a project property like:
+
+```
+./gradlew test -PjavaSourceVersion=11
+```
+
+## Build Plugins
+
+## Optional dependencies
+
+The `org.springframework.build.optional-dependencies` plugin creates a new `optional`
+Gradle configuration - it adds the dependencies to the project's compile and runtime classpath
+but doesn't affect the classpath of dependent projects.
+This plugin does not provide a `provided` configuration, as the native `compileOnly` and `testCompileOnly`
+configurations are preferred.
+
+## API Diff
+
+This plugin uses the [Gradle JApiCmp](https://github.com/melix/japicmp-gradle-plugin) plugin
+to generate API Diff reports for each Spring Framework module. This plugin is applied once on the root
+project and creates tasks in each framework module. Unlike previous versions of this part of the build,
+there is no need for checking out a specific tag. The plugin will fetch the JARs we want to compare the
+current working version with. You can generate the reports for all modules or a single module:
+
+```
+./gradlew apiDiff -PbaselineVersion=5.1.0.RELEASE
+./gradlew :spring-core:apiDiff -PbaselineVersion=5.1.0.RELEASE
+```      
+
+The reports are located under `build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/`.

+ 30 - 0
spring-framework-5.2.12.RELEASE/buildSrc/build.gradle

@@ -0,0 +1,30 @@
+plugins {
+	id 'java-gradle-plugin'
+}
+
+repositories {
+	mavenCentral()
+	gradlePluginPortal()
+}
+
+dependencies {
+	implementation "me.champeau.gradle:japicmp-gradle-plugin:0.2.8"
+	implementation "com.google.guava:guava:28.2-jre" // required by japicmp-gradle-plugin
+}
+
+gradlePlugin {
+	plugins {
+		apiDiffPlugin {
+			id = "org.springframework.build.api-diff"
+			implementationClass = "org.springframework.build.api.ApiDiffPlugin"
+		}
+		compileConventionsPlugin {
+			id = "org.springframework.build.compile"
+			implementationClass = "org.springframework.build.compile.CompilerConventionsPlugin"
+		}
+		optionalDependenciesPlugin {
+			id = "org.springframework.build.optional-dependencies"
+			implementationClass = "org.springframework.build.optional.OptionalDependenciesPlugin"
+		}
+	}
+}

+ 1 - 0
spring-framework-5.2.12.RELEASE/buildSrc/gradle.properties

@@ -0,0 +1 @@
+org.gradle.caching=true

+ 1 - 0
spring-framework-5.2.12.RELEASE/buildSrc/settings.gradle

@@ -0,0 +1 @@
+apply from: "../gradle/build-cache-settings.gradle"

+ 115 - 0
spring-framework-5.2.12.RELEASE/buildSrc/src/main/java/org/springframework/build/api/ApiDiffPlugin.java

@@ -0,0 +1,115 @@
+/*
+ * Copyright 2002-2019 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.build.api;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Collections;
+import java.util.List;
+
+import me.champeau.gradle.japicmp.JapicmpPlugin;
+import me.champeau.gradle.japicmp.JapicmpTask;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.plugins.JavaBasePlugin;
+import org.gradle.api.plugins.JavaPlugin;
+import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
+import org.gradle.api.tasks.TaskProvider;
+import org.gradle.jvm.tasks.Jar;
+
+/**
+ * {@link Plugin} that applies the {@code "japicmp-gradle-plugin"}
+ * and create tasks for all subprojects, diffing the public API one by one
+ * and creating the reports in {@code "build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/"}.
+ * <p>{@code "./gradlew apiDiff -PbaselineVersion=5.1.0.RELEASE"} will output the
+ * reports for the API diff between the baseline version and the current one for all modules.
+ * You can limit the report to a single module with
+ * {@code "./gradlew :spring-core:apiDiff -PbaselineVersion=5.1.0.RELEASE"}.
+ *
+ * @author Brian Clozel
+ */
+public class ApiDiffPlugin implements Plugin<Project> {
+
+	public static final String TASK_NAME = "apiDiff";
+
+	private static final String BASELINE_VERSION_PROPERTY = "baselineVersion";
+
+	private static final List<String> PACKAGE_INCLUDES = Collections.singletonList("org.springframework.*");
+
+	@Override
+	public void apply(Project project) {
+		if (project.hasProperty(BASELINE_VERSION_PROPERTY) && project.equals(project.getRootProject())) {
+			project.getPluginManager().apply(JapicmpPlugin.class);
+			project.getPlugins().withType(JapicmpPlugin.class,
+					plugin -> applyApiDiffConventions(project));
+		}
+	}
+
+	private void applyApiDiffConventions(Project project) {
+		String baselineVersion = project.property(BASELINE_VERSION_PROPERTY).toString();
+		project.subprojects(subProject -> createApiDiffTask(baselineVersion, subProject));
+	}
+
+	private void createApiDiffTask(String baselineVersion, Project project) {
+		if (isProjectEligible(project)) {
+			JapicmpTask apiDiff = project.getTasks().create(TASK_NAME, JapicmpTask.class);
+			apiDiff.setDescription("Generates an API diff report with japicmp");
+			apiDiff.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
+
+			apiDiff.setOldClasspath(project.files(createBaselineConfiguration(baselineVersion, project)));
+			TaskProvider<Jar> jar = project.getTasks().withType(Jar.class).named("jar");
+			apiDiff.setNewArchives(project.getLayout().files(jar.get().getArchiveFile().get().getAsFile()));
+			apiDiff.setNewClasspath(getRuntimeClassPath(project));
+			apiDiff.setPackageIncludes(PACKAGE_INCLUDES);
+			apiDiff.setOnlyModified(true);
+			apiDiff.setIgnoreMissingClasses(true);
+			// Ignore Kotlin metadata annotations since they contain
+			// illegal HTML characters and fail the report generation
+			apiDiff.setAnnotationExcludes(Collections.singletonList("@kotlin.Metadata"));
+
+			apiDiff.setHtmlOutputFile(getOutputFile(baselineVersion, project));
+
+			apiDiff.dependsOn(project.getTasks().getByName("jar"));
+		}
+	}
+
+	private boolean isProjectEligible(Project project) {
+		return project.getPlugins().hasPlugin(JavaPlugin.class)
+				&& project.getPlugins().hasPlugin(MavenPublishPlugin.class);
+	}
+
+	private Configuration createBaselineConfiguration(String baselineVersion, Project project) {
+		String baseline = String.join(":",
+				project.getGroup().toString(), project.getName(), baselineVersion);
+		Dependency baselineDependency = project.getDependencies().create(baseline + "@jar");
+		return project.getRootProject().getConfigurations().detachedConfiguration(baselineDependency);
+	}
+
+	private Configuration getRuntimeClassPath(Project project) {
+		return project.getConfigurations().getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);
+	}
+
+	private File getOutputFile(String baseLineVersion, Project project) {
+		Path outDir = Paths.get(project.getRootProject().getBuildDir().getAbsolutePath(),
+				"reports", "api-diff",
+				baseLineVersion + "_to_" + project.getRootProject().getVersion());
+		return project.file(outDir.resolve(project.getName() + ".html").toString());
+	}
+
+}

+ 106 - 0
spring-framework-5.2.12.RELEASE/buildSrc/src/main/java/org/springframework/build/compile/CompilerConventionsPlugin.java

@@ -0,0 +1,106 @@
+/*
+ * 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.
+ * 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.build.compile;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.gradle.api.JavaVersion;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.plugins.JavaPlugin;
+import org.gradle.api.plugins.JavaPluginConvention;
+import org.gradle.api.tasks.compile.JavaCompile;
+
+/**
+ * {@link Plugin} that applies conventions for compiling Java sources in Spring Framework.
+ * <p>One can override the default Java source compatibility version
+ * with a dedicated property on the CLI: {@code "./gradlew test -PjavaSourceVersion=11"}.
+ *
+ * @author Brian Clozel
+ * @author Sam Brannen
+ */
+public class CompilerConventionsPlugin implements Plugin<Project> {
+
+	/**
+	 * The project property that can be used to switch the Java source
+	 * compatibility version for building source and test classes.
+	 */
+	public static final String JAVA_SOURCE_VERSION_PROPERTY = "javaSourceVersion";
+
+	public static final JavaVersion DEFAULT_COMPILER_VERSION = JavaVersion.VERSION_1_8;
+
+	private static final List<String> COMPILER_ARGS;
+
+	private static final List<String> TEST_COMPILER_ARGS;
+
+	static {
+		List<String> commonCompilerArgs = Arrays.asList(
+				"-Xlint:serial", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann",
+				"-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides",
+				"-Xlint:path", "-Xlint:processing", "-Xlint:static", "-Xlint:try", "-Xlint:-options"
+		);
+		COMPILER_ARGS = new ArrayList<>();
+		COMPILER_ARGS.addAll(commonCompilerArgs);
+		COMPILER_ARGS.addAll(Arrays.asList(
+				"-Xlint:varargs", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
+				"-Xlint:unchecked", "-Werror"
+		));
+		TEST_COMPILER_ARGS = new ArrayList<>();
+		TEST_COMPILER_ARGS.addAll(commonCompilerArgs);
+		TEST_COMPILER_ARGS.addAll(Arrays.asList("-Xlint:-varargs", "-Xlint:-fallthrough", "-Xlint:-rawtypes",
+				"-Xlint:-deprecation", "-Xlint:-unchecked", "-parameters"));
+	}
+
+	@Override
+	public void apply(Project project) {
+		project.getPlugins().withType(JavaPlugin.class, javaPlugin -> applyJavaCompileConventions(project));
+	}
+
+	/**
+	 * Applies the common Java compiler options for main sources, test fixture sources, and
+	 * test sources.
+	 * @param project the current project
+	 */
+	private void applyJavaCompileConventions(Project project) {
+		JavaPluginConvention java = project.getConvention().getPlugin(JavaPluginConvention.class);
+		if (project.hasProperty(JAVA_SOURCE_VERSION_PROPERTY)) {
+			JavaVersion javaSourceVersion = JavaVersion.toVersion(project.property(JAVA_SOURCE_VERSION_PROPERTY));
+			java.setSourceCompatibility(javaSourceVersion);
+		}
+		else {
+			java.setSourceCompatibility(DEFAULT_COMPILER_VERSION);
+		}
+		java.setTargetCompatibility(DEFAULT_COMPILER_VERSION);
+
+		project.getTasks().withType(JavaCompile.class)
+				.matching(compileTask -> compileTask.getName().equals(JavaPlugin.COMPILE_JAVA_TASK_NAME))
+				.forEach(compileTask -> {
+					compileTask.getOptions().setCompilerArgs(COMPILER_ARGS);
+					compileTask.getOptions().setEncoding("UTF-8");
+				});
+		project.getTasks().withType(JavaCompile.class)
+				.matching(compileTask -> compileTask.getName().equals(JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME)
+						|| compileTask.getName().equals("compileTestFixturesJava"))
+				.forEach(compileTask -> {
+					compileTask.getOptions().setCompilerArgs(TEST_COMPILER_ARGS);
+					compileTask.getOptions().setEncoding("UTF-8");
+				});
+	}
+
+}

+ 64 - 0
spring-framework-5.2.12.RELEASE/buildSrc/src/main/java/org/springframework/build/optional/OptionalDependenciesPlugin.java

@@ -0,0 +1,64 @@
+/*
+ * Copyright 2002-2019 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.build.optional;
+
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.plugins.JavaPlugin;
+import org.gradle.api.plugins.JavaPluginConvention;
+import org.gradle.api.tasks.SourceSetContainer;
+import org.gradle.plugins.ide.eclipse.EclipsePlugin;
+import org.gradle.plugins.ide.eclipse.model.EclipseModel;
+
+/**
+ * A {@code Plugin} that adds support for Maven-style optional dependencies. Creates a new
+ * {@code optional} configuration. The {@code optional} configuration is part of the
+ * project's compile and runtime classpath's but does not affect the classpath of
+ * dependent projects.
+ *
+ * @author Andy Wilkinson
+ */
+public class OptionalDependenciesPlugin implements Plugin<Project> {
+
+	/**
+	 * Name of the {@code optional} configuration.
+	 */
+	public static final String OPTIONAL_CONFIGURATION_NAME = "optional";
+
+	@Override
+	public void apply(Project project) {
+		Configuration optional = project.getConfigurations().create("optional");
+		project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> {
+			SourceSetContainer sourceSets = project.getConvention()
+					.getPlugin(JavaPluginConvention.class).getSourceSets();
+			sourceSets.all((sourceSet) -> {
+				sourceSet.setCompileClasspath(
+						sourceSet.getCompileClasspath().plus(optional));
+				sourceSet.setRuntimeClasspath(
+						sourceSet.getRuntimeClasspath().plus(optional));
+			});
+		});
+		project.getPlugins().withType(EclipsePlugin.class, (eclipePlugin) -> {
+			project.getExtensions().getByType(EclipseModel.class)
+					.classpath((classpath) -> {
+						classpath.getPlusConfigurations().add(optional);
+					});
+		});
+	}
+
+}

+ 29 - 0
spring-framework-5.2.12.RELEASE/framework-bom/framework-bom.gradle

@@ -0,0 +1,29 @@
+description = "Spring Framework (Bill of Materials)"
+
+apply plugin: 'java-platform'
+apply from: "$rootDir/gradle/publications.gradle"
+
+group = "org.springframework"
+
+dependencies {
+	constraints {
+		parent.moduleProjects.sort { "$it.name" }.each {
+			api it
+		}
+	}
+}
+
+publishing {
+	publications {
+		mavenJava(MavenPublication) {
+			artifactId = 'spring-framework-bom'
+			from components.javaPlatform
+			// remove scope information from published BOM
+			pom.withXml {
+				asNode().dependencyManagement.first().dependencies.first().each {
+					it.remove(it.scope.first())
+				}
+			}
+		}
+	}
+}

+ 4 - 0
spring-framework-5.2.12.RELEASE/gradle.properties

@@ -0,0 +1,4 @@
+version=5.2.12.RELEASE
+org.gradle.jvmargs=-Xmx1536M
+org.gradle.caching=true
+org.gradle.parallel=true

+ 18 - 0
spring-framework-5.2.12.RELEASE/gradle/build-cache-settings.gradle

@@ -0,0 +1,18 @@
+buildCache {
+	local {
+		enabled = true
+	}
+	remote(HttpBuildCache) {
+		enabled = true
+		url = 'https://ge.spring.io/cache/'
+		def cacheUsername = System.getenv('GRADLE_ENTERPRISE_CACHE_USERNAME')
+		def cachePassword = System.getenv('GRADLE_ENTERPRISE_CACHE_PASSWORD')
+		if (cacheUsername && cachePassword) {
+			push = true
+			credentials {
+				username = cacheUsername
+				password = cachePassword
+			}
+		}
+	}
+}

+ 16 - 0
spring-framework-5.2.12.RELEASE/gradle/build-scan-user-data.gradle

@@ -0,0 +1,16 @@
+addCustomJavaHomeMetadata()
+addCustomJavaSourceVersionMetadata()
+
+void addCustomJavaHomeMetadata() {
+	def customJavaHome = System.getProperty("customJavaHome")
+	if (customJavaHome) {
+		buildScan.value "Custom JAVA_HOME", customJavaHome
+	}
+}
+
+void addCustomJavaSourceVersionMetadata() {
+	def customJavaSourceVersion = System.getProperty("customJavaSourceVersion")
+	if (customJavaSourceVersion) {
+		buildScan.value "Custom Java Source Version", customJavaSourceVersion
+	}
+}

+ 80 - 0
spring-framework-5.2.12.RELEASE/gradle/custom-java-home.gradle

@@ -0,0 +1,80 @@
+// -----------------------------------------------------------------------------
+//
+// This script adds support for the following two JVM system properties
+// that control the build for alternative JDKs (i.e., a JDK other than
+// the one used to launch the Gradle process).
+//
+// - customJavaHome: absolute path to the alternate JDK installation to
+//     use to compile Java code and execute tests. This system property
+//     is also used in spring-oxm.gradle to determine whether JiBX is
+//     supported.
+//
+// - customJavaSourceVersion: Java version supplied to the `--release`
+//     command line flag to control the Java source and target
+//     compatibility version. Supported versions include 9 or higher.
+//     Do not set this system property if Java 8 should be used.
+//
+// Examples:
+//
+// ./gradlew -DcustomJavaHome=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home test
+//
+// ./gradlew --no-build-cache -DcustomJavaHome=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home test
+//
+// ./gradlew -DcustomJavaHome=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home -DcustomJavaSourceVersion=14 test
+//
+//
+// Credits: inspired by work from Marc Philipp and Stephane Nicoll
+//
+// -----------------------------------------------------------------------------
+
+import org.gradle.internal.os.OperatingSystem
+// import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
+
+def customJavaHome = System.getProperty("customJavaHome")
+
+if (customJavaHome) {
+	def customJavaHomeDir = new File(customJavaHome)
+	def customJavaSourceVersion = System.getProperty("customJavaSourceVersion")
+
+	tasks.withType(JavaCompile) {
+		logger.info("Java home for " + it.name + " task in " + project.name + ": " + customJavaHomeDir)
+		options.forkOptions.javaHome = customJavaHomeDir
+		inputs.property("customJavaHome", customJavaHome)
+		if (customJavaSourceVersion) {
+			options.compilerArgs += [ "--release", customJavaSourceVersion]
+			inputs.property("customJavaSourceVersion", customJavaSourceVersion)
+		}
+	}
+
+	tasks.withType(GroovyCompile) {
+		logger.info("Java home for " + it.name + " task in " + project.name + ": " + customJavaHomeDir)
+		options.forkOptions.javaHome = customJavaHomeDir
+		inputs.property("customJavaHome", customJavaHome)
+		if (customJavaSourceVersion) {
+			options.compilerArgs += [ "--release", customJavaSourceVersion]
+			inputs.property("customJavaSourceVersion", customJavaSourceVersion)
+		}
+	}
+
+	/*
+	tasks.withType(KotlinJvmCompile) {
+		logger.info("Java home for " + it.name + " task in " + project.name + ": " + customJavaHome)
+		kotlinOptions.jdkHome = customJavaHomeDir
+		inputs.property("customJavaHome", customJavaHome)
+	}
+	*/
+
+	tasks.withType(Test) {
+		def javaExecutable = customJavaHome + "/bin/java"
+		if (OperatingSystem.current().isWindows()) {
+			javaExecutable += ".exe"
+		}
+		logger.info("Java executable for " + it.name + " task in " + project.name + ": " + javaExecutable)
+		executable = javaExecutable
+		inputs.property("customJavaHome", customJavaHome)
+		if (customJavaSourceVersion) {
+			inputs.property("customJavaSourceVersion", customJavaSourceVersion)
+		}
+	}
+
+}

+ 285 - 0
spring-framework-5.2.12.RELEASE/gradle/docs.gradle

@@ -0,0 +1,285 @@
+configurations {
+	asciidoctorExt
+}
+
+dependencies {
+	asciidoctorExt("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.4.0.RELEASE")
+}
+
+repositories {
+	maven {
+		url "https://repo.spring.io/release"
+		mavenContent {
+			includeGroup "io.spring.asciidoctor"
+		}
+	}
+}
+
+/**
+ * Produce Javadoc for all Spring Framework modules in "build/docs/javadoc"
+ */
+task api(type: Javadoc) {
+	group = "Documentation"
+	description = "Generates aggregated Javadoc API documentation."
+	title = "${rootProject.description} ${version} API"
+
+	dependsOn {
+		moduleProjects.collect {
+			it.tasks.getByName("jar")
+		}
+	}
+	doFirst {
+		classpath = files(
+				// ensure the javadoc process can resolve types compiled from .aj sources
+				project(":spring-aspects").sourceSets.main.output
+		)
+		classpath += files(moduleProjects.collect { it.sourceSets.main.compileClasspath })
+	}
+
+	options {
+		encoding = "UTF-8"
+		memberLevel = JavadocMemberLevel.PROTECTED
+		author = true
+		header = rootProject.description
+		use = true
+		overview = "src/docs/api/overview.html"
+		stylesheetFile = file("src/docs/api/stylesheet.css")
+		splitIndex = true
+		links(project.ext.javadocLinks)
+		addStringOption('Xdoclint:none', '-quiet')
+		if(JavaVersion.current().isJava9Compatible()) {
+			addBooleanOption('html5', true)
+		}
+	}
+	source moduleProjects.collect { project ->
+		project.sourceSets.main.allJava
+	}
+	maxMemory = "1024m"
+	destinationDir = file("$buildDir/docs/javadoc")
+}
+
+/**
+ * Produce KDoc for all Spring Framework modules in "build/docs/kdoc"
+ */
+dokka {
+	dependsOn {
+		tasks.getByName("api")
+	}
+
+	doFirst {
+		configuration {
+			classpath = moduleProjects.collect { project -> project.jar.outputs.files.getFiles() }.flatten()
+			classpath += files(moduleProjects.collect { it.sourceSets.main.compileClasspath })
+
+			moduleProjects.findAll {
+				it.pluginManager.hasPlugin("kotlin")
+			}.each { project ->
+				def kotlinDirs = project.sourceSets.main.kotlin.srcDirs.collect()
+				kotlinDirs -= project.sourceSets.main.java.srcDirs
+				kotlinDirs.each { dir ->
+					if (dir.exists()) {
+						sourceRoot {
+							path = dir.path
+						}
+					}
+				}
+			}
+		}
+	}
+
+	outputFormat = "html"
+	outputDirectory = "$buildDir/docs/kdoc"
+
+	configuration {
+		moduleName = "spring-framework"
+
+		externalDocumentationLink {
+			url = new URL("https://docs.spring.io/spring-framework/docs/$version/javadoc-api/")
+			packageListUrl = new File(buildDir, "docs/javadoc/package-list").toURI().toURL()
+		}
+		externalDocumentationLink {
+			url = new URL("https://projectreactor.io/docs/core/release/api/")
+		}
+		externalDocumentationLink {
+			url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/")
+		}
+		externalDocumentationLink {
+			url = new URL("https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/")
+		}
+	}
+}
+
+task downloadResources(type: Download) {
+	def version = "0.2.1.RELEASE"
+	src "https://repo.spring.io/release/io/spring/docresources/" +
+			"spring-doc-resources/$version/spring-doc-resources-${version}.zip"
+	dest project.file("$buildDir/docs/spring-doc-resources.zip")
+	onlyIfModified true
+	useETag "all"
+}
+
+task extractDocResources(type: Copy, dependsOn: downloadResources) {
+	from project.zipTree(downloadResources.dest);
+	into "$buildDir/docs/spring-docs-resources/"
+}
+
+asciidoctorj {
+	modules {
+		pdf {
+			version '1.5.0-beta.8'
+		}
+	}
+	fatalWarnings ".*"
+	options doctype: 'book', eruby: 'erubis'
+	attributes([
+			icons: 'font',
+			idprefix: '',
+			idseparator: '-',
+			docinfo: 'shared',
+			revnumber: project.version,
+			sectanchors: '',
+			sectnums: '',
+			'source-highlighter': 'highlight.js',
+			highlightjsdir: 'js/highlight',
+			'highlightjs-theme': 'github', // 'googlecode',
+			stylesdir: 'css/',
+			stylesheet: 'stylesheet.css',
+			'spring-version': project.version
+	])
+}
+
+/**
+ * Generate the Spring Framework Reference documentation from "src/docs/asciidoc"
+ * in "build/docs/ref-docs/html5".
+ */
+asciidoctor {
+	baseDirFollowsSourceDir()
+	configurations 'asciidoctorExt'
+	sources {
+		include '*.adoc'
+	}
+	outputDir "$buildDir/docs/ref-docs/html5"
+	logDocuments = true
+	resources {
+		from(sourceDir) {
+			include 'images/*', 'css/**', 'js/**'
+		}
+		from extractDocResources
+	}
+}
+
+/**
+ * Generate the Spring Framework Reference documentation from "src/docs/asciidoc"
+ * in "build/docs/ref-docs/pdf".
+ */
+asciidoctorPdf {
+	baseDirFollowsSourceDir()
+	configurations 'asciidoctorExt'
+	sources {
+		include '*.adoc'
+	}
+	outputDir "$buildDir/docs/ref-docs/pdf"
+	logDocuments = true
+}
+
+/**
+ * Zip all docs (API and reference) into a single archive
+ */
+task docsZip(type: Zip, dependsOn: ['api', 'asciidoctor', 'asciidoctorPdf', 'dokka']) {
+	group = "Distribution"
+	description = "Builds -${archiveClassifier} archive containing api and reference " +
+			"for deployment at https://docs.spring.io/spring-framework/docs."
+
+	archiveBaseName.set("spring-framework")
+	archiveClassifier.set("docs")
+	from("src/dist") {
+		include "changelog.txt"
+	}
+	from (api) {
+		into "javadoc-api"
+	}
+	from ("$asciidoctor.outputDir") {
+		into "spring-framework-reference"
+	}
+	from ("$asciidoctorPdf.outputDir") {
+		into "spring-framework-reference/pdf"
+	}
+	from (dokka) {
+		into "kdoc-api"
+	}
+}
+
+/**
+ * Zip all Spring Framework schemas into a single archive
+ */
+task schemaZip(type: Zip) {
+	group = "Distribution"
+	archiveBaseName.set("spring-framework")
+	archiveClassifier.set("schema")
+	description = "Builds -${archiveClassifier} archive containing all " +
+			"XSDs for deployment at https://springframework.org/schema."
+	duplicatesStrategy DuplicatesStrategy.EXCLUDE
+	moduleProjects.each { module ->
+		def Properties schemas = new Properties();
+
+		module.sourceSets.main.resources.find {
+			(it.path.endsWith("META-INF/spring.schemas") || it.path.endsWith("META-INF\\spring.schemas"))
+		}?.withInputStream { schemas.load(it) }
+
+		for (def key : schemas.keySet()) {
+			def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
+			assert shortName != key
+			File xsdFile = module.sourceSets.main.resources.find {
+				(it.path.endsWith(schemas.get(key)) || it.path.endsWith(schemas.get(key).replaceAll('\\/','\\\\')))
+			}
+			assert xsdFile != null
+			into (shortName) {
+				from xsdFile.path
+			}
+		}
+	}
+}
+
+/**
+ * Create a distribution zip with everything:
+ * docs, schemas, jars, source jars, javadoc jars
+ */
+task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
+	group = "Distribution"
+	archiveBaseName.set("spring-framework")
+	archiveClassifier.set("dist")
+	description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
+			"suitable for community download page."
+
+	ext.baseDir = "spring-framework-${project.version}";
+
+	from("src/docs/dist") {
+		include "readme.txt"
+		include "license.txt"
+		include "notice.txt"
+		into "${baseDir}"
+		expand(copyright: new Date().format("yyyy"), version: project.version)
+	}
+
+	from(zipTree(docsZip.archivePath)) {
+		into "${baseDir}/docs"
+	}
+
+	from(zipTree(schemaZip.archivePath)) {
+		into "${baseDir}/schema"
+	}
+
+	moduleProjects.each { module ->
+		into ("${baseDir}/libs") {
+			from module.jar
+			if (module.tasks.findByPath("sourcesJar")) {
+				from module.sourcesJar
+			}
+			if (module.tasks.findByPath("javadocJar")) {
+				from module.javadocJar
+			}
+		}
+	}
+}
+
+distZip.mustRunAfter moduleProjects.check

+ 119 - 0
spring-framework-5.2.12.RELEASE/gradle/ide.gradle

@@ -0,0 +1,119 @@
+import org.gradle.plugins.ide.eclipse.model.ProjectDependency
+import org.gradle.plugins.ide.eclipse.model.SourceFolder
+
+apply plugin: "eclipse"
+
+eclipse.jdt {
+	sourceCompatibility = 1.8
+	targetCompatibility = 1.8
+}
+
+// Replace classpath entries with project dependencies (GRADLE-1116)
+// https://issues.gradle.org/browse/GRADLE-1116
+eclipse.classpath.file.whenMerged { classpath ->
+	def regexp = /.*?\/([^\/]+)\/build\/([^\/]+\/)+(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb)
+	def projectOutputDependencies = classpath.entries.findAll { entry -> entry.path =~ regexp }
+	projectOutputDependencies.each { entry ->
+		def matcher = (entry.path =~ regexp)
+		if (matcher) {
+			def projectName = matcher[0][1]
+			def path = "/${projectName}"
+			if(!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) {
+				def dependency = new ProjectDependency(path)
+				dependency.exported = true
+				classpath.entries.add(dependency)
+			}
+			classpath.entries.remove(entry)
+		}
+	}
+	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/")) {
+			it.output = null
+		}
+	}
+}
+eclipse.classpath.file.whenMerged { classpath ->
+	classpath.entries.findAll{ it instanceof SourceFolder }.each {
+		it.output = "bin/" + it.path.split("/")[1]
+	}
+}
+
+// Ensure project dependencies come after 3rd-party libs (SPR-11836)
+// https://jira.spring.io/browse/SPR-11836
+eclipse.classpath.file.whenMerged { classpath ->
+	classpath.entries.findAll { it instanceof ProjectDependency }.each {
+		// delete from original position
+		classpath.entries.remove(it)
+		// append to end of classpath
+		classpath.entries.add(it)
+	}
+}
+
+// Allow projects to be used as WTP modules
+eclipse.project.natures "org.eclipse.wst.common.project.facet.core.nature"
+
+// Include project specific settings
+task eclipseSettings(type: Copy) {
+	from rootProject.files(
+		"src/eclipse/org.eclipse.jdt.ui.prefs",
+		"src/eclipse/org.eclipse.wst.common.project.facet.core.xml")
+	into project.file('.settings/')
+	outputs.upToDateWhen { false }
+}
+
+task eclipseWstComponent(type: Copy) {
+	from rootProject.files(
+		"src/eclipse/org.eclipse.wst.common.component")
+	into project.file('.settings/')
+	expand(deployname: project.name)
+	outputs.upToDateWhen { false }
+}
+
+task eclipseJdtPrepare(type: Copy) {
+	from rootProject.file("src/eclipse/org.eclipse.jdt.core.prefs")
+	into project.file(".settings/")
+	outputs.upToDateWhen { false }
+}
+
+task cleanEclipseJdtUi(type: Delete) {
+	delete project.file(".settings/org.eclipse.jdt.core.prefs")
+	delete project.file(".settings/org.eclipse.jdt.ui.prefs")
+	delete project.file(".settings/org.eclipse.wst.common.component")
+	delete project.file(".settings/org.eclipse.wst.common.project.facet.core.xml")
+}
+
+task eclipseBuildship(type: Copy) {
+	from rootProject.files(
+		"src/eclipse/org.eclipse.jdt.ui.prefs",
+		"src/eclipse/org.eclipse.jdt.core.prefs")
+	into project.file('.settings/')
+	outputs.upToDateWhen { false }
+}
+
+tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
+tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
+tasks["eclipse"].dependsOn(eclipseSettings, eclipseWstComponent)
+
+
+// Filter 'build' folder
+eclipse.project.file.withXml {
+	def node = it.asNode()
+
+	def filteredResources = node.get("filteredResources")
+	if(filteredResources) {
+		node.remove(filteredResources)
+	}
+	def filterNode = node.appendNode("filteredResources").appendNode("filter")
+	filterNode.appendNode("id", "1359048889071")
+	filterNode.appendNode("name", "")
+	filterNode.appendNode("type", "30")
+	def matcherNode = filterNode.appendNode("matcher")
+	matcherNode.appendNode("id", "org.eclipse.ui.ide.multiFilter")
+	matcherNode.appendNode("arguments", "1.0-projectRelativePath-matches-false-false-build")
+}

+ 55 - 0
spring-framework-5.2.12.RELEASE/gradle/publications.gradle

@@ -0,0 +1,55 @@
+apply plugin: "maven-publish"
+apply plugin: 'com.jfrog.artifactory'
+
+publishing {
+	publications {
+		mavenJava(MavenPublication) {
+			pom {
+				afterEvaluate {
+					name = project.description
+					description = project.description
+				}
+				url = "https://github.com/spring-projects/spring-framework"
+				organization {
+					name = "Spring IO"
+					url = "https://spring.io/projects/spring-framework"
+				}
+				licenses {
+					license {
+						name = "Apache License, Version 2.0"
+						url = "https://www.apache.org/licenses/LICENSE-2.0"
+						distribution = "repo"
+					}
+				}
+				scm {
+					url = "https://github.com/spring-projects/spring-framework"
+					connection = "scm:git:git://github.com/spring-projects/spring-framework"
+					developerConnection = "scm:git:git://github.com/spring-projects/spring-framework"
+				}
+				developers {
+					developer {
+						id = "jhoeller"
+						name = "Juergen Hoeller"
+						email = "jhoeller@pivotal.io"
+					}
+				}
+				issueManagement {
+					system = "GitHub"
+					url = "https://github.com/spring-projects/spring-framework/issues"
+				}
+			}
+			versionMapping {
+				usage('java-api') {
+					fromResolutionResult()
+				}
+				usage('java-runtime') {
+					fromResolutionResult()
+				}
+			}
+		}
+	}
+}
+
+artifactoryPublish {
+	publications(publishing.publications.mavenJava)
+}

+ 71 - 0
spring-framework-5.2.12.RELEASE/gradle/spring-module.gradle

@@ -0,0 +1,71 @@
+apply plugin: 'org.springframework.build.compile'
+apply plugin: 'org.springframework.build.optional-dependencies'
+apply from: "$rootDir/gradle/publications.gradle"
+
+jar {
+	manifest.attributes["Implementation-Title"] = project.name
+	manifest.attributes["Implementation-Version"] = project.version
+	manifest.attributes["Automatic-Module-Name"] = project.name.replace('-', '.')  // for Jigsaw
+	manifest.attributes["Created-By"] =
+			"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
+
+	from("${rootDir}/src/docs/dist") {
+		include "license.txt"
+		include "notice.txt"
+		into "META-INF"
+		expand(copyright: new Date().format("yyyy"), version: project.version)
+	}
+}
+
+normalization {
+	runtimeClasspath {
+		ignore "META-INF/MANIFEST.MF"
+	}
+}
+
+javadoc {
+	description = "Generates project-level javadoc for use in -javadoc jar"
+
+	options.encoding = "UTF-8"
+	options.memberLevel = JavadocMemberLevel.PROTECTED
+	options.author = true
+	options.header = project.name
+	options.use = true
+	options.links(project.ext.javadocLinks)
+	options.addStringOption("Xdoclint:none", "-quiet")
+
+	// Suppress warnings due to cross-module @see and @link references.
+	// Note that global 'api' task does display all warnings.
+	logging.captureStandardError LogLevel.INFO
+	logging.captureStandardOutput LogLevel.INFO  // suppress "## warnings" message
+}
+
+task sourcesJar(type: Jar, dependsOn: classes) {
+	duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+	archiveClassifier.set("sources")
+	from sourceSets.main.allSource
+	// Don't include or exclude anything explicitly by default. See SPR-12085.
+}
+
+task javadocJar(type: Jar) {
+	archiveClassifier.set("javadoc")
+	from javadoc
+}
+
+publishing {
+	publications {
+		mavenJava(MavenPublication) {
+			from components.java
+			artifact sourcesJar
+			artifact javadocJar
+		}
+	}
+}
+
+// Disable publication of test fixture artifacts.
+//
+// Once we upgrade to Gradle 6.x, we will need to delete the following line ...
+components.java.variants.removeAll { it.outgoingConfiguration.name.startsWith("testFixtures") }
+// ... and uncomment the following two lines.
+// components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
+// components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }

BIN=BIN
spring-framework-5.2.12.RELEASE/gradle/wrapper/gradle-wrapper.jar


+ 5 - 0
spring-framework-5.2.12.RELEASE/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists

+ 188 - 0
spring-framework-5.2.12.RELEASE/gradlew

@@ -0,0 +1,188 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 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.
+#
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"

+ 100 - 0
spring-framework-5.2.12.RELEASE/gradlew.bat

@@ -0,0 +1,100 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem      https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 52 - 0
spring-framework-5.2.12.RELEASE/import-into-eclipse.md

@@ -0,0 +1,52 @@
+# Spring Framework - Eclipse/STS Project Import Guide
+
+This document will guide you through the process of importing the Spring Framework
+projects into Eclipse or the Spring Tool Suite (_STS_). It is recommended that you
+have a recent version of Eclipse. As a bare minimum you will need Eclipse with full Java
+8 support, Eclipse Buildship, the Kotlin plugin, and the Groovy plugin.
+
+The following instructions have been tested against [STS](https://spring.io/tools) 4.3.2
+([download](https://github.com/spring-projects/sts4/wiki/Previous-Versions#spring-tools-432-changelog))
+(based on Eclipse 4.12) with [Eclipse Buildship](https://projects.eclipse.org/projects/tools.buildship).
+The instructions should work with the latest Eclipse distribution as long as you install
+[Buildship](https://marketplace.eclipse.org/content/buildship-gradle-integration). Note
+that STS 4 comes with Buildship preinstalled.
+
+## Steps
+
+_When instructed to execute `./gradlew` from the command line, be sure to execute it within your locally cloned `spring-framework` working directory._
+
+1. Ensure that Eclipse launches with JDK 8.
+   - For example, on Mac OS this can be configured in the `Info.plist` file located in the `Contents` folder of the installed Eclipse or STS application (e.g., the `Eclipse.app` file).
+1. Install the [Kotlin Plugin for Eclipse](https://marketplace.eclipse.org/content/kotlin-plugin-eclipse) in Eclipse.
+1. Install the [Eclipse Groovy Development Tools](https://github.com/groovy/groovy-eclipse/wiki) in Eclipse.
+1. Switch to Groovy 2.5 (Preferences -> Groovy -> Compiler -> Switch to 2.5...) in Eclipse.
+1. Change the _Forbidden reference (access rule)_ in Eclipse from Error to Warning
+(Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rule)).
+1. Optionally install the [AspectJ Development Tools](https://marketplace.eclipse.org/content/aspectj-development-tools) (_AJDT_) if you need to work with the `spring-aspects` project. The AspectJ Development Tools available in the Eclipse Marketplace have been tested with these instructions using STS 4.5 (Eclipse 4.14).
+1. Optionally install the [TestNG plugin](https://testng.org/doc/eclipse.html) in Eclipse if you need to execute TestNG tests in the `spring-test` module.
+1. Build `spring-oxm` from the command line with `./gradlew :spring-oxm:check`.
+1. To apply project specific settings, run `./gradlew eclipseBuildship` from the command line.
+1. Import into Eclipse (File -> Import -> Gradle -> Existing Gradle Project -> Navigate to the locally cloned `spring-framework` directory -> Select Finish).
+   - If you have not installed AJDT, exclude the `spring-aspects` project from the import, if prompted, or close it after the import.
+   - If you run into errors during the import, you may need to set the _Java home_ for Gradle Buildship to the location of your JDK 8 installation in Eclipse (Preferences -> Gradle -> Java home).
+1. If you need to execute JAXB-related tests in the `spring-oxm` project and wish to have the generated sources available, add the `build/generated-sources/jaxb` folder to the build path (right click on the `jaxb` folder and select `Build Path -> Use as Source Folder`).
+   - If you do not see the `build` folder in the `spring-oxm` project, ensure that the "Gradle build folder" is not filtered out from the view. This setting is available under "Filters" in the configuration of the Package Explorer (available by clicking on the small downward facing arrow in the upper right corner of the Package Explorer).
+1. Code away!
+
+## Known Issues
+
+1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
+   - See `*RepackJar` tasks in the build.
+1. `spring-aspects` does not compile due to references to aspect types unknown to Eclipse.
+   - If you installed _AJDT_ into Eclipse it should work.
+1. While JUnit tests pass from the command line with Gradle, some may fail when run from
+   the IDE.
+   - Resolving this is a work in progress.
+   - If attempting to run all JUnit tests from within the IDE, you may need to set the following VM options to avoid out of memory errors: `-XX:MaxPermSize=2048m -Xmx2048m -XX:MaxHeapSize=2048m`
+
+## Tips
+
+In any case, please do not check in your own generated `.classpath` file, `.project`
+file, or `.settings` folder. You'll notice these files are already intentionally in
+`.gitignore`. The same policy holds for IDEA metadata.

+ 36 - 0
spring-framework-5.2.12.RELEASE/import-into-idea.md

@@ -0,0 +1,36 @@
+The following has been tested against IntelliJ IDEA 2016.2.2
+
+## Steps
+
+_Within your locally cloned spring-framework working directory:_
+
+1. Precompile `spring-oxm` with `./gradlew :spring-oxm:compileTestJava`
+2. Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
+3. When prompted exclude the `spring-aspects` module (or after the import via File-> Project Structure -> Modules)
+4. Code away
+
+## Known issues
+
+1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
+See `*RepackJar` tasks in the build and https://youtrack.jetbrains.com/issue/IDEA-160605).
+2. `spring-aspects` does not compile due to references to aspect types unknown to
+IntelliJ IDEA. See https://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the
+'spring-aspects' can be excluded from the project to avoid compilation errors.
+3. While JUnit tests pass from the command line with Gradle, some may fail when run from
+IntelliJ IDEA. Resolving this is a work in progress. If attempting to run all JUnit tests from within
+IntelliJ IDEA, you will likely need to set the following VM options to avoid out of memory errors:
+    -XX:MaxPermSize=2048m -Xmx2048m -XX:MaxHeapSize=2048m
+4. If you invoke "Rebuild Project" in the IDE, you'll have to generate some test
+resources of the `spring-oxm` module again (`./gradlew :spring-oxm:compileTestJava`)    
+
+
+## Tips
+
+In any case, please do not check in your own generated .iml, .ipr, or .iws files.
+You'll notice these files are already intentionally in .gitignore. The same policy goes for eclipse metadata.
+
+## FAQ
+
+Q. What about IntelliJ IDEA's own [Gradle support](https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)?
+
+A. Keep an eye on https://youtrack.jetbrains.com/issue/IDEA-53476

+ 30 - 0
spring-framework-5.2.12.RELEASE/integration-tests/integration-tests.gradle

@@ -0,0 +1,30 @@
+description = "Spring Integration Tests"
+
+dependencies {
+	testCompile(project(":spring-aop"))
+	testCompile(project(":spring-beans"))
+	testCompile(project(":spring-context"))
+	testCompile(project(":spring-core"))
+	testCompile(testFixtures(project(":spring-aop")))
+	testCompile(testFixtures(project(":spring-beans")))
+	testCompile(testFixtures(project(":spring-core")))
+	testCompile(testFixtures(project(":spring-tx")))
+	testCompile(project(":spring-expression"))
+	testCompile(project(":spring-jdbc"))
+	testCompile(project(":spring-orm"))
+	testCompile(project(":spring-test"))
+	testCompile(project(":spring-tx"))
+	testCompile(project(":spring-web"))
+	testCompile("javax.inject:javax.inject")
+	testCompile("javax.resource:javax.resource-api")
+	testCompile("javax.servlet:javax.servlet-api")
+	testCompile("org.aspectj:aspectjweaver")
+	testCompile("org.hsqldb:hsqldb")
+	testCompile("org.hibernate:hibernate-core")
+}
+
+normalization {
+	runtimeClasspath {
+		ignore "META-INF/MANIFEST.MF"
+	}
+}

+ 119 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerAdviceOrderIntegrationTests.java

@@ -0,0 +1,119 @@
+/*
+ * 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.
+ * 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.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+
+/**
+ * Integration tests for advice invocation order for advice configured via the
+ * AOP namespace.
+ *
+ * @author Sam Brannen
+ * @since 5.2.7
+ * @see org.springframework.aop.framework.autoproxy.AspectJAutoProxyAdviceOrderIntegrationTests
+ */
+class AopNamespaceHandlerAdviceOrderIntegrationTests {
+
+	@Nested
+	@SpringJUnitConfig(locations = "AopNamespaceHandlerAdviceOrderIntegrationTests-afterFirst.xml")
+	@DirtiesContext
+	class AfterAdviceFirstTests {
+
+		@Test
+		void afterAdviceIsInvokedFirst(@Autowired Echo echo, @Autowired InvocationTrackingAspect aspect) throws Exception {
+			assertThat(aspect.invocations).isEmpty();
+			assertThat(echo.echo(42)).isEqualTo(42);
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "around - end", "after", "after returning");
+
+			aspect.invocations.clear();
+			assertThatExceptionOfType(Exception.class).isThrownBy(() -> echo.echo(new Exception()));
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "around - end", "after", "after throwing");
+		}
+	}
+
+	@Nested
+	@SpringJUnitConfig(locations = "AopNamespaceHandlerAdviceOrderIntegrationTests-afterLast.xml")
+	@DirtiesContext
+	class AfterAdviceLastTests {
+
+		@Test
+		void afterAdviceIsInvokedLast(@Autowired Echo echo, @Autowired InvocationTrackingAspect aspect) throws Exception {
+			assertThat(aspect.invocations).isEmpty();
+			assertThat(echo.echo(42)).isEqualTo(42);
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "around - end", "after returning", "after");
+
+			aspect.invocations.clear();
+			assertThatExceptionOfType(Exception.class).isThrownBy(() -> echo.echo(new Exception()));
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "around - end", "after throwing", "after");
+		}
+	}
+
+
+	static class Echo {
+
+		Object echo(Object obj) throws Exception {
+			if (obj instanceof Exception) {
+				throw (Exception) obj;
+			}
+			return obj;
+		}
+	}
+
+	static class InvocationTrackingAspect {
+
+		List<String> invocations = new ArrayList<>();
+
+		Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+			invocations.add("around - start");
+			try {
+				return joinPoint.proceed();
+			}
+			finally {
+				invocations.add("around - end");
+			}
+		}
+
+		void before() {
+			invocations.add("before");
+		}
+
+		void afterReturning() {
+			invocations.add("after returning");
+		}
+
+		void afterThrowing() {
+			invocations.add("after throwing");
+		}
+
+		void after() {
+			invocations.add("after");
+		}
+	}
+
+}

+ 137 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java

@@ -0,0 +1,137 @@
+/*
+ * Copyright 2002-2019 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.config;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.framework.Advised;
+import org.springframework.aop.support.AopUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.testfixture.beans.ITestBean;
+import org.springframework.beans.testfixture.beans.TestBean;
+import org.springframework.core.testfixture.io.SerializationTestUtils;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpSession;
+import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Integration tests for scoped proxy use in conjunction with aop: namespace.
+ * Deemed an integration test because .web mocks and application contexts are required.
+ *
+ * @author Rob Harrop
+ * @author Juergen Hoeller
+ * @author Chris Beams
+ * @see org.springframework.aop.config.AopNamespaceHandlerTests
+ */
+@SpringJUnitWebConfig
+class AopNamespaceHandlerScopeIntegrationTests {
+
+	@Autowired
+	ITestBean singletonScoped;
+
+	@Autowired
+	ITestBean requestScoped;
+
+	@Autowired
+	ITestBean sessionScoped;
+
+	@Autowired
+	ITestBean sessionScopedAlias;
+
+	@Autowired
+	ITestBean testBean;
+
+
+	@Test
+	void testSingletonScoping() throws Exception {
+		assertThat(AopUtils.isAopProxy(singletonScoped)).as("Should be AOP proxy").isTrue();
+		boolean condition = singletonScoped instanceof TestBean;
+		assertThat(condition).as("Should be target class proxy").isTrue();
+		String rob = "Rob Harrop";
+		String bram = "Bram Smeets";
+		assertThat(singletonScoped.getName()).isEqualTo(rob);
+		singletonScoped.setName(bram);
+		assertThat(singletonScoped.getName()).isEqualTo(bram);
+		ITestBean deserialized = (ITestBean) SerializationTestUtils.serializeAndDeserialize(singletonScoped);
+		assertThat(deserialized.getName()).isEqualTo(bram);
+	}
+
+	@Test
+	void testRequestScoping() throws Exception {
+		MockHttpServletRequest oldRequest = new MockHttpServletRequest();
+		MockHttpServletRequest newRequest = new MockHttpServletRequest();
+
+		RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(oldRequest));
+
+		assertThat(AopUtils.isAopProxy(requestScoped)).as("Should be AOP proxy").isTrue();
+		boolean condition = requestScoped instanceof TestBean;
+		assertThat(condition).as("Should be target class proxy").isTrue();
+
+		assertThat(AopUtils.isAopProxy(testBean)).as("Should be AOP proxy").isTrue();
+		boolean condition1 = testBean instanceof TestBean;
+		assertThat(condition1).as("Regular bean should be JDK proxy").isFalse();
+
+		String rob = "Rob Harrop";
+		String bram = "Bram Smeets";
+
+		assertThat(requestScoped.getName()).isEqualTo(rob);
+		requestScoped.setName(bram);
+		RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(newRequest));
+		assertThat(requestScoped.getName()).isEqualTo(rob);
+		RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(oldRequest));
+		assertThat(requestScoped.getName()).isEqualTo(bram);
+
+		assertThat(((Advised) requestScoped).getAdvisors().length > 0).as("Should have advisors").isTrue();
+	}
+
+	@Test
+	void testSessionScoping() throws Exception {
+		MockHttpSession oldSession = new MockHttpSession();
+		MockHttpSession newSession = new MockHttpSession();
+
+		MockHttpServletRequest request = new MockHttpServletRequest();
+		request.setSession(oldSession);
+		RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));
+
+		assertThat(AopUtils.isAopProxy(sessionScoped)).as("Should be AOP proxy").isTrue();
+		boolean condition1 = sessionScoped instanceof TestBean;
+		assertThat(condition1).as("Should not be target class proxy").isFalse();
+
+		assertThat(sessionScopedAlias).isSameAs(sessionScoped);
+
+		assertThat(AopUtils.isAopProxy(testBean)).as("Should be AOP proxy").isTrue();
+		boolean condition = testBean instanceof TestBean;
+		assertThat(condition).as("Regular bean should be JDK proxy").isFalse();
+
+		String rob = "Rob Harrop";
+		String bram = "Bram Smeets";
+
+		assertThat(sessionScoped.getName()).isEqualTo(rob);
+		sessionScoped.setName(bram);
+		request.setSession(newSession);
+		assertThat(sessionScoped.getName()).isEqualTo(rob);
+		request.setSession(oldSession);
+		assertThat(sessionScoped.getName()).isEqualTo(bram);
+
+		assertThat(((Advised) sessionScoped).getAdvisors().length > 0).as("Should have advisors").isTrue();
+	}
+
+}

+ 318 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java

@@ -0,0 +1,318 @@
+/*
+ * Copyright 2002-2019 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.framework.autoproxy;
+
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javax.servlet.ServletException;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.support.AopUtils;
+import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;
+import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
+import org.springframework.aop.testfixture.advice.MethodCounter;
+import org.springframework.aop.testfixture.interceptor.NopInterceptor;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.testfixture.beans.ITestBean;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.lang.Nullable;
+import org.springframework.transaction.NoTransactionException;
+import org.springframework.transaction.interceptor.TransactionInterceptor;
+import org.springframework.transaction.testfixture.CallCountingTransactionManager;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Integration tests for auto proxy creation by advisor recognition working in
+ * conjunction with transaction management resources.
+ *
+ * @see org.springframework.aop.framework.autoproxy.AdvisorAutoProxyCreatorTests
+ *
+ * @author Rod Johnson
+ * @author Chris Beams
+ */
+class AdvisorAutoProxyCreatorIntegrationTests {
+
+	private static final Class<?> CLASS = AdvisorAutoProxyCreatorIntegrationTests.class;
+	private static final String CLASSNAME = CLASS.getSimpleName();
+
+	private static final String DEFAULT_CONTEXT = CLASSNAME + "-context.xml";
+
+	private static final String ADVISOR_APC_BEAN_NAME = "aapc";
+	private static final String TXMANAGER_BEAN_NAME = "txManager";
+
+	/**
+	 * Return a bean factory with attributes and EnterpriseServices configured.
+	 */
+	protected BeanFactory getBeanFactory() throws IOException {
+		return new ClassPathXmlApplicationContext(DEFAULT_CONTEXT, CLASS);
+	}
+
+	@Test
+	void testDefaultExclusionPrefix() throws Exception {
+		DefaultAdvisorAutoProxyCreator aapc = (DefaultAdvisorAutoProxyCreator) getBeanFactory().getBean(ADVISOR_APC_BEAN_NAME);
+		assertThat(aapc.getAdvisorBeanNamePrefix()).isEqualTo((ADVISOR_APC_BEAN_NAME + DefaultAdvisorAutoProxyCreator.SEPARATOR));
+		assertThat(aapc.isUsePrefix()).isFalse();
+	}
+
+	/**
+	 * If no pointcuts match (no attrs) there should be proxying.
+	 */
+	@Test
+	void testNoProxy() throws Exception {
+		BeanFactory bf = getBeanFactory();
+		Object o = bf.getBean("noSetters");
+		assertThat(AopUtils.isAopProxy(o)).isFalse();
+	}
+
+	@Test
+	void testTxIsProxied() throws Exception {
+		BeanFactory bf = getBeanFactory();
+		ITestBean test = (ITestBean) bf.getBean("test");
+		assertThat(AopUtils.isAopProxy(test)).isTrue();
+	}
+
+	@Test
+	void testRegexpApplied() throws Exception {
+		BeanFactory bf = getBeanFactory();
+		ITestBean test = (ITestBean) bf.getBean("test");
+		MethodCounter counter = (MethodCounter) bf.getBean("countingAdvice");
+		assertThat(counter.getCalls()).isEqualTo(0);
+		test.getName();
+		assertThat(counter.getCalls()).isEqualTo(1);
+	}
+
+	@Test
+	void testTransactionAttributeOnMethod() throws Exception {
+		BeanFactory bf = getBeanFactory();
+		ITestBean test = (ITestBean) bf.getBean("test");
+
+		CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
+		OrderedTxCheckAdvisor txc = (OrderedTxCheckAdvisor) bf.getBean("orderedBeforeTransaction");
+		assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(0);
+
+		assertThat(txMan.commits).isEqualTo(0);
+		assertThat(test.getAge()).as("Initial value was correct").isEqualTo(4);
+		int newAge = 5;
+		test.setAge(newAge);
+		assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(1);
+
+		assertThat(test.getAge()).as("New value set correctly").isEqualTo(newAge);
+		assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
+	}
+
+	/**
+	 * Should not roll back on servlet exception.
+	 */
+	@Test
+	void testRollbackRulesOnMethodCauseRollback() throws Exception {
+		BeanFactory bf = getBeanFactory();
+		Rollback rb = (Rollback) bf.getBean("rollback");
+
+		CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
+		OrderedTxCheckAdvisor txc = (OrderedTxCheckAdvisor) bf.getBean("orderedBeforeTransaction");
+		assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(0);
+
+		assertThat(txMan.commits).isEqualTo(0);
+		rb.echoException(null);
+		// Fires only on setters
+		assertThat(txc.getCountingBeforeAdvice().getCalls()).isEqualTo(0);
+		assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
+
+		assertThat(txMan.rollbacks).isEqualTo(0);
+		Exception ex = new Exception();
+		try {
+			rb.echoException(ex);
+		}
+		catch (Exception actual) {
+			assertThat(actual).isEqualTo(ex);
+		}
+		assertThat(txMan.rollbacks).as("Transaction counts match").isEqualTo(1);
+	}
+
+	@Test
+	void testRollbackRulesOnMethodPreventRollback() throws Exception {
+		BeanFactory bf = getBeanFactory();
+		Rollback rb = (Rollback) bf.getBean("rollback");
+
+		CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
+
+		assertThat(txMan.commits).isEqualTo(0);
+		// Should NOT roll back on ServletException
+		try {
+			rb.echoException(new ServletException());
+		}
+		catch (ServletException ex) {
+
+		}
+		assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
+	}
+
+	@Test
+	void testProgrammaticRollback() throws Exception {
+		BeanFactory bf = getBeanFactory();
+
+		Object bean = bf.getBean(TXMANAGER_BEAN_NAME);
+		boolean condition = bean instanceof CallCountingTransactionManager;
+		assertThat(condition).isTrue();
+		CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
+
+		Rollback rb = (Rollback) bf.getBean("rollback");
+		assertThat(txMan.commits).isEqualTo(0);
+		rb.rollbackOnly(false);
+		assertThat(txMan.commits).as("Transaction counts match").isEqualTo(1);
+		assertThat(txMan.rollbacks).isEqualTo(0);
+		// Will cause rollback only
+		rb.rollbackOnly(true);
+		assertThat(txMan.rollbacks).isEqualTo(1);
+	}
+
+}
+
+
+@SuppressWarnings("serial")
+class NeverMatchAdvisor extends StaticMethodMatcherPointcutAdvisor {
+
+	public NeverMatchAdvisor() {
+		super(new NopInterceptor());
+	}
+
+	/**
+	 * This method is solely to allow us to create a mixture of dependencies in
+	 * the bean definitions. The dependencies don't have any meaning, and don't
+	 * <b>do</b> anything.
+	 */
+	public void setDependencies(List<?> l) {
+
+	}
+
+	/**
+	 * @see org.springframework.aop.MethodMatcher#matches(java.lang.reflect.Method, java.lang.Class)
+	 */
+	@Override
+	public boolean matches(Method m, @Nullable Class<?> targetClass) {
+		return false;
+	}
+
+}
+
+
+class NoSetters {
+
+	public void A() {
+
+	}
+
+	public int getB() {
+		return -1;
+	}
+
+}
+
+
+@SuppressWarnings("serial")
+class OrderedTxCheckAdvisor extends StaticMethodMatcherPointcutAdvisor implements InitializingBean {
+
+	/**
+	 * Should we insist on the presence of a transaction attribute or refuse to accept one?
+	 */
+	private boolean requireTransactionContext = false;
+
+
+	public void setRequireTransactionContext(boolean requireTransactionContext) {
+		this.requireTransactionContext = requireTransactionContext;
+	}
+
+	public boolean isRequireTransactionContext() {
+		return requireTransactionContext;
+	}
+
+
+	public CountingBeforeAdvice getCountingBeforeAdvice() {
+		return (CountingBeforeAdvice) getAdvice();
+	}
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		setAdvice(new TxCountingBeforeAdvice());
+	}
+
+	@Override
+	public boolean matches(Method method, @Nullable Class<?> targetClass) {
+		return method.getName().startsWith("setAge");
+	}
+
+
+	private class TxCountingBeforeAdvice extends CountingBeforeAdvice {
+
+		@Override
+		public void before(Method method, Object[] args, Object target) throws Throwable {
+			// do transaction checks
+			if (requireTransactionContext) {
+				TransactionInterceptor.currentTransactionStatus();
+			}
+			else {
+				try {
+					TransactionInterceptor.currentTransactionStatus();
+					throw new RuntimeException("Shouldn't have a transaction");
+				}
+				catch (NoTransactionException ex) {
+					// this is Ok
+				}
+			}
+			super.before(method, args, target);
+		}
+	}
+
+}
+
+
+class Rollback {
+
+	/**
+	 * Inherits transaction attribute.
+	 * Illustrates programmatic rollback.
+	 */
+	public void rollbackOnly(boolean rollbackOnly) {
+		if (rollbackOnly) {
+			setRollbackOnly();
+		}
+	}
+
+	/**
+	 * Extracted in a protected method to facilitate testing
+	 */
+	protected void setRollbackOnly() {
+		TransactionInterceptor.currentTransactionStatus().setRollbackOnly();
+	}
+
+	/**
+	 * @org.springframework.transaction.interceptor.RuleBasedTransaction ( timeout=-1 )
+	 * @org.springframework.transaction.interceptor.RollbackRule ( "java.lang.Exception" )
+	 * @org.springframework.transaction.interceptor.NoRollbackRule ( "ServletException" )
+	 */
+	public void echoException(Exception ex) throws Exception {
+		if (ex != null) {
+			throw ex;
+		}
+	}
+
+}

+ 233 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AspectJAutoProxyAdviceOrderIntegrationTests.java

@@ -0,0 +1,233 @@
+/*
+ * 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.
+ * 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.framework.autoproxy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.After;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+
+/**
+ * Integration tests for advice invocation order for advice configured via
+ * AspectJ auto-proxy support.
+ *
+ * @author Sam Brannen
+ * @since 5.2.7
+ * @see org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests
+ */
+class AspectJAutoProxyAdviceOrderIntegrationTests {
+
+	/**
+	 * {@link After @After} advice declared as first <em>after</em> method in source code.
+	 */
+	@Nested
+	@SpringJUnitConfig(AfterAdviceFirstConfig.class)
+	@DirtiesContext
+	class AfterAdviceFirstTests {
+
+		@Test
+		void afterAdviceIsInvokedLast(@Autowired Echo echo, @Autowired AfterAdviceFirstAspect aspect) throws Exception {
+			assertThat(aspect.invocations).isEmpty();
+			assertThat(echo.echo(42)).isEqualTo(42);
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "after returning", "after", "around - end");
+
+			aspect.invocations.clear();
+			assertThatExceptionOfType(Exception.class).isThrownBy(
+					() -> echo.echo(new Exception()));
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "after throwing", "after", "around - end");
+		}
+	}
+
+
+	/**
+	 * This test class uses {@link AfterAdviceLastAspect} which declares its
+	 * {@link After @After} advice as the last <em>after advice type</em> method
+	 * in its source code.
+	 *
+	 * <p>On Java versions prior to JDK 7, we would have expected the {@code @After}
+	 * advice method to be invoked before {@code @AfterThrowing} and
+	 * {@code @AfterReturning} advice methods due to the AspectJ precedence
+	 * rules implemented in
+	 * {@link org.springframework.aop.aspectj.autoproxy.AspectJPrecedenceComparator}.
+	 */
+	@Nested
+	@SpringJUnitConfig(AfterAdviceLastConfig.class)
+	@DirtiesContext
+	class AfterAdviceLastTests {
+
+		@Test
+		void afterAdviceIsInvokedLast(@Autowired Echo echo, @Autowired AfterAdviceLastAspect aspect) throws Exception {
+			assertThat(aspect.invocations).isEmpty();
+			assertThat(echo.echo(42)).isEqualTo(42);
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "after returning", "after", "around - end");
+
+			aspect.invocations.clear();
+			assertThatExceptionOfType(Exception.class).isThrownBy(
+					() -> echo.echo(new Exception()));
+			assertThat(aspect.invocations).containsExactly("around - start", "before", "after throwing", "after", "around - end");
+		}
+	}
+
+
+	@Configuration
+	@EnableAspectJAutoProxy(proxyTargetClass = true)
+	static class AfterAdviceFirstConfig {
+
+		@Bean
+		AfterAdviceFirstAspect echoAspect() {
+			return new AfterAdviceFirstAspect();
+		}
+
+		@Bean
+		Echo echo() {
+			return new Echo();
+		}
+	}
+
+	@Configuration
+	@EnableAspectJAutoProxy(proxyTargetClass = true)
+	static class AfterAdviceLastConfig {
+
+		@Bean
+		AfterAdviceLastAspect echoAspect() {
+			return new AfterAdviceLastAspect();
+		}
+
+		@Bean
+		Echo echo() {
+			return new Echo();
+		}
+	}
+
+	static class Echo {
+
+		Object echo(Object obj) throws Exception {
+			if (obj instanceof Exception) {
+				throw (Exception) obj;
+			}
+			return obj;
+		}
+	}
+
+	/**
+	 * {@link After @After} advice declared as first <em>after</em> method in source code.
+	 */
+	@Aspect
+	static class AfterAdviceFirstAspect {
+
+		List<String> invocations = new ArrayList<>();
+
+		@Pointcut("execution(* echo(*))")
+		void echo() {
+		}
+
+		@After("echo()")
+		void after() {
+			invocations.add("after");
+		}
+
+		@AfterReturning("echo()")
+		void afterReturning() {
+			invocations.add("after returning");
+		}
+
+		@AfterThrowing("echo()")
+		void afterThrowing() {
+			invocations.add("after throwing");
+		}
+
+		@Before("echo()")
+		void before() {
+			invocations.add("before");
+		}
+
+		@Around("echo()")
+		Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+			invocations.add("around - start");
+			try {
+				return joinPoint.proceed();
+			}
+			finally {
+				invocations.add("around - end");
+			}
+		}
+	}
+
+	/**
+	 * {@link After @After} advice declared as last <em>after</em> method in source code.
+	 */
+	@Aspect
+	static class AfterAdviceLastAspect {
+
+		List<String> invocations = new ArrayList<>();
+
+		@Pointcut("execution(* echo(*))")
+		void echo() {
+		}
+
+		@Around("echo()")
+		Object around(ProceedingJoinPoint joinPoint) throws Throwable {
+			invocations.add("around - start");
+			try {
+				return joinPoint.proceed();
+			}
+			finally {
+				invocations.add("around - end");
+			}
+		}
+
+		@Before("echo()")
+		void before() {
+			invocations.add("before");
+		}
+
+		@AfterReturning("echo()")
+		void afterReturning() {
+			invocations.add("after returning");
+		}
+
+		@AfterThrowing("echo()")
+		void afterThrowing() {
+			invocations.add("after throwing");
+		}
+
+		@After("echo()")
+		void after() {
+			invocations.add("after");
+		}
+	}
+
+}

+ 44 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/Component.java

@@ -0,0 +1,44 @@
+/*
+ * Copyright 2002-2019 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.beans.factory.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Component {
+
+	private String name;
+	private List<Component> components = new ArrayList<>();
+
+	// mmm, there is no setter method for the 'components'
+	public void addComponent(Component component) {
+		this.components.add(component);
+	}
+
+	public List<Component> getComponents() {
+		return components;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}

+ 63 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentBeanDefinitionParser.java

@@ -0,0 +1,63 @@
+/*
+ * Copyright 2002-2019 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.beans.factory.xml;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.ManagedList;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.xml.DomUtils;
+
+public class ComponentBeanDefinitionParser extends AbstractBeanDefinitionParser {
+
+	@Override
+	protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
+		return parseComponentElement(element);
+	}
+
+	private static AbstractBeanDefinition parseComponentElement(Element element) {
+		BeanDefinitionBuilder factory = BeanDefinitionBuilder.rootBeanDefinition(ComponentFactoryBean.class);
+		factory.addPropertyValue("parent", parseComponent(element));
+
+		List<Element> childElements = DomUtils.getChildElementsByTagName(element, "component");
+		if (!CollectionUtils.isEmpty(childElements)) {
+			parseChildComponents(childElements, factory);
+		}
+
+		return factory.getBeanDefinition();
+	}
+
+	private static BeanDefinition parseComponent(Element element) {
+		BeanDefinitionBuilder component = BeanDefinitionBuilder.rootBeanDefinition(Component.class);
+		component.addPropertyValue("name", element.getAttribute("name"));
+		return component.getBeanDefinition();
+	}
+
+	private static void parseChildComponents(List<Element> childElements, BeanDefinitionBuilder factory) {
+		ManagedList<BeanDefinition> children = new ManagedList<>(childElements.size());
+		for (Element element : childElements) {
+			children.add(parseComponentElement(element));
+		}
+		factory.addPropertyValue("children", children);
+	}
+
+}

+ 81 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentBeanDefinitionParserTests.java

@@ -0,0 +1,81 @@
+/*
+ * Copyright 2002-2019 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.beans.factory.xml;
+
+import java.util.List;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.TestInstance.Lifecycle;
+
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.core.io.ClassPathResource;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * @author Costin Leau
+ */
+@TestInstance(Lifecycle.PER_CLASS)
+class ComponentBeanDefinitionParserTests {
+
+	private final DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
+
+
+	@BeforeAll
+	void setUp() throws Exception {
+		new XmlBeanDefinitionReader(bf).loadBeanDefinitions(
+			new ClassPathResource("component-config.xml", ComponentBeanDefinitionParserTests.class));
+	}
+
+	@AfterAll
+	void tearDown() {
+		bf.destroySingletons();
+	}
+
+	@Test
+	void testBionicBasic() {
+		Component cp = getBionicFamily();
+		assertThat("Bionic-1").isEqualTo(cp.getName());
+	}
+
+	@Test
+	void testBionicFirstLevelChildren() {
+		Component cp = getBionicFamily();
+		List<Component> components = cp.getComponents();
+		assertThat(2).isEqualTo(components.size());
+		assertThat("Mother-1").isEqualTo(components.get(0).getName());
+		assertThat("Rock-1").isEqualTo(components.get(1).getName());
+	}
+
+	@Test
+	void testBionicSecondLevelChildren() {
+		Component cp = getBionicFamily();
+		List<Component> components = cp.getComponents().get(0).getComponents();
+		assertThat(2).isEqualTo(components.size());
+		assertThat("Karate-1").isEqualTo(components.get(0).getName());
+		assertThat("Sport-1").isEqualTo(components.get(1).getName());
+	}
+
+	private Component getBionicFamily() {
+		return bf.getBean("bionic-family", Component.class);
+	}
+
+}
+

+ 56 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentFactoryBean.java

@@ -0,0 +1,56 @@
+/*
+ * Copyright 2002-2019 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.beans.factory.xml;
+
+import java.util.List;
+
+import org.springframework.beans.factory.FactoryBean;
+
+public class ComponentFactoryBean implements FactoryBean<Component> {
+
+	private Component parent;
+	private List<Component> children;
+
+	public void setParent(Component parent) {
+		this.parent = parent;
+	}
+
+	public void setChildren(List<Component> children) {
+		this.children = children;
+	}
+
+	@Override
+	public Component getObject() throws Exception {
+		if (this.children != null && this.children.size() > 0) {
+			for (Component child : children) {
+				this.parent.addComponent(child);
+			}
+		}
+		return this.parent;
+	}
+
+	@Override
+	public Class<Component> getObjectType() {
+		return Component.class;
+	}
+
+	@Override
+	public boolean isSingleton() {
+		return true;
+	}
+
+}

+ 25 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/beans/factory/xml/ComponentNamespaceHandler.java

@@ -0,0 +1,25 @@
+/*
+ * Copyright 2002-2019 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.beans.factory.xml;
+
+public class ComponentNamespaceHandler extends NamespaceHandlerSupport {
+
+	@Override
+	public void init() {
+		registerBeanDefinitionParser("component", new ComponentBeanDefinitionParser());
+	}
+}

+ 136 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java

@@ -0,0 +1,136 @@
+/*
+ * Copyright 2002-2019 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.cache.annotation;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.Advisor;
+import org.springframework.aop.framework.Advised;
+import org.springframework.aop.support.AopUtils;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor;
+import org.springframework.cache.support.NoOpCacheManager;
+import org.springframework.context.annotation.AdviceMode;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Repository;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+
+/**
+ * Integration tests for the @EnableCaching annotation.
+ *
+ * @author Chris Beams
+ * @since 3.1
+ */
+@SuppressWarnings("resource")
+class EnableCachingIntegrationTests {
+
+	@Test
+	void repositoryIsClassBasedCacheProxy() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(Config.class, ProxyTargetClassCachingConfig.class);
+		ctx.refresh();
+
+		assertCacheProxying(ctx);
+		assertThat(AopUtils.isCglibProxy(ctx.getBean(FooRepository.class))).isTrue();
+	}
+
+	@Test
+	void repositoryUsesAspectJAdviceMode() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(Config.class, AspectJCacheConfig.class);
+		// this test is a bit fragile, but gets the job done, proving that an
+		// attempt was made to look up the AJ aspect. It's due to classpath issues
+		// in .integration-tests that it's not found.
+		assertThatExceptionOfType(Exception.class).isThrownBy(
+				ctx::refresh)
+			.withMessageContaining("AspectJCachingConfiguration");
+	}
+
+
+	private void assertCacheProxying(AnnotationConfigApplicationContext ctx) {
+		FooRepository repo = ctx.getBean(FooRepository.class);
+		assertThat(isCacheProxy(repo)).isTrue();
+	}
+
+	private boolean isCacheProxy(FooRepository repo) {
+		if (AopUtils.isAopProxy(repo)) {
+			for (Advisor advisor : ((Advised)repo).getAdvisors()) {
+				if (advisor instanceof BeanFactoryCacheOperationSourceAdvisor) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+
+	@Configuration
+	@EnableCaching(proxyTargetClass=true)
+	static class ProxyTargetClassCachingConfig {
+
+		@Bean
+		CacheManager mgr() {
+			return new NoOpCacheManager();
+		}
+	}
+
+
+	@Configuration
+	static class Config {
+
+		@Bean
+		FooRepository fooRepository() {
+			return new DummyFooRepository();
+		}
+	}
+
+
+	@Configuration
+	@EnableCaching(mode=AdviceMode.ASPECTJ)
+	static class AspectJCacheConfig {
+
+		@Bean
+		CacheManager cacheManager() {
+			return new NoOpCacheManager();
+		}
+	}
+
+
+	interface FooRepository {
+
+		List<Object> findAll();
+	}
+
+
+	@Repository
+	static class DummyFooRepository implements FooRepository {
+
+		@Override
+		@Cacheable("primary")
+		public List<Object> findAll() {
+			return Collections.emptyList();
+		}
+	}
+
+}

+ 405 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java

@@ -0,0 +1,405 @@
+/*
+ * Copyright 2002-2019 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.context.annotation.jsr330;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.support.AopUtils;
+import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
+import org.springframework.context.annotation.ScopeMetadata;
+import org.springframework.context.annotation.ScopeMetadataResolver;
+import org.springframework.context.annotation.ScopedProxyMode;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpSession;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.context.support.GenericWebApplicationContext;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * @author Mark Fisher
+ * @author Juergen Hoeller
+ * @author Chris Beams
+ */
+class ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests {
+
+	private static final String DEFAULT_NAME = "default";
+
+	private static final String MODIFIED_NAME = "modified";
+
+	private ServletRequestAttributes oldRequestAttributes;
+
+	private ServletRequestAttributes newRequestAttributes;
+
+	private ServletRequestAttributes oldRequestAttributesWithSession;
+
+	private ServletRequestAttributes newRequestAttributesWithSession;
+
+
+	@BeforeEach
+	void setup() {
+		this.oldRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
+		this.newRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
+
+		MockHttpServletRequest oldRequestWithSession = new MockHttpServletRequest();
+		oldRequestWithSession.setSession(new MockHttpSession());
+		this.oldRequestAttributesWithSession = new ServletRequestAttributes(oldRequestWithSession);
+
+		MockHttpServletRequest newRequestWithSession = new MockHttpServletRequest();
+		newRequestWithSession.setSession(new MockHttpSession());
+		this.newRequestAttributesWithSession = new ServletRequestAttributes(newRequestWithSession);
+	}
+
+	@AfterEach
+	void reset() {
+		RequestContextHolder.setRequestAttributes(null);
+	}
+
+
+	@Test
+	void testPrototype() {
+		ApplicationContext context = createContext(ScopedProxyMode.NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("prototype");
+		assertThat(bean).isNotNull();
+		assertThat(context.isPrototype("prototype")).isTrue();
+		assertThat(context.isSingleton("prototype")).isFalse();
+	}
+
+	@Test
+	void testSingletonScopeWithNoProxy() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(ScopedProxyMode.NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
+		assertThat(context.isSingleton("singleton")).isTrue();
+		assertThat(context.isPrototype("singleton")).isFalse();
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// singleton bean, so name should be modified even after lookup
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void testSingletonScopeIgnoresProxyInterfaces() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(ScopedProxyMode.INTERFACES);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// singleton bean, so name should be modified even after lookup
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void testSingletonScopeIgnoresProxyTargetClass() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(ScopedProxyMode.TARGET_CLASS);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// singleton bean, so name should be modified even after lookup
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void testRequestScopeWithNoProxy() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(ScopedProxyMode.NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("request");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// but a newly retrieved bean should have the default name
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("request");
+		assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
+	}
+
+	@Test
+	void testRequestScopeWithProxiedInterfaces() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(ScopedProxyMode.INTERFACES);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
+
+		// should be dynamic proxy, implementing both interfaces
+		assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
+		boolean condition = bean instanceof AnotherScopeTestInterface;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void testRequestScopeWithProxiedTargetClass() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(ScopedProxyMode.TARGET_CLASS);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
+
+		// should be a class-based proxy
+		assertThat(AopUtils.isCglibProxy(bean)).isTrue();
+		boolean condition = bean instanceof RequestScopedTestBean;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void testSessionScopeWithNoProxy() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		ApplicationContext context = createContext(ScopedProxyMode.NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("session");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// but a newly retrieved bean should have the default name
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("session");
+		assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
+	}
+
+	@Test
+	void testSessionScopeWithProxiedInterfaces() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		ApplicationContext context = createContext(ScopedProxyMode.INTERFACES);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
+
+		// should be dynamic proxy, implementing both interfaces
+		assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
+		boolean condition = bean instanceof AnotherScopeTestInterface;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+		bean2.setName(DEFAULT_NAME);
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void testSessionScopeWithProxiedTargetClass() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		ApplicationContext context = createContext(ScopedProxyMode.TARGET_CLASS);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
+
+		// should be a class-based proxy
+		assertThat(AopUtils.isCglibProxy(bean)).isTrue();
+		boolean condition1 = bean instanceof ScopedTestBean;
+		assertThat(condition1).isTrue();
+		boolean condition = bean instanceof SessionScopedTestBean;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+		bean2.setName(DEFAULT_NAME);
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+
+	private ApplicationContext createContext(final ScopedProxyMode scopedProxyMode) {
+		GenericWebApplicationContext context = new GenericWebApplicationContext();
+		ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(context);
+		scanner.setIncludeAnnotationConfig(false);
+		scanner.setScopeMetadataResolver(new ScopeMetadataResolver() {
+			@Override
+			public ScopeMetadata resolveScopeMetadata(BeanDefinition definition) {
+				ScopeMetadata metadata = new ScopeMetadata();
+				if (definition instanceof AnnotatedBeanDefinition) {
+					AnnotatedBeanDefinition annDef = (AnnotatedBeanDefinition) definition;
+					for (String type : annDef.getMetadata().getAnnotationTypes()) {
+						if (type.equals(javax.inject.Singleton.class.getName())) {
+							metadata.setScopeName(BeanDefinition.SCOPE_SINGLETON);
+							break;
+						}
+						else if (annDef.getMetadata().getMetaAnnotationTypes(type).contains(javax.inject.Scope.class.getName())) {
+							metadata.setScopeName(type.substring(type.length() - 13, type.length() - 6).toLowerCase());
+							metadata.setScopedProxyMode(scopedProxyMode);
+							break;
+						}
+						else if (type.startsWith("javax.inject")) {
+							metadata.setScopeName(BeanDefinition.SCOPE_PROTOTYPE);
+						}
+					}
+				}
+				return metadata;
+			}
+		});
+
+		// Scan twice in order to find errors in the bean definition compatibility check.
+		scanner.scan(getClass().getPackage().getName());
+		scanner.scan(getClass().getPackage().getName());
+
+		context.registerAlias("classPathBeanDefinitionScannerJsr330ScopeIntegrationTests.SessionScopedTestBean", "session");
+		context.refresh();
+		return context;
+	}
+
+
+	public interface IScopedTestBean {
+
+		String getName();
+
+		void setName(String name);
+	}
+
+
+	public static abstract class ScopedTestBean implements IScopedTestBean {
+
+		private String name = DEFAULT_NAME;
+
+		@Override
+		public String getName() { return this.name; }
+
+		@Override
+		public void setName(String name) { this.name = name; }
+	}
+
+
+	@Named("prototype")
+	public static class PrototypeScopedTestBean extends ScopedTestBean {
+	}
+
+
+	@Named("singleton")
+	@Singleton
+	public static class SingletonScopedTestBean extends ScopedTestBean {
+	}
+
+
+	public interface AnotherScopeTestInterface {
+	}
+
+
+	@Named("request")
+	@RequestScoped
+	public static class RequestScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
+	}
+
+
+	@Named
+	@SessionScoped
+	public static class SessionScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
+	}
+
+
+	@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
+	@Retention(RetentionPolicy.RUNTIME)
+	@javax.inject.Scope
+	public @interface RequestScoped {
+	}
+
+
+	@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
+	@Retention(RetentionPolicy.RUNTIME)
+	@javax.inject.Scope
+	public @interface SessionScoped {
+	}
+
+}

+ 341 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java

@@ -0,0 +1,341 @@
+/*
+ * Copyright 2002-2019 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.context.annotation.scope;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.support.AopUtils;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
+import org.springframework.context.annotation.ScopedProxyMode;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpSession;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.annotation.RequestScope;
+import org.springframework.web.context.annotation.SessionScope;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.context.support.GenericWebApplicationContext;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.springframework.context.annotation.ScopedProxyMode.DEFAULT;
+import static org.springframework.context.annotation.ScopedProxyMode.INTERFACES;
+import static org.springframework.context.annotation.ScopedProxyMode.NO;
+import static org.springframework.context.annotation.ScopedProxyMode.TARGET_CLASS;
+
+/**
+ * @author Mark Fisher
+ * @author Juergen Hoeller
+ * @author Chris Beams
+ * @author Sam Brannen
+ */
+class ClassPathBeanDefinitionScannerScopeIntegrationTests {
+
+	private static final String DEFAULT_NAME = "default";
+	private static final String MODIFIED_NAME = "modified";
+
+	private ServletRequestAttributes oldRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
+	private ServletRequestAttributes newRequestAttributes = new ServletRequestAttributes(new MockHttpServletRequest());
+
+	private ServletRequestAttributes oldRequestAttributesWithSession;
+	private ServletRequestAttributes newRequestAttributesWithSession;
+
+
+	@BeforeEach
+	void setup() {
+		MockHttpServletRequest oldRequestWithSession = new MockHttpServletRequest();
+		oldRequestWithSession.setSession(new MockHttpSession());
+		this.oldRequestAttributesWithSession = new ServletRequestAttributes(oldRequestWithSession);
+
+		MockHttpServletRequest newRequestWithSession = new MockHttpServletRequest();
+		newRequestWithSession.setSession(new MockHttpSession());
+		this.newRequestAttributesWithSession = new ServletRequestAttributes(newRequestWithSession);
+	}
+
+	@AfterEach
+	void reset() {
+		RequestContextHolder.resetRequestAttributes();
+	}
+
+
+	@Test
+	void singletonScopeWithNoProxy() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// singleton bean, so name should be modified even after lookup
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void singletonScopeIgnoresProxyInterfaces() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(INTERFACES);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// singleton bean, so name should be modified even after lookup
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void singletonScopeIgnoresProxyTargetClass() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(TARGET_CLASS);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("singleton");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// singleton bean, so name should be modified even after lookup
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("singleton");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void requestScopeWithNoProxy() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("request");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// but a newly retrieved bean should have the default name
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("request");
+		assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
+	}
+
+	@Test
+	void requestScopeWithProxiedInterfaces() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(INTERFACES);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
+
+		// should be dynamic proxy, implementing both interfaces
+		assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
+		boolean condition = bean instanceof AnotherScopeTestInterface;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void requestScopeWithProxiedTargetClass() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		ApplicationContext context = createContext(TARGET_CLASS);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("request");
+
+		// should be a class-based proxy
+		assertThat(AopUtils.isCglibProxy(bean)).isTrue();
+		boolean condition = bean instanceof RequestScopedTestBean;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributes);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributes);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void sessionScopeWithNoProxy() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		ApplicationContext context = createContext(NO);
+		ScopedTestBean bean = (ScopedTestBean) context.getBean("session");
+
+		// should not be a proxy
+		assertThat(AopUtils.isAopProxy(bean)).isFalse();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
+		// not a proxy so this should not have changed
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+
+		// but a newly retrieved bean should have the default name
+		ScopedTestBean bean2 = (ScopedTestBean) context.getBean("session");
+		assertThat(bean2.getName()).isEqualTo(DEFAULT_NAME);
+	}
+
+	@Test
+	void sessionScopeWithProxiedInterfaces() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		ApplicationContext context = createContext(INTERFACES);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
+
+		// should be dynamic proxy, implementing both interfaces
+		assertThat(AopUtils.isJdkDynamicProxy(bean)).isTrue();
+		boolean condition = bean instanceof AnotherScopeTestInterface;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+		bean2.setName(DEFAULT_NAME);
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+	@Test
+	void sessionScopeWithProxiedTargetClass() {
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		ApplicationContext context = createContext(TARGET_CLASS);
+		IScopedTestBean bean = (IScopedTestBean) context.getBean("session");
+
+		// should be a class-based proxy
+		assertThat(AopUtils.isCglibProxy(bean)).isTrue();
+		boolean condition1 = bean instanceof ScopedTestBean;
+		assertThat(condition1).isTrue();
+		boolean condition = bean instanceof SessionScopedTestBean;
+		assertThat(condition).isTrue();
+
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
+		// this is a proxy so it should be reset to default
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+		bean.setName(MODIFIED_NAME);
+
+		IScopedTestBean bean2 = (IScopedTestBean) context.getBean("session");
+		assertThat(bean2.getName()).isEqualTo(MODIFIED_NAME);
+		bean2.setName(DEFAULT_NAME);
+		assertThat(bean.getName()).isEqualTo(DEFAULT_NAME);
+
+		RequestContextHolder.setRequestAttributes(oldRequestAttributesWithSession);
+		assertThat(bean.getName()).isEqualTo(MODIFIED_NAME);
+	}
+
+
+	private ApplicationContext createContext(ScopedProxyMode scopedProxyMode) {
+		GenericWebApplicationContext context = new GenericWebApplicationContext();
+		ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(context);
+		scanner.setIncludeAnnotationConfig(false);
+		scanner.setBeanNameGenerator((definition, registry) -> definition.getScope());
+		scanner.setScopedProxyMode(scopedProxyMode);
+
+		// Scan twice in order to find errors in the bean definition compatibility check.
+		scanner.scan(getClass().getPackage().getName());
+		scanner.scan(getClass().getPackage().getName());
+
+		context.refresh();
+		return context;
+	}
+
+
+	interface IScopedTestBean {
+
+		String getName();
+
+		void setName(String name);
+	}
+
+
+	static abstract class ScopedTestBean implements IScopedTestBean {
+
+		private String name = DEFAULT_NAME;
+
+		@Override
+		public String getName() { return this.name; }
+
+		@Override
+		public void setName(String name) { this.name = name; }
+	}
+
+
+	@Component
+	static class SingletonScopedTestBean extends ScopedTestBean {
+	}
+
+
+	interface AnotherScopeTestInterface {
+	}
+
+
+	@Component
+	@RequestScope(proxyMode = DEFAULT)
+	static class RequestScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
+	}
+
+
+	@Component
+	@SessionScope(proxyMode = DEFAULT)
+	static class SessionScopedTestBean extends ScopedTestBean implements AnotherScopeTestInterface {
+	}
+
+}

+ 710 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java

@@ -0,0 +1,710 @@
+/*
+ * Copyright 2002-2019 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.core.env;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import org.springframework.beans.factory.support.BeanDefinitionRegistry;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.EnvironmentAware;
+import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.Profile;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+import org.springframework.context.support.GenericXmlApplicationContext;
+import org.springframework.context.support.StaticApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.jca.context.ResourceAdapterApplicationContext;
+import org.springframework.jca.support.SimpleBootstrapContext;
+import org.springframework.jca.work.SimpleTaskWorkManager;
+import org.springframework.mock.env.MockEnvironment;
+import org.springframework.mock.env.MockPropertySource;
+import org.springframework.mock.web.MockServletConfig;
+import org.springframework.mock.web.MockServletContext;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.AbstractRefreshableWebApplicationContext;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.context.support.GenericWebApplicationContext;
+import org.springframework.web.context.support.StandardServletEnvironment;
+import org.springframework.web.context.support.StaticWebApplicationContext;
+import org.springframework.web.context.support.XmlWebApplicationContext;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
+import static org.springframework.context.ConfigurableApplicationContext.ENVIRONMENT_BEAN_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DERIVED_DEV_BEAN_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DERIVED_DEV_ENV_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_BEAN_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.ENVIRONMENT_AWARE_BEAN_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_BEAN_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.TRANSITIVE_BEAN_NAME;
+import static org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.XML_PATH;
+
+/**
+ * System integration tests for container support of the {@link Environment} API.
+ *
+ * <p>
+ * Tests all existing BeanFactory and ApplicationContext implementations to ensure that:
+ * <ul>
+ * <li>a standard environment object is always present
+ * <li>a custom environment object can be set and retrieved against the factory/context
+ * <li>the {@link EnvironmentAware} interface is respected
+ * <li>the environment object is registered with the container as a singleton bean (if an
+ * ApplicationContext)
+ * <li>bean definition files (if any, and whether XML or @Configuration) are registered
+ * conditionally based on environment metadata
+ * </ul>
+ *
+ * @author Chris Beams
+ * @author Sam Brannen
+ * @see org.springframework.context.support.EnvironmentIntegrationTests
+ */
+@SuppressWarnings("resource")
+public class EnvironmentSystemIntegrationTests {
+
+	private final ConfigurableEnvironment prodEnv = new StandardEnvironment();
+
+	private final ConfigurableEnvironment devEnv = new StandardEnvironment();
+
+	private final ConfigurableEnvironment prodWebEnv = new StandardServletEnvironment();
+
+	@BeforeEach
+	void setUp() {
+		prodEnv.setActiveProfiles(PROD_ENV_NAME);
+		devEnv.setActiveProfiles(DEV_ENV_NAME);
+		prodWebEnv.setActiveProfiles(PROD_ENV_NAME);
+	}
+
+	@Test
+	void genericApplicationContext_standardEnv() {
+		ConfigurableApplicationContext ctx = new GenericApplicationContext(newBeanFactoryWithEnvironmentAwareBean());
+		ctx.refresh();
+
+		assertHasStandardEnvironment(ctx);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, ctx.getEnvironment());
+	}
+
+	@Test
+	void genericApplicationContext_customEnv() {
+		GenericApplicationContext ctx = new GenericApplicationContext(newBeanFactoryWithEnvironmentAwareBean());
+		ctx.setEnvironment(prodEnv);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodEnv);
+	}
+
+	@Test
+	void xmlBeanDefinitionReader_inheritsEnvironmentFromEnvironmentCapableBDR() {
+		GenericApplicationContext ctx = new GenericApplicationContext();
+		ctx.setEnvironment(prodEnv);
+		new XmlBeanDefinitionReader(ctx).loadBeanDefinitions(XML_PATH);
+		ctx.refresh();
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void annotatedBeanDefinitionReader_inheritsEnvironmentFromEnvironmentCapableBDR() {
+		GenericApplicationContext ctx = new GenericApplicationContext();
+		ctx.setEnvironment(prodEnv);
+		new AnnotatedBeanDefinitionReader(ctx).register(Config.class);
+		ctx.refresh();
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void classPathBeanDefinitionScanner_inheritsEnvironmentFromEnvironmentCapableBDR_scanProfileAnnotatedConfigClasses() {
+		// it's actually ConfigurationClassPostProcessor's Environment that gets the job done here.
+		GenericApplicationContext ctx = new GenericApplicationContext();
+		ctx.setEnvironment(prodEnv);
+		ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(ctx);
+		scanner.scan("org.springframework.core.env.scan1");
+		ctx.refresh();
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void classPathBeanDefinitionScanner_inheritsEnvironmentFromEnvironmentCapableBDR_scanProfileAnnotatedComponents() {
+		GenericApplicationContext ctx = new GenericApplicationContext();
+		ctx.setEnvironment(prodEnv);
+		ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(ctx);
+		scanner.scan("org.springframework.core.env.scan2");
+		ctx.refresh();
+		assertThat(scanner.getEnvironment()).isEqualTo(ctx.getEnvironment());
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void genericXmlApplicationContext() {
+		GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
+		assertHasStandardEnvironment(ctx);
+		ctx.setEnvironment(prodEnv);
+		ctx.load(XML_PATH);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodEnv);
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void classPathXmlApplicationContext() {
+		ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(XML_PATH);
+		ctx.setEnvironment(prodEnv);
+		ctx.refresh();
+
+		assertEnvironmentBeanRegistered(ctx);
+		assertHasEnvironment(ctx, prodEnv);
+		assertEnvironmentAwareInvoked(ctx, ctx.getEnvironment());
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void fileSystemXmlApplicationContext() throws IOException {
+		ClassPathResource xml = new ClassPathResource(XML_PATH);
+		File tmpFile = File.createTempFile("test", "xml");
+		FileCopyUtils.copy(xml.getFile(), tmpFile);
+
+		// strange - FSXAC strips leading '/' unless prefixed with 'file:'
+		ConfigurableApplicationContext ctx =
+				new FileSystemXmlApplicationContext(new String[] {"file:" + tmpFile.getPath()}, false);
+		ctx.setEnvironment(prodEnv);
+		ctx.refresh();
+		assertEnvironmentBeanRegistered(ctx);
+		assertHasEnvironment(ctx, prodEnv);
+		assertEnvironmentAwareInvoked(ctx, ctx.getEnvironment());
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withPojos() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+
+		assertHasStandardEnvironment(ctx);
+		ctx.setEnvironment(prodEnv);
+
+		ctx.register(EnvironmentAwareBean.class);
+		ctx.refresh();
+
+		assertEnvironmentAwareInvoked(ctx, prodEnv);
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withProdEnvAndProdConfigClass() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+
+		assertHasStandardEnvironment(ctx);
+		ctx.setEnvironment(prodEnv);
+
+		ctx.register(ProdConfig.class);
+		ctx.refresh();
+
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withProdEnvAndDevConfigClass() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+
+		assertHasStandardEnvironment(ctx);
+		ctx.setEnvironment(prodEnv);
+
+		ctx.register(DevConfig.class);
+		ctx.refresh();
+
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse();
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withDevEnvAndDevConfigClass() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+
+		assertHasStandardEnvironment(ctx);
+		ctx.setEnvironment(devEnv);
+
+		ctx.register(DevConfig.class);
+		ctx.refresh();
+
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isTrue();
+		assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withImportedConfigClasses() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+
+		assertHasStandardEnvironment(ctx);
+		ctx.setEnvironment(prodEnv);
+
+		ctx.register(Config.class);
+		ctx.refresh();
+
+		assertEnvironmentAwareInvoked(ctx, prodEnv);
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse();
+	}
+
+	@Test
+	void mostSpecificDerivedClassDrivesEnvironment_withDerivedDevEnvAndDerivedDevConfigClass() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		StandardEnvironment derivedDevEnv = new StandardEnvironment();
+		derivedDevEnv.setActiveProfiles(DERIVED_DEV_ENV_NAME);
+		ctx.setEnvironment(derivedDevEnv);
+		ctx.register(DerivedDevConfig.class);
+		ctx.refresh();
+
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isTrue();
+		assertThat(ctx.containsBean(DERIVED_DEV_BEAN_NAME)).isTrue();
+		assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void mostSpecificDerivedClassDrivesEnvironment_withDevEnvAndDerivedDevConfigClass() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.setEnvironment(devEnv);
+		ctx.register(DerivedDevConfig.class);
+		ctx.refresh();
+
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(DERIVED_DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(TRANSITIVE_BEAN_NAME)).isFalse();
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withProfileExpressionMatchOr() {
+		testProfileExpression(true, "p3");
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withProfileExpressionMatchAnd() {
+		testProfileExpression(true, "p1", "p2");
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withProfileExpressionNoMatchAnd() {
+		testProfileExpression(false, "p1");
+	}
+
+	@Test
+	void annotationConfigApplicationContext_withProfileExpressionNoMatchNone() {
+		testProfileExpression(false, "p4");
+	}
+
+	private void testProfileExpression(boolean expected, String... activeProfiles) {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		StandardEnvironment environment = new StandardEnvironment();
+		environment.setActiveProfiles(activeProfiles);
+		ctx.setEnvironment(environment);
+		ctx.register(ProfileExpressionConfig.class);
+		ctx.refresh();
+		assertThat(ctx.containsBean("expressionBean")).isEqualTo(expected);
+	}
+
+	@Test
+	void webApplicationContext() {
+		GenericWebApplicationContext ctx = new GenericWebApplicationContext(newBeanFactoryWithEnvironmentAwareBean());
+		assertHasStandardServletEnvironment(ctx);
+		ctx.setEnvironment(prodWebEnv);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodWebEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodWebEnv);
+	}
+
+	@Test
+	void xmlWebApplicationContext() {
+		AbstractRefreshableWebApplicationContext ctx = new XmlWebApplicationContext();
+		ctx.setConfigLocation("classpath:" + XML_PATH);
+		ctx.setEnvironment(prodWebEnv);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodWebEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodWebEnv);
+		assertThat(ctx.containsBean(DEV_BEAN_NAME)).isFalse();
+		assertThat(ctx.containsBean(PROD_BEAN_NAME)).isTrue();
+	}
+
+	@Test
+	void staticApplicationContext() {
+		StaticApplicationContext ctx = new StaticApplicationContext();
+
+		assertHasStandardEnvironment(ctx);
+
+		registerEnvironmentBeanDefinition(ctx);
+
+		ctx.setEnvironment(prodEnv);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodEnv);
+	}
+
+	@Test
+	void staticWebApplicationContext() {
+		StaticWebApplicationContext ctx = new StaticWebApplicationContext();
+
+		assertHasStandardServletEnvironment(ctx);
+
+		registerEnvironmentBeanDefinition(ctx);
+
+		ctx.setEnvironment(prodWebEnv);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodWebEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodWebEnv);
+	}
+
+	@Test
+	void annotationConfigWebApplicationContext() {
+		AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
+		ctx.setEnvironment(prodWebEnv);
+		ctx.setConfigLocation(EnvironmentAwareBean.class.getName());
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodWebEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodWebEnv);
+	}
+
+	@Test
+	void registerServletParamPropertySources_AbstractRefreshableWebApplicationContext() {
+		MockServletContext servletContext = new MockServletContext();
+		servletContext.addInitParameter("pCommon", "pCommonContextValue");
+		servletContext.addInitParameter("pContext1", "pContext1Value");
+
+		MockServletConfig servletConfig = new MockServletConfig(servletContext);
+		servletConfig.addInitParameter("pCommon", "pCommonConfigValue");
+		servletConfig.addInitParameter("pConfig1", "pConfig1Value");
+
+		AbstractRefreshableWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
+		ctx.setConfigLocation(EnvironmentAwareBean.class.getName());
+		ctx.setServletConfig(servletConfig);
+		ctx.refresh();
+
+		ConfigurableEnvironment environment = ctx.getEnvironment();
+		assertThat(environment).isInstanceOf(StandardServletEnvironment.class);
+		MutablePropertySources propertySources = environment.getPropertySources();
+		assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)).isTrue();
+		assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)).isTrue();
+
+		// ServletConfig gets precedence
+		assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
+		assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
+				.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)));
+
+		// but all params are available
+		assertThat(environment.getProperty("pContext1")).isEqualTo("pContext1Value");
+		assertThat(environment.getProperty("pConfig1")).isEqualTo("pConfig1Value");
+
+		// Servlet* PropertySources have precedence over System* PropertySources
+		assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
+				.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)));
+
+		// Replace system properties with a mock property source for convenience
+		MockPropertySource mockSystemProperties = new MockPropertySource(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
+		mockSystemProperties.setProperty("pCommon", "pCommonSysPropsValue");
+		mockSystemProperties.setProperty("pSysProps1", "pSysProps1Value");
+		propertySources.replace(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, mockSystemProperties);
+
+		// assert that servletconfig params resolve with higher precedence than sysprops
+		assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
+		assertThat(environment.getProperty("pSysProps1")).isEqualTo("pSysProps1Value");
+	}
+
+	@Test
+	void registerServletParamPropertySources_GenericWebApplicationContext() {
+		MockServletContext servletContext = new MockServletContext();
+		servletContext.addInitParameter("pCommon", "pCommonContextValue");
+		servletContext.addInitParameter("pContext1", "pContext1Value");
+
+		GenericWebApplicationContext ctx = new GenericWebApplicationContext();
+		ctx.setServletContext(servletContext);
+		ctx.refresh();
+
+		ConfigurableEnvironment environment = ctx.getEnvironment();
+		assertThat(environment).isInstanceOf(StandardServletEnvironment.class);
+		MutablePropertySources propertySources = environment.getPropertySources();
+		assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)).isTrue();
+
+		// ServletContext params are available
+		assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonContextValue");
+		assertThat(environment.getProperty("pContext1")).isEqualTo("pContext1Value");
+
+		// Servlet* PropertySources have precedence over System* PropertySources
+		assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)))
+				.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)));
+
+		// Replace system properties with a mock property source for convenience
+		MockPropertySource mockSystemProperties = new MockPropertySource(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
+		mockSystemProperties.setProperty("pCommon", "pCommonSysPropsValue");
+		mockSystemProperties.setProperty("pSysProps1", "pSysProps1Value");
+		propertySources.replace(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, mockSystemProperties);
+
+		// assert that servletcontext init params resolve with higher precedence than sysprops
+		assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonContextValue");
+		assertThat(environment.getProperty("pSysProps1")).isEqualTo("pSysProps1Value");
+	}
+
+	@Test
+	void registerServletParamPropertySources_StaticWebApplicationContext() {
+		MockServletContext servletContext = new MockServletContext();
+		servletContext.addInitParameter("pCommon", "pCommonContextValue");
+		servletContext.addInitParameter("pContext1", "pContext1Value");
+
+		MockServletConfig servletConfig = new MockServletConfig(servletContext);
+		servletConfig.addInitParameter("pCommon", "pCommonConfigValue");
+		servletConfig.addInitParameter("pConfig1", "pConfig1Value");
+
+		StaticWebApplicationContext ctx = new StaticWebApplicationContext();
+		ctx.setServletConfig(servletConfig);
+		ctx.refresh();
+
+		ConfigurableEnvironment environment = ctx.getEnvironment();
+		MutablePropertySources propertySources = environment.getPropertySources();
+		assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)).isTrue();
+		assertThat(propertySources.contains(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)).isTrue();
+
+		// ServletConfig gets precedence
+		assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
+		assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
+				.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)));
+
+		// but all params are available
+		assertThat(environment.getProperty("pContext1")).isEqualTo("pContext1Value");
+		assertThat(environment.getProperty("pConfig1")).isEqualTo("pConfig1Value");
+
+		// Servlet* PropertySources have precedence over System* PropertySources
+		assertThat(propertySources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)))
+				.isLessThan(propertySources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)));
+
+		// Replace system properties with a mock property source for convenience
+		MockPropertySource mockSystemProperties = new MockPropertySource(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME);
+		mockSystemProperties.setProperty("pCommon", "pCommonSysPropsValue");
+		mockSystemProperties.setProperty("pSysProps1", "pSysProps1Value");
+		propertySources.replace(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME, mockSystemProperties);
+
+		// assert that servletconfig params resolve with higher precedence than sysprops
+		assertThat(environment.getProperty("pCommon")).isEqualTo("pCommonConfigValue");
+		assertThat(environment.getProperty("pSysProps1")).isEqualTo("pSysProps1Value");
+	}
+
+	@Test
+	void resourceAdapterApplicationContext() {
+		ResourceAdapterApplicationContext ctx = new ResourceAdapterApplicationContext(new SimpleBootstrapContext(new SimpleTaskWorkManager()));
+
+		assertHasStandardEnvironment(ctx);
+
+		registerEnvironmentBeanDefinition(ctx);
+
+		ctx.setEnvironment(prodEnv);
+		ctx.refresh();
+
+		assertHasEnvironment(ctx, prodEnv);
+		assertEnvironmentBeanRegistered(ctx);
+		assertEnvironmentAwareInvoked(ctx, prodEnv);
+	}
+
+	@Test
+	void abstractApplicationContextValidatesRequiredPropertiesOnRefresh() {
+		{
+			ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
+			ctx.refresh();
+		}
+
+		{
+			ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
+			ctx.getEnvironment().setRequiredProperties("foo", "bar");
+			assertThatExceptionOfType(MissingRequiredPropertiesException.class).isThrownBy(
+					ctx::refresh);
+		}
+
+		{
+			ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext();
+			ctx.getEnvironment().setRequiredProperties("foo");
+			ctx.setEnvironment(new MockEnvironment().withProperty("foo", "fooValue"));
+			ctx.refresh(); // should succeed
+		}
+	}
+
+
+	private DefaultListableBeanFactory newBeanFactoryWithEnvironmentAwareBean() {
+		DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
+		registerEnvironmentBeanDefinition(bf);
+		return bf;
+	}
+
+	private void registerEnvironmentBeanDefinition(BeanDefinitionRegistry registry) {
+		registry.registerBeanDefinition(ENVIRONMENT_AWARE_BEAN_NAME,
+				rootBeanDefinition(EnvironmentAwareBean.class).getBeanDefinition());
+	}
+
+	private void assertEnvironmentBeanRegistered(
+			ConfigurableApplicationContext ctx) {
+		// ensure environment is registered as a bean
+		assertThat(ctx.containsBean(ENVIRONMENT_BEAN_NAME)).isTrue();
+	}
+
+	private void assertHasStandardEnvironment(ApplicationContext ctx) {
+		Environment defaultEnv = ctx.getEnvironment();
+		assertThat(defaultEnv).isNotNull();
+		assertThat(defaultEnv).isInstanceOf(StandardEnvironment.class);
+	}
+
+	private void assertHasStandardServletEnvironment(WebApplicationContext ctx) {
+		// ensure a default servlet environment exists
+		Environment defaultEnv = ctx.getEnvironment();
+		assertThat(defaultEnv).isNotNull();
+		assertThat(defaultEnv).isInstanceOf(StandardServletEnvironment.class);
+	}
+
+	private void assertHasEnvironment(ApplicationContext ctx, Environment expectedEnv) {
+		// ensure the custom environment took
+		Environment actualEnv = ctx.getEnvironment();
+		assertThat(actualEnv).isNotNull();
+		assertThat(actualEnv).isEqualTo(expectedEnv);
+		// ensure environment is registered as a bean
+		assertThat(ctx.containsBean(ENVIRONMENT_BEAN_NAME)).isTrue();
+	}
+
+	private void assertEnvironmentAwareInvoked(ConfigurableApplicationContext ctx, Environment expectedEnv) {
+		assertThat(ctx.getBean(EnvironmentAwareBean.class).environment).isEqualTo(expectedEnv);
+	}
+
+
+	private static class EnvironmentAwareBean implements EnvironmentAware {
+
+		public Environment environment;
+
+		@Override
+		public void setEnvironment(Environment environment) {
+			this.environment = environment;
+		}
+	}
+
+
+	/**
+	 * Mirrors the structure of beans and environment-specific config files in
+	 * EnvironmentSystemIntegrationTests-context.xml
+	 */
+	@Configuration
+	@Import({DevConfig.class, ProdConfig.class})
+	static class Config {
+		@Bean
+		public EnvironmentAwareBean envAwareBean() {
+			return new EnvironmentAwareBean();
+		}
+	}
+
+	@Profile(DEV_ENV_NAME)
+	@Configuration
+	@Import(TransitiveConfig.class)
+	static class DevConfig {
+		@Bean
+		public Object devBean() {
+			return new Object();
+		}
+	}
+
+	@Profile(PROD_ENV_NAME)
+	@Configuration
+	static class ProdConfig {
+		@Bean
+		public Object prodBean() {
+			return new Object();
+		}
+	}
+
+	@Configuration
+	static class TransitiveConfig {
+		@Bean
+		public Object transitiveBean() {
+			return new Object();
+		}
+	}
+
+	@Profile(DERIVED_DEV_ENV_NAME)
+	@Configuration
+	static class DerivedDevConfig extends DevConfig {
+		@Bean
+		public Object derivedDevBean() {
+			return new Object();
+		}
+	}
+
+	@Profile("(p1 & p2) | p3")
+	@Configuration
+	static class ProfileExpressionConfig {
+		@Bean
+		public Object expressionBean() {
+			return new Object();
+		}
+	}
+
+
+	/**
+	 * Constants used both locally and in scan* sub-packages
+	 */
+	public static class Constants {
+
+		public static final String XML_PATH = "org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml";
+
+		public static final String ENVIRONMENT_AWARE_BEAN_NAME = "envAwareBean";
+
+		public static final String PROD_BEAN_NAME = "prodBean";
+		public static final String DEV_BEAN_NAME = "devBean";
+		public static final String DERIVED_DEV_BEAN_NAME = "derivedDevBean";
+		public static final String TRANSITIVE_BEAN_NAME = "transitiveBean";
+
+		public static final String PROD_ENV_NAME = "prod";
+		public static final String DEV_ENV_NAME = "dev";
+		public static final String DERIVED_DEV_ENV_NAME = "derivedDev";
+	}
+
+}

+ 40 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java

@@ -0,0 +1,40 @@
+/*
+ * Copyright 2002-2019 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.core.env;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.context.support.GenericApplicationContext;
+
+import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
+
+class PropertyPlaceholderConfigurerEnvironmentIntegrationTests {
+
+	@Test
+	@SuppressWarnings("deprecation")
+	void test() {
+		GenericApplicationContext ctx = new GenericApplicationContext();
+		ctx.registerBeanDefinition("ppc",
+				rootBeanDefinition(org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.class)
+				.addPropertyValue("searchSystemEnvironment", false)
+				.getBeanDefinition());
+		ctx.refresh();
+		ctx.getBean("ppc");
+		ctx.close();
+	}
+
+}

+ 26 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan1/Config.java

@@ -0,0 +1,26 @@
+/*
+ * Copyright 2002-2019 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.core.env.scan1;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Configuration
+@Import({ DevConfig.class, ProdConfig.class })
+class Config {
+
+}

+ 32 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan1/DevConfig.java

@@ -0,0 +1,32 @@
+/*
+ * Copyright 2002-2019 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.core.env.scan1;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME)
+@Configuration
+class DevConfig {
+
+	@Bean
+	public Object devBean() {
+		return new Object();
+	}
+
+}

+ 32 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan1/ProdConfig.java

@@ -0,0 +1,32 @@
+/*
+ * Copyright 2002-2019 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.core.env.scan1;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME)
+@Configuration
+class ProdConfig {
+
+	@Bean
+	public Object prodBean() {
+		return new Object();
+	}
+
+}

+ 25 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan2/DevBean.java

@@ -0,0 +1,25 @@
+/*
+ * Copyright 2002-2019 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.core.env.scan2;
+
+import org.springframework.context.annotation.Profile;
+import org.springframework.stereotype.Component;
+
+@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_ENV_NAME)
+@Component(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.DEV_BEAN_NAME)
+class DevBean {
+}

+ 26 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/core/env/scan2/ProdBean.java

@@ -0,0 +1,26 @@
+/*
+ * Copyright 2002-2019 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.core.env.scan2;
+
+import org.springframework.context.annotation.Profile;
+import org.springframework.stereotype.Component;
+
+@Profile(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_ENV_NAME)
+@Component(org.springframework.core.env.EnvironmentSystemIntegrationTests.Constants.PROD_BEAN_NAME)
+class ProdBean {
+
+}

+ 111 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java

@@ -0,0 +1,111 @@
+/*
+ * 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.expression.spel.support;
+
+import java.beans.PropertyEditor;
+
+import org.springframework.beans.BeansException;
+import org.springframework.beans.SimpleTypeConverter;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.BeanFactoryAware;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.core.convert.ConversionService;
+import org.springframework.core.convert.TypeDescriptor;
+import org.springframework.core.convert.support.DefaultConversionService;
+import org.springframework.expression.TypeConverter;
+
+/**
+ * Copied from Spring Integration for purposes of reproducing
+ * {@link Spr7538Tests}.
+ */
+class BeanFactoryTypeConverter implements TypeConverter, BeanFactoryAware {
+
+	private SimpleTypeConverter delegate = new SimpleTypeConverter();
+
+	private static ConversionService defaultConversionService;
+
+	private ConversionService conversionService;
+
+	public BeanFactoryTypeConverter() {
+		synchronized (this) {
+			if (defaultConversionService == null) {
+				defaultConversionService = new DefaultConversionService();
+			}
+		}
+		this.conversionService = defaultConversionService;
+	}
+
+	public BeanFactoryTypeConverter(ConversionService conversionService) {
+		this.conversionService = conversionService;
+	}
+
+	public void setConversionService(ConversionService conversionService) {
+		this.conversionService = conversionService;
+	}
+
+	@Override
+	public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
+		if (beanFactory instanceof ConfigurableBeanFactory) {
+			Object typeConverter = ((ConfigurableBeanFactory) beanFactory).getTypeConverter();
+			if (typeConverter instanceof SimpleTypeConverter) {
+				delegate = (SimpleTypeConverter) typeConverter;
+			}
+		}
+	}
+
+	public boolean canConvert(Class<?> sourceType, Class<?> targetType) {
+		if (conversionService.canConvert(sourceType, targetType)) {
+			return true;
+		}
+		if (!String.class.isAssignableFrom(sourceType) && !String.class.isAssignableFrom(targetType)) {
+			// PropertyEditor cannot convert non-Strings
+			return false;
+		}
+		if (!String.class.isAssignableFrom(sourceType)) {
+			return delegate.findCustomEditor(sourceType, null) != null || delegate.getDefaultEditor(sourceType) != null;
+		}
+		return delegate.findCustomEditor(targetType, null) != null || delegate.getDefaultEditor(targetType) != null;
+	}
+
+	@Override
+	public boolean canConvert(TypeDescriptor sourceTypeDescriptor, TypeDescriptor targetTypeDescriptor) {
+		if (conversionService.canConvert(sourceTypeDescriptor, targetTypeDescriptor)) {
+			return true;
+		}
+		// TODO: what does this mean? This method is not used in SpEL so probably ignorable?
+		Class<?> sourceType = sourceTypeDescriptor.getObjectType();
+		Class<?> targetType = targetTypeDescriptor.getObjectType();
+		return canConvert(sourceType, targetType);
+	}
+
+	@Override
+	public Object convertValue(Object value, TypeDescriptor sourceType, TypeDescriptor targetType) {
+		if (targetType.getType() == Void.class || targetType.getType() == Void.TYPE) {
+			return null;
+		}
+		if (conversionService.canConvert(sourceType, targetType)) {
+			return conversionService.convert(value, sourceType, targetType);
+		}
+		if (!String.class.isAssignableFrom(sourceType.getType())) {
+			PropertyEditor editor = delegate.findCustomEditor(sourceType.getType(), null);
+			editor.setValue(value);
+			return editor.getAsText();
+		}
+		return delegate.convertIfNecessary(value, targetType.getType());
+	}
+
+}

+ 63 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/expression/spel/support/Spr7538Tests.java

@@ -0,0 +1,63 @@
+/*
+ * Copyright 2002-2019 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.expression.spel.support;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.core.MethodParameter;
+import org.springframework.core.convert.TypeDescriptor;
+import org.springframework.expression.MethodExecutor;
+
+class Spr7538Tests {
+
+	@Test
+	void repro() throws Exception {
+		AlwaysTrueReleaseStrategy target = new AlwaysTrueReleaseStrategy();
+		BeanFactoryTypeConverter converter = new BeanFactoryTypeConverter();
+
+		StandardEvaluationContext context = new StandardEvaluationContext();
+		context.setTypeConverter(converter);
+
+		List<Foo> arguments = Collections.emptyList();
+
+		List<TypeDescriptor> paramDescriptors = new ArrayList<>();
+		Method method = AlwaysTrueReleaseStrategy.class.getMethod("checkCompleteness", List.class);
+		paramDescriptors.add(new TypeDescriptor(new MethodParameter(method, 0)));
+
+
+		List<TypeDescriptor> argumentTypes = new ArrayList<>();
+		argumentTypes.add(TypeDescriptor.forObject(arguments));
+		ReflectiveMethodResolver resolver = new ReflectiveMethodResolver();
+		MethodExecutor executor = resolver.resolve(context, target, "checkCompleteness", argumentTypes);
+
+		Object result = executor.execute(context, target, arguments);
+		System.out.println("Result: " + result);
+	}
+
+	static class AlwaysTrueReleaseStrategy {
+		public boolean checkCompleteness(List<Foo> messages) {
+			return true;
+		}
+	}
+
+	static class Foo{}
+}

+ 250 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java

@@ -0,0 +1,250 @@
+/*
+ * Copyright 2002-2019 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.scheduling.annotation;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator;
+import org.springframework.aop.support.AopUtils;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.testfixture.EnabledForTestGroups;
+import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
+import org.springframework.dao.support.PersistenceExceptionTranslator;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.testfixture.CallCountingTransactionManager;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+import static org.mockito.Mockito.mock;
+import static org.springframework.core.testfixture.TestGroup.PERFORMANCE;
+
+/**
+ * Integration tests cornering bug SPR-8651, which revealed that @Scheduled methods may
+ * not work well with beans that have already been proxied for other reasons such
+ * as @Transactional or @Async processing.
+ *
+ * @author Chris Beams
+ * @author Juergen Hoeller
+ * @since 3.1
+ */
+@SuppressWarnings("resource")
+@EnabledForTestGroups(PERFORMANCE)
+class ScheduledAndTransactionalAnnotationIntegrationTests {
+
+	@Test
+	void failsWhenJdkProxyAndScheduledMethodNotPresentOnInterface() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(Config.class, JdkProxyTxConfig.class, RepoConfigA.class);
+		assertThatExceptionOfType(BeanCreationException.class)
+			.isThrownBy(ctx::refresh)
+			.satisfies(ex -> assertThat(ex.getRootCause()).isInstanceOf(IllegalStateException.class));
+	}
+
+	@Test
+	void succeedsWhenSubclassProxyAndScheduledMethodNotPresentOnInterface() throws InterruptedException {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(Config.class, SubclassProxyTxConfig.class, RepoConfigA.class);
+		ctx.refresh();
+
+		Thread.sleep(100);  // allow @Scheduled method to be called several times
+
+		MyRepository repository = ctx.getBean(MyRepository.class);
+		CallCountingTransactionManager txManager = ctx.getBean(CallCountingTransactionManager.class);
+		assertThat(AopUtils.isCglibProxy(repository)).isEqualTo(true);
+		assertThat(repository.getInvocationCount()).isGreaterThan(0);
+		assertThat(txManager.commits).isGreaterThan(0);
+	}
+
+	@Test
+	void succeedsWhenJdkProxyAndScheduledMethodIsPresentOnInterface() throws InterruptedException {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(Config.class, JdkProxyTxConfig.class, RepoConfigB.class);
+		ctx.refresh();
+
+		Thread.sleep(100);  // allow @Scheduled method to be called several times
+
+		MyRepositoryWithScheduledMethod repository = ctx.getBean(MyRepositoryWithScheduledMethod.class);
+		CallCountingTransactionManager txManager = ctx.getBean(CallCountingTransactionManager.class);
+		assertThat(AopUtils.isJdkDynamicProxy(repository)).isTrue();
+		assertThat(repository.getInvocationCount()).isGreaterThan(0);
+		assertThat(txManager.commits).isGreaterThan(0);
+	}
+
+	@Test
+	void withAspectConfig() throws InterruptedException {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(AspectConfig.class, MyRepositoryWithScheduledMethodImpl.class);
+		ctx.refresh();
+
+		Thread.sleep(100);  // allow @Scheduled method to be called several times
+
+		MyRepositoryWithScheduledMethod repository = ctx.getBean(MyRepositoryWithScheduledMethod.class);
+		assertThat(AopUtils.isCglibProxy(repository)).isTrue();
+		assertThat(repository.getInvocationCount()).isGreaterThan(0);
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	static class JdkProxyTxConfig {
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement(proxyTargetClass = true)
+	static class SubclassProxyTxConfig {
+	}
+
+
+	@Configuration
+	static class RepoConfigA {
+
+		@Bean
+		MyRepository repository() {
+			return new MyRepositoryImpl();
+		}
+	}
+
+
+	@Configuration
+	static class RepoConfigB {
+
+		@Bean
+		MyRepositoryWithScheduledMethod repository() {
+			return new MyRepositoryWithScheduledMethodImpl();
+		}
+	}
+
+
+	@Configuration
+	@EnableScheduling
+	static class Config {
+
+		@Bean
+		PlatformTransactionManager txManager() {
+			return new CallCountingTransactionManager();
+		}
+
+		@Bean
+		PersistenceExceptionTranslator peTranslator() {
+			return mock(PersistenceExceptionTranslator.class);
+		}
+
+		@Bean
+		static PersistenceExceptionTranslationPostProcessor peTranslationPostProcessor() {
+			return new PersistenceExceptionTranslationPostProcessor();
+		}
+	}
+
+
+	@Configuration
+	@EnableScheduling
+	static class AspectConfig {
+
+		@Bean
+		static AnnotationAwareAspectJAutoProxyCreator autoProxyCreator() {
+			AnnotationAwareAspectJAutoProxyCreator apc = new AnnotationAwareAspectJAutoProxyCreator();
+			apc.setProxyTargetClass(true);
+			return apc;
+		}
+
+		@Bean
+		static MyAspect myAspect() {
+			return new MyAspect();
+		}
+	}
+
+
+	@Aspect
+	public static class MyAspect {
+
+		private final AtomicInteger count = new AtomicInteger(0);
+
+		@org.aspectj.lang.annotation.Before("execution(* scheduled())")
+		public void checkTransaction() {
+			this.count.incrementAndGet();
+		}
+	}
+
+
+	public interface MyRepository {
+
+		int getInvocationCount();
+	}
+
+
+	@Repository
+	static class MyRepositoryImpl implements MyRepository {
+
+		private final AtomicInteger count = new AtomicInteger(0);
+
+		@Transactional
+		@Scheduled(fixedDelay = 5)
+		public void scheduled() {
+			this.count.incrementAndGet();
+		}
+
+		@Override
+		public int getInvocationCount() {
+			return this.count.get();
+		}
+	}
+
+
+	public interface MyRepositoryWithScheduledMethod {
+
+		int getInvocationCount();
+
+		void scheduled();
+	}
+
+
+	@Repository
+	static class MyRepositoryWithScheduledMethodImpl implements MyRepositoryWithScheduledMethod {
+
+		private final AtomicInteger count = new AtomicInteger(0);
+
+		@Autowired(required = false)
+		private MyAspect myAspect;
+
+		@Override
+		@Transactional
+		@Scheduled(fixedDelay = 5)
+		public void scheduled() {
+			this.count.incrementAndGet();
+		}
+
+		@Override
+		public int getInvocationCount() {
+			if (this.myAspect != null) {
+				assertThat(this.myAspect.count.get()).isEqualTo(this.count.get());
+			}
+			return this.count.get();
+		}
+	}
+
+}

+ 331 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java

@@ -0,0 +1,331 @@
+/*
+ * Copyright 2002-2019 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.transaction.annotation;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.sql.DataSource;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.framework.Advised;
+import org.springframework.aop.support.AopUtils;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.concurrent.ConcurrentMapCache;
+import org.springframework.cache.support.SimpleCacheManager;
+import org.springframework.context.annotation.AdviceMode;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.ImportResource;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
+import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor;
+import org.springframework.transaction.testfixture.CallCountingTransactionManager;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+
+/**
+ * Integration tests for the @EnableTransactionManagement annotation.
+ *
+ * @author Chris Beams
+ * @author Sam Brannen
+ * @since 3.1
+ */
+@SuppressWarnings("resource")
+class EnableTransactionManagementIntegrationTests {
+
+	@Test
+	void repositoryIsNotTxProxy() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class);
+
+		assertThat(isTxProxy(ctx.getBean(FooRepository.class))).isFalse();
+	}
+
+	@Test
+	void repositoryIsTxProxy_withDefaultTxManagerName() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class, DefaultTxManagerNameConfig.class);
+
+		assertTxProxying(ctx);
+	}
+
+	@Test
+	void repositoryIsTxProxy_withCustomTxManagerName() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class, CustomTxManagerNameConfig.class);
+
+		assertTxProxying(ctx);
+	}
+
+	@Test
+	void repositoryIsTxProxy_withNonConventionalTxManagerName_fallsBackToByTypeLookup() {
+		assertTxProxying(new AnnotationConfigApplicationContext(Config.class, NonConventionalTxManagerNameConfig.class));
+	}
+
+	@Test
+	void repositoryIsClassBasedTxProxy() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Config.class, ProxyTargetClassTxConfig.class);
+
+		assertTxProxying(ctx);
+		assertThat(AopUtils.isCglibProxy(ctx.getBean(FooRepository.class))).isTrue();
+	}
+
+	@Test
+	void repositoryUsesAspectJAdviceMode() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(Config.class, AspectJTxConfig.class);
+		// this test is a bit fragile, but gets the job done, proving that an
+		// attempt was made to look up the AJ aspect. It's due to classpath issues
+		// in .integration-tests that it's not found.
+		assertThatExceptionOfType(Exception.class)
+			.isThrownBy(ctx::refresh)
+			.withMessageContaining("AspectJJtaTransactionManagementConfiguration");
+	}
+
+	@Test
+	void implicitTxManager() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImplicitTxManagerConfig.class);
+
+		FooRepository fooRepository = ctx.getBean(FooRepository.class);
+		fooRepository.findAll();
+
+		CallCountingTransactionManager txManager = ctx.getBean(CallCountingTransactionManager.class);
+		assertThat(txManager.begun).isEqualTo(1);
+		assertThat(txManager.commits).isEqualTo(1);
+		assertThat(txManager.rollbacks).isEqualTo(0);
+	}
+
+	@Test
+	void explicitTxManager() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ExplicitTxManagerConfig.class);
+
+		FooRepository fooRepository = ctx.getBean(FooRepository.class);
+		fooRepository.findAll();
+
+		CallCountingTransactionManager txManager1 = ctx.getBean("txManager1", CallCountingTransactionManager.class);
+		assertThat(txManager1.begun).isEqualTo(1);
+		assertThat(txManager1.commits).isEqualTo(1);
+		assertThat(txManager1.rollbacks).isEqualTo(0);
+
+		CallCountingTransactionManager txManager2 = ctx.getBean("txManager2", CallCountingTransactionManager.class);
+		assertThat(txManager2.begun).isEqualTo(0);
+		assertThat(txManager2.commits).isEqualTo(0);
+		assertThat(txManager2.rollbacks).isEqualTo(0);
+	}
+
+	@Test
+	void apcEscalation() {
+		new AnnotationConfigApplicationContext(EnableTxAndCachingConfig.class);
+	}
+
+
+	private void assertTxProxying(AnnotationConfigApplicationContext ctx) {
+		FooRepository repo = ctx.getBean(FooRepository.class);
+		assertThat(isTxProxy(repo)).isTrue();
+		// trigger a transaction
+		repo.findAll();
+	}
+
+	private boolean isTxProxy(FooRepository repo) {
+		if (!AopUtils.isAopProxy(repo)) {
+			return false;
+		}
+		return Arrays.stream(((Advised) repo).getAdvisors())
+				.anyMatch(BeanFactoryTransactionAttributeSourceAdvisor.class::isInstance);
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	@ImportResource("org/springframework/transaction/annotation/enable-caching.xml")
+	static class EnableTxAndCachingConfig {
+
+		@Bean
+		public PlatformTransactionManager txManager() {
+			return new CallCountingTransactionManager();
+		}
+
+		@Bean
+		public FooRepository fooRepository() {
+			return new DummyFooRepository();
+		}
+
+		@Bean
+		public CacheManager cacheManager() {
+			SimpleCacheManager mgr = new SimpleCacheManager();
+			ArrayList<Cache> caches = new ArrayList<>();
+			caches.add(new ConcurrentMapCache(""));
+			mgr.setCaches(caches);
+			return mgr;
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	static class ImplicitTxManagerConfig {
+
+		@Bean
+		public PlatformTransactionManager txManager() {
+			return new CallCountingTransactionManager();
+		}
+
+		@Bean
+		public FooRepository fooRepository() {
+			return new DummyFooRepository();
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	static class ExplicitTxManagerConfig implements TransactionManagementConfigurer {
+
+		@Bean
+		public PlatformTransactionManager txManager1() {
+			return new CallCountingTransactionManager();
+		}
+
+		@Bean
+		public PlatformTransactionManager txManager2() {
+			return new CallCountingTransactionManager();
+		}
+
+		@Override
+		public PlatformTransactionManager annotationDrivenTransactionManager() {
+			return txManager1();
+		}
+
+		@Bean
+		public FooRepository fooRepository() {
+			return new DummyFooRepository();
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	static class DefaultTxManagerNameConfig {
+
+		@Bean
+		PlatformTransactionManager transactionManager(DataSource dataSource) {
+			return new DataSourceTransactionManager(dataSource);
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	static class CustomTxManagerNameConfig {
+
+		@Bean
+		PlatformTransactionManager txManager(DataSource dataSource) {
+			return new DataSourceTransactionManager(dataSource);
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement
+	static class NonConventionalTxManagerNameConfig {
+
+		@Bean
+		PlatformTransactionManager txManager(DataSource dataSource) {
+			return new DataSourceTransactionManager(dataSource);
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement(proxyTargetClass=true)
+	static class ProxyTargetClassTxConfig {
+
+		@Bean
+		PlatformTransactionManager transactionManager(DataSource dataSource) {
+			return new DataSourceTransactionManager(dataSource);
+		}
+	}
+
+
+	@Configuration
+	@EnableTransactionManagement(mode=AdviceMode.ASPECTJ)
+	static class AspectJTxConfig {
+
+		@Bean
+		PlatformTransactionManager transactionManager(DataSource dataSource) {
+			return new DataSourceTransactionManager(dataSource);
+		}
+	}
+
+
+	@Configuration
+	static class Config {
+
+		@Bean
+		FooRepository fooRepository() {
+			JdbcFooRepository repos = new JdbcFooRepository();
+			repos.setDataSource(dataSource());
+			return repos;
+		}
+
+		@Bean
+		DataSource dataSource() {
+			return new EmbeddedDatabaseBuilder()
+				.setType(EmbeddedDatabaseType.HSQL)
+				.build();
+		}
+	}
+
+
+	interface FooRepository {
+
+		List<Object> findAll();
+	}
+
+
+	@Repository
+	static class JdbcFooRepository implements FooRepository {
+
+		public void setDataSource(DataSource dataSource) {
+		}
+
+		@Override
+		@Transactional
+		public List<Object> findAll() {
+			return Collections.emptyList();
+		}
+	}
+
+
+	@Repository
+	static class DummyFooRepository implements FooRepository {
+
+		@Override
+		@Transactional
+		public List<Object> findAll() {
+			return Collections.emptyList();
+		}
+	}
+
+}

+ 129 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java

@@ -0,0 +1,129 @@
+/*
+ * Copyright 2002-2019 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.transaction.annotation;
+
+import org.junit.jupiter.api.Test;
+
+import org.springframework.aop.support.AopUtils;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.context.annotation.Configuration;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Tests proving that regardless the proxy strategy used (JDK interface-based vs. CGLIB
+ * subclass-based), discovery of advice-oriented annotations is consistent.
+ *
+ * For example, Spring's @Transactional may be declared at the interface or class level,
+ * and whether interface or subclass proxies are used, the @Transactional annotation must
+ * be discovered in a consistent fashion.
+ *
+ * @author Chris Beams
+ */
+@SuppressWarnings("resource")
+class ProxyAnnotationDiscoveryTests {
+
+	@Test
+	void annotatedServiceWithoutInterface_PTC_true() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(PTCTrue.class, AnnotatedServiceWithoutInterface.class);
+		ctx.refresh();
+		AnnotatedServiceWithoutInterface s = ctx.getBean(AnnotatedServiceWithoutInterface.class);
+		assertThat(AopUtils.isCglibProxy(s)).isTrue();
+		assertThat(s).isInstanceOf(AnnotatedServiceWithoutInterface.class);
+	}
+
+	@Test
+	void annotatedServiceWithoutInterface_PTC_false() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(PTCFalse.class, AnnotatedServiceWithoutInterface.class);
+		ctx.refresh();
+		AnnotatedServiceWithoutInterface s = ctx.getBean(AnnotatedServiceWithoutInterface.class);
+		assertThat(AopUtils.isCglibProxy(s)).isTrue();
+		assertThat(s).isInstanceOf(AnnotatedServiceWithoutInterface.class);
+	}
+
+	@Test
+	void nonAnnotatedService_PTC_true() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(PTCTrue.class, AnnotatedServiceImpl.class);
+		ctx.refresh();
+		NonAnnotatedService s = ctx.getBean(NonAnnotatedService.class);
+		assertThat(AopUtils.isCglibProxy(s)).isTrue();
+		assertThat(s).isInstanceOf(AnnotatedServiceImpl.class);
+	}
+
+	@Test
+	void nonAnnotatedService_PTC_false() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(PTCFalse.class, AnnotatedServiceImpl.class);
+		ctx.refresh();
+		NonAnnotatedService s = ctx.getBean(NonAnnotatedService.class);
+		assertThat(AopUtils.isJdkDynamicProxy(s)).isTrue();
+		assertThat(s).isNotInstanceOf(AnnotatedServiceImpl.class);
+	}
+
+	@Test
+	void annotatedService_PTC_true() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(PTCTrue.class, NonAnnotatedServiceImpl.class);
+		ctx.refresh();
+		AnnotatedService s = ctx.getBean(AnnotatedService.class);
+		assertThat(AopUtils.isCglibProxy(s)).isTrue();
+		assertThat(s).isInstanceOf(NonAnnotatedServiceImpl.class);
+	}
+
+	@Test
+	void annotatedService_PTC_false() {
+		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+		ctx.register(PTCFalse.class, NonAnnotatedServiceImpl.class);
+		ctx.refresh();
+		AnnotatedService s = ctx.getBean(AnnotatedService.class);
+		assertThat(AopUtils.isJdkDynamicProxy(s)).isTrue();
+		assertThat(s).isNotInstanceOf(NonAnnotatedServiceImpl.class);
+	}
+}
+
+@Configuration
+@EnableTransactionManagement(proxyTargetClass=false)
+class PTCFalse { }
+
+@Configuration
+@EnableTransactionManagement(proxyTargetClass=true)
+class PTCTrue { }
+
+interface NonAnnotatedService {
+	void m();
+}
+
+interface AnnotatedService {
+	@Transactional void m();
+}
+
+class NonAnnotatedServiceImpl implements AnnotatedService {
+	@Override
+	public void m() { }
+}
+
+class AnnotatedServiceImpl implements NonAnnotatedService {
+	@Override
+	@Transactional public void m() { }
+}
+
+class AnnotatedServiceWithoutInterface {
+	@Transactional public void m() { }
+}

+ 1 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/META-INF/spring.handlers

@@ -0,0 +1 @@
+http\://www.foo.example/schema/component=org.springframework.beans.factory.xml.ComponentNamespaceHandler

+ 1 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/META-INF/spring.schemas

@@ -0,0 +1 @@
+http\://www.foo.example/schema/component/component.xsd=org/springframework/beans/factory/xml/component.xsd

+ 13 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/log4j2-test.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN">
+	<Appenders>
+		<Console name="Console" target="SYSTEM_OUT">
+			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{1.} - %msg%n" />
+		</Console>
+	</Appenders>
+	<Loggers>
+		<Root level="debug">
+			<AppenderRef ref="Console" />
+		</Root>
+	</Loggers>
+</Configuration>

+ 23 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceOrderIntegrationTests-afterFirst.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xmlns:aop="http://www.springframework.org/schema/aop"
+		xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
+				http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
+
+	<bean id="echo" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$Echo"/>
+
+	<bean id="invocationTrackingAspect" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$InvocationTrackingAspect" />
+
+	<aop:config>
+		<aop:aspect id="echoAdvice" ref="invocationTrackingAspect">
+			<aop:pointcut id="echoMethod" expression="execution(* echo(*))" />
+			<aop:around method="around" pointcut-ref="echoMethod" />
+			<aop:before method="before" pointcut-ref="echoMethod" />
+			<aop:after method="after" pointcut-ref="echoMethod" />
+			<aop:after-throwing method="afterThrowing" pointcut-ref="echoMethod" />
+			<aop:after-returning method="afterReturning" pointcut-ref="echoMethod" />
+		</aop:aspect>
+	</aop:config>
+
+</beans>

+ 23 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceOrderIntegrationTests-afterLast.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xmlns:aop="http://www.springframework.org/schema/aop"
+		xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
+				http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
+
+	<bean id="echo" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$Echo"/>
+
+	<bean id="invocationTrackingAspect" class="org.springframework.aop.config.AopNamespaceHandlerAdviceOrderIntegrationTests$InvocationTrackingAspect" />
+
+	<aop:config>
+		<aop:aspect id="echoAdvice" ref="invocationTrackingAspect">
+			<aop:pointcut id="echoMethod" expression="execution(* echo(*))" />
+			<aop:around method="around" pointcut-ref="echoMethod" />
+			<aop:before method="before" pointcut-ref="echoMethod" />
+			<aop:after-throwing method="afterThrowing" pointcut-ref="echoMethod" />
+			<aop:after-returning method="afterReturning" pointcut-ref="echoMethod" />
+			<aop:after method="after" pointcut-ref="echoMethod" />
+		</aop:aspect>
+	</aop:config>
+
+</beans>

+ 31 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xmlns:aop="http://www.springframework.org/schema/aop"
+		xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+				http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
+	<aop:config>
+		<aop:advisor advice-ref="advice" pointcut="execution(* *..ITestBean.*(..))"/>
+	</aop:config>
+
+	<bean id="advice" class="org.springframework.aop.interceptor.DebugInterceptor"/>
+
+	<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>
+
+	<bean id="singletonScoped" class="org.springframework.beans.testfixture.beans.TestBean">
+		<aop:scoped-proxy/>
+		<property name="name" value="Rob Harrop"/>
+	</bean>
+
+	<bean id="requestScoped" class="org.springframework.beans.testfixture.beans.TestBean" scope="request">
+		<aop:scoped-proxy/>
+		<property name="name" value="Rob Harrop"/>
+	</bean>
+
+	<bean id="sessionScoped" name="sessionScopedAlias" class="org.springframework.beans.testfixture.beans.TestBean" scope="session">
+		<aop:scoped-proxy proxy-target-class="false"/>
+		<property name="name" value="Rob Harrop"/>
+	</bean>
+
+</beans>

+ 107 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml

@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "https://www.springframework.org/dtd/spring-beans-2.0.dtd">
+
+<!--
+	Common bean definitions for auto proxy creator tests.
+-->
+<beans>
+
+	<description>
+		Matches all Advisors in the factory: we don't use a prefix
+	</description>
+
+	<bean id="aapc" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
+
+	<!--
+		Depending on the order value, these beans should appear
+		before or after the transaction advisor. Thus we configure
+		them to check for or to refuse to accept a transaction.
+		The transaction advisor's order value is 10.
+	-->
+	<bean id="orderedBeforeTransaction" class="org.springframework.aop.framework.autoproxy.OrderedTxCheckAdvisor">
+		<property name="order"><value>9</value></property>
+		<property name="requireTransactionContext"><value>false</value></property>
+	</bean>
+
+	<bean id="orderedAfterTransaction" class="org.springframework.aop.framework.autoproxy.OrderedTxCheckAdvisor">
+		<property name="order"><value>11</value></property>
+		<property name="requireTransactionContext"><value>true</value></property>
+	</bean>
+
+	<bean id="orderedAfterTransaction2" class="org.springframework.aop.framework.autoproxy.OrderedTxCheckAdvisor">
+		<!-- Don't set order value: should remain Integer.MAX_VALUE, so it's non-ordered -->
+		<property name="requireTransactionContext"><value>true</value></property>
+	</bean>
+
+	<!-- Often we can leave the definition of such infrastructural beans to child factories -->
+	<bean id="txManager" class="org.springframework.transaction.testfixture.CallCountingTransactionManager"/>
+
+	<bean id="tas" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
+		<property name="properties">
+			<props>
+				<prop key="setA*">PROPAGATION_REQUIRED</prop>
+				<prop key="rollbackOnly">PROPAGATION_REQUIRED</prop>
+				<prop key="echoException">PROPAGATION_REQUIRED,+javax.servlet.ServletException,-java.lang.Exception</prop>
+			</props>
+		</property>
+	</bean>
+
+	<bean id="txInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
+		<property name="transactionManager"><ref bean="txManager"/></property>
+		<property name="transactionAttributeSource"><ref bean="tas"/></property>
+	</bean>
+
+	<bean id="txAdvisor" class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
+		<property name="transactionInterceptor"><ref bean="txInterceptor"/></property>
+		<property name="order"><value>10</value></property>
+	</bean>
+
+	<!-- ====== Test for prototype definitions to try to provoke circular references ========================= -->
+	<!--
+		This advisor should never match and should not change how any of the tests run,
+		but it's a prototype referencing another (unused) prototype, as well as a
+		singleton, so it may pose circular reference problems, or an infinite loop.
+	-->
+	<bean id="neverMatchAdvisor" class="org.springframework.aop.framework.autoproxy.NeverMatchAdvisor"
+			scope="prototype">
+		<property name="dependencies">
+			<list>
+				<ref bean="singletonDependency"/>
+				<ref bean="prototypeDependency"/>
+			</list>
+		</property>
+	</bean>
+
+	<!-- These two beans would otherwise be eligible for autoproxying -->
+
+	<bean id="singletonDependency" class="org.springframework.beans.testfixture.beans.TestBean" scope="singleton"/>
+
+	<bean id="prototypeDependency" class="org.springframework.beans.testfixture.beans.TestBean" scope="prototype"/>
+
+	<!-- ====== End test for prototype definitions to try to provoke circular references ========================= -->
+
+	<bean class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
+		<property name="advice"><ref bean="countingAdvice"/></property>
+		<property name="pattern"><value>org.springframework.beans.testfixture.beans.ITestBean.getName</value></property>
+	</bean>
+
+	<bean id="countingAdvice" class="org.springframework.aop.testfixture.advice.CountingAfterReturningAdvice"/>
+
+	<bean id="test" class="org.springframework.beans.testfixture.beans.TestBean">
+		<property name="age"><value>4</value></property>
+	</bean>
+
+	<bean id="noSetters" class="org.springframework.aop.framework.autoproxy.NoSetters"/>
+
+	<bean id="rollback" class="org.springframework.aop.framework.autoproxy.Rollback"/>
+
+	<!-- The following beans test whether auto-proxying falls over for a null value -->
+
+	<bean id="tb" class="org.springframework.beans.testfixture.beans.TestBean"/>
+
+	<bean id="nullValueReturned" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+		<property name="targetObject" ref="tb"/>
+		<property name="targetMethod" value="getSpouse"/>
+	</bean>
+
+</beans>

+ 17 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/beans/factory/xml/component-config.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xmlns:foo="http://www.foo.example/schema/component"
+      xsi:schemaLocation="
+http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.foo.example/schema/component http://www.foo.example/schema/component/component.xsd">
+
+   <foo:component id="bionic-family" name="Bionic-1">
+      <foo:component name="Mother-1">
+      	<foo:component name="Karate-1"/>
+  		<foo:component name="Sport-1"/>
+      </foo:component>
+      <foo:component name="Rock-1"/>
+   </foo:component>
+
+</beans>

+ 19 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/beans/factory/xml/component.xsd

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<xsd:schema xmlns="http://www.foo.example/schema/component"
+         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+         targetNamespace="http://www.foo.example/schema/component"
+         elementFormDefault="qualified"
+         attributeFormDefault="unqualified">
+
+   <xsd:element name="component">
+      <xsd:complexType>
+         <xsd:choice minOccurs="0" maxOccurs="unbounded">
+            <xsd:element ref="component"/>
+         </xsd:choice>
+         <xsd:attribute name="id" type="xsd:ID"/>
+         <xsd:attribute name="name" use="required" type="xsd:string"/>
+      </xsd:complexType>
+   </xsd:element>
+
+</xsd:schema>

+ 20 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xsi:schemaLocation=
+		"http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd"
+	default-autowire="byType">
+
+	<context:component-scan base-package="org.springframework.context.annotation">
+		<context:exclude-filter type="annotation"
+		                        expression="org.springframework.context.annotation.Configuration"/>
+	</context:component-scan>
+
+	<context:load-time-weaver aspectj-weaving="off"/>
+
+	<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" autowire="no"/>
+
+</beans>

+ 9 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
+	profile="dev">
+
+	<bean id="devBean" class="java.lang.Object"/>
+
+</beans>

+ 9 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
+	profile="prod">
+
+	<bean id="prodBean" class="java.lang.Object"/>
+
+</beans>

+ 11 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
+
+	<bean id="envAwareBean" class="org.springframework.core.env.EnvironmentSystemIntegrationTests$EnvironmentAwareBean"/>
+
+	<import resource="classpath:org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml"/>
+	<import resource="classpath:org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml"/>
+
+</beans>

+ 10 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/transaction/annotation/enable-caching.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:cache="http://www.springframework.org/schema/cache"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
+		http://www.springframework.org/schema/cache https://www.springframework.org/schema/cache/spring-cache.xsd">
+
+	<cache:annotation-driven/>
+
+</beans>

+ 2 - 0
spring-framework-5.2.12.RELEASE/integration-tests/src/test/resources/org/springframework/util/testlog4j.properties

@@ -0,0 +1,2 @@
+log4j.rootCategory=DEBUG, mock
+log4j.appender.mock=org.springframework.util.MockLog4jAppender

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio