[LOG4J-3675] Fix `spring-test` dependency scope

The dependency scope of `spring-test` accidentally changed to `compile`
in version 2.21.1.

This is part of (#1706).
diff --git a/log4j-jakarta-web/pom.xml b/log4j-jakarta-web/pom.xml
index 5a14417..7824680 100644
--- a/log4j-jakarta-web/pom.xml
+++ b/log4j-jakarta-web/pom.xml
@@ -82,6 +82,7 @@
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-test</artifactId>
+      <scope>test</scope>
       <exclusions>
         <exclusion>
           <groupId>org.springframework</groupId>
diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml
index cee102f..971d119 100644
--- a/log4j-taglib/pom.xml
+++ b/log4j-taglib/pom.xml
@@ -89,6 +89,7 @@
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-test</artifactId>
+      <scope>test</scope>
       <exclusions>
         <exclusion>
           <groupId>org.springframework</groupId>
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index 7b27f38..97aec08 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -91,6 +91,7 @@
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-test</artifactId>
+      <scope>test</scope>
       <exclusions>
         <exclusion>
           <groupId>org.springframework</groupId>
diff --git a/src/changelog/.2.x.x/fix_dependency_scopes.xml b/src/changelog/.2.x.x/fix_dependency_scopes.xml
new file mode 100644
index 0000000..8d63529
--- /dev/null
+++ b/src/changelog/.2.x.x/fix_dependency_scopes.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns="http://logging.apache.org/log4j/changelog"
+       xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
+       type="fixed">
+  <issue id="LOG4J2-3675" link="https://issues.apache.org/jira/browse/LOG4J2-3675"/>
+  <description format="asciidoc">Fix `spring-test` dependency scope change.</description>
+</entry>