|
15 | 15 | </parent> |
16 | 16 |
|
17 | 17 | <dependencies> |
| 18 | + <!-- |
| 19 | + 1. Exclude conflicting Spring dependencies from starters. |
| 20 | + We must exclude core Spring modules (like core, context, and web) from the starters |
| 21 | + to prevent classpath collisions with the explicitly declared 6.2.11 versions below. |
| 22 | + --> |
18 | 23 | <dependency> |
19 | 24 | <groupId>org.springframework.boot</groupId> |
20 | 25 | <artifactId>spring-boot-starter-web</artifactId> |
21 | | - </dependency> |
| 26 | + <exclusions> |
| 27 | + <exclusion> |
| 28 | + <groupId>org.springframework</groupId> |
| 29 | + <artifactId>spring-context</artifactId> |
| 30 | + </exclusion> |
| 31 | + <exclusion> |
| 32 | + <groupId>org.springframework</groupId> |
| 33 | + <artifactId>spring-core</artifactId> |
| 34 | + </exclusion> |
| 35 | + <exclusion> |
| 36 | + <groupId>org.springframework</groupId> |
| 37 | + <artifactId>spring-beans</artifactId> |
| 38 | + </exclusion> |
| 39 | + <exclusion> |
| 40 | + <groupId>org.springframework</groupId> |
| 41 | + <artifactId>spring-web</artifactId> |
| 42 | + </exclusion> |
| 43 | + <exclusion> |
| 44 | + <groupId>org.springframework</groupId> |
| 45 | + <artifactId>spring-webmvc</artifactId> |
| 46 | + </exclusion> |
| 47 | + </exclusions> |
| 48 | + </dependency> |
| 49 | + |
| 50 | + <dependency> |
| 51 | + <groupId>org.springframework.boot</groupId> |
| 52 | + <artifactId>spring-boot-starter-cache</artifactId> |
| 53 | + <exclusions> |
| 54 | + <exclusion> |
| 55 | + <groupId>org.springframework</groupId> |
| 56 | + <artifactId>spring-context</artifactId> |
| 57 | + </exclusion> |
| 58 | + <exclusion> |
| 59 | + <groupId>org.springframework</groupId> |
| 60 | + <artifactId>spring-core</artifactId> |
| 61 | + </exclusion> |
| 62 | + <exclusion> |
| 63 | + <groupId>org.springframework</groupId> |
| 64 | + <artifactId>spring-beans</artifactId> |
| 65 | + </exclusion> |
| 66 | + </exclusions> |
| 67 | + </dependency> |
| 68 | + |
| 69 | + <!-- |
| 70 | + 2. Explicitly define Spring Framework dependencies at version 6.2.11 |
| 71 | + (Required by user for spring-context and spring-context-support) |
| 72 | + We also include spring-core, spring-beans, and spring-web/spring-webmvc |
| 73 | + explicitly to guarantee compatible versions for classes like |
| 74 | + AnnotationConfigUtils (context) and CollectionUtils (core/beans). |
| 75 | + --> |
22 | 76 | <dependency> |
23 | 77 | <groupId>org.springframework</groupId> |
24 | 78 | <artifactId>spring-context</artifactId> |
|
30 | 84 | <version>6.2.11</version> |
31 | 85 | </dependency> |
32 | 86 | <dependency> |
33 | | - <groupId>org.springframework.boot</groupId> |
34 | | - <artifactId>spring-boot-starter-cache</artifactId> |
| 87 | + <groupId>org.springframework</groupId> |
| 88 | + <artifactId>spring-core</artifactId> |
| 89 | + <version>6.2.11</version> |
| 90 | + </dependency> |
| 91 | + <dependency> |
| 92 | + <groupId>org.springframework</groupId> |
| 93 | + <artifactId>spring-beans</artifactId> |
| 94 | + <version>6.2.11</version> |
35 | 95 | </dependency> |
36 | 96 | <dependency> |
37 | 97 | <groupId>org.springframework</groupId> |
38 | 98 | <artifactId>spring-web</artifactId> |
| 99 | + <version>6.2.11</version> |
39 | 100 | </dependency> |
40 | 101 | <dependency> |
41 | 102 | <groupId>org.springframework</groupId> |
42 | 103 | <artifactId>spring-webmvc</artifactId> |
| 104 | + <version>6.2.11</version> |
43 | 105 | </dependency> |
| 106 | + |
| 107 | + <!-- Other dependencies remain the same --> |
| 108 | + |
44 | 109 | <dependency> |
45 | 110 | <groupId>org.ehcache</groupId> |
46 | 111 | <artifactId>ehcache</artifactId> |
|
49 | 114 | <dependency> |
50 | 115 | <groupId>org.springframework</groupId> |
51 | 116 | <artifactId>spring-test</artifactId> |
| 117 | + <!-- Note: spring-test version should be managed consistently, but we leave |
| 118 | + it to the parent for simplicity since it's only test scoped. |
| 119 | + If test issues arise, explicitly set the version here. --> |
52 | 120 | <scope>test</scope> |
53 | 121 | </dependency> |
54 | 122 | <dependency> |
|
0 commit comments