【问题归纳】springboot版本过高与依赖发生的冲突

时间:2024-11-21 07:57:24

报错:org.springframework.: Error creating bean with name ‘jdbcMappingContext’ defined in class path resource

: Error creating bean with name 'jdbcMappingContext' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$]: Post-processing of merged bean definition failed; nested exception is : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
	at (:597) ~[spring-beans-5.3.:5.3.21]
	at (:542) ~[spring-beans-5.3.:5.3.21]
	at $doGetBean$0(:335) ~[spring-beans-5.3.:5.3.21]
	at (:234) ~[spring-beans-5.3.:5.3.21]
	at (:333) ~[spring-beans-5.3.:5.3.21]
	at (:208) ~[spring-beans-5.3.:5.3.21]
	at (:955) ~[spring-beans-5.3.:5.3.21]
	at (:918) ~[spring-context-5.3.:5.3.21]
	at (:583) ~[spring-context-5.3.:5.3.21]
	at (:734) ~[spring-boot-2.7.:2.7.1]
	at (:408) ~[spring-boot-2.7.:2.7.1]
	at (:308) ~[spring-boot-2.7.:2.7.1]
	at (:132) [spring-boot-test-2.7.:2.7.1]
	at (:99) [spring-test-5.3.:5.3.21]
	at (:124) [spring-test-5.3.:5.3.21]
	at (:124) [spring-test-5.3.:5.3.21]
	at (:190) [spring-test-5.3.:5.3.21]
	at (:132) [spring-test-5.3.:5.3.21]
	at (:248) [spring-test-5.3.:5.3.21]
	at (:138) [spring-test-5.3.:5.3.21]
	at $invokeTestInstancePostProcessors$8(:363) [junit-jupiter-engine-5.8.:5.8.2]
	at (:368) [junit-jupiter-engine-5.8.:5.8.2]
	at $invokeTestInstancePostProcessors$9(:363) [junit-jupiter-engine-5.8.:5.8.2]
	at $3$(:193) ~[na:1.8.0_241]
	at $2$(:175) ~[na:1.8.0_241]
	at $(:1382) ~[na:1.8.0_241]
	at (:482) ~[na:1.8.0_241]
	at (:472) ~[na:1.8.0_241]
	at $(:312) ~[na:1.8.0_241]
	at $(:743) ~[na:1.8.0_241]
	at $(:742) ~[na:1.8.0_241]
	at $(:580) ~[na:1.8.0_241]
	at (:362) [junit-jupiter-engine-5.8.:5.8.2]
	at $instantiateAndPostProcessTestInstance$6(:283) [junit-jupiter-engine-5.8.:5.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:282) [junit-jupiter-engine-5.8.:5.8.2]
	at $testInstancesProvider$4(:272) [junit-jupiter-engine-5.8.:5.8.2]
	at (:267) ~[na:1.8.0_241]
	at $testInstancesProvider$5(:271) [junit-jupiter-engine-5.8.:5.8.2]
	at (:31) ~[junit-jupiter-engine-5.8.:5.8.2]
	at $prepare$0(:102) ~[junit-jupiter-engine-5.8.:5.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:101) ~[junit-jupiter-engine-5.8.:5.8.2]
	at (:66) ~[junit-jupiter-engine-5.8.:5.8.2]
	at $prepare$2(:123) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:123) ~[junit-platform-engine-1.8.:1.8.2]
	at (:90) ~[junit-platform-engine-1.8.:1.8.2]
	at (:1257) ~[na:1.8.0_241]
	at (:41) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$6(:155) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$8(:141) ~[junit-platform-engine-1.8.:1.8.2]
	at (:137) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$9(:139) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:138) ~[junit-platform-engine-1.8.:1.8.2]
	at (:95) ~[junit-platform-engine-1.8.:1.8.2]
	at (:1257) ~[na:1.8.0_241]
	at (:41) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$6(:155) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$8(:141) ~[junit-platform-engine-1.8.:1.8.2]
	at (:137) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$9(:139) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:138) ~[junit-platform-engine-1.8.:1.8.2]
	at (:95) ~[junit-platform-engine-1.8.:1.8.2]
	at (:35) ~[junit-platform-engine-1.8.:1.8.2]
	at (:57) ~[junit-platform-engine-1.8.:1.8.2]
	at (:54) ~[junit-platform-engine-1.8.:1.8.2]
	at (:107) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:88) ~[junit-platform-launcher-1.8.:1.8.2]
	at $execute$0(:54) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:67) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:52) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:114) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:86) ~[junit-platform-launcher-1.8.:1.8.2]
	at $(:86) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:53) ~[junit-platform-launcher-1.8.:1.8.2]
	at .junit5.(:71) ~[:na]
	at $(:33) ~[:na]
	at (:221) ~[:na]
	at (:54) ~[:na]
Caused by: : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
	at (:485) ~[spring-core-5.3.:5.3.21]
	at (:321) ~[spring-core-5.3.:5.3.21]
	at (:232) ~[spring-beans-5.3.:5.3.21]
	at (:210) ~[spring-beans-5.3.:5.3.21]
	at (:149) ~[spring-beans-5.3.:5.3.21]
	at (:305) ~[spring-context-5.3.:5.3.21]
	at (:1116) ~[spring-beans-5.3.:5.3.21]
	at (:594) ~[spring-beans-5.3.:5.3.21]
	... 83 common frames omitted
Caused by: : org/springframework/data/mapping/PreferredConstructor$Parameter
	at .getDeclaredMethods0(Native Method) ~[na:1.8.0_241]
	at (:2701) ~[na:1.8.0_241]
	at (:1975) ~[na:1.8.0_241]
	at (:467) ~[spring-core-5.3.:5.3.21]
	... 90 common frames omitted
Caused by: : $Parameter
	at (:382) ~[na:1.8.0_241]
	at (:418) ~[na:1.8.0_241]
	at $(:355) ~[na:1.8.0_241]
	at (:351) ~[na:1.8.0_241]
	... 94 common frames omitted

2022-07-03 21:18:18.530 ERROR 11768 --- [           main]       : Caught exception while allowing TestExecutionListener [@72035809] to prepare test instance [com.shiro2.Shiro2ApplicationTests@152c4495]

: Failed to load ApplicationContext
	at (:132) ~[spring-test-5.3.:5.3.21]
	at (:124) ~[spring-test-5.3.:5.3.21]
	at (:190) ~[spring-test-5.3.:5.3.21]
	at (:132) ~[spring-test-5.3.:5.3.21]
	at (:248) ~[spring-test-5.3.:5.3.21]
	at (:138) [spring-test-5.3.:5.3.21]
	at $invokeTestInstancePostProcessors$8(:363) [junit-jupiter-engine-5.8.:5.8.2]
	at (:368) [junit-jupiter-engine-5.8.:5.8.2]
	at $invokeTestInstancePostProcessors$9(:363) [junit-jupiter-engine-5.8.:5.8.2]
	at $3$(:193) ~[na:1.8.0_241]
	at $2$(:175) ~[na:1.8.0_241]
	at $(:1382) ~[na:1.8.0_241]
	at (:482) ~[na:1.8.0_241]
	at (:472) ~[na:1.8.0_241]
	at $(:312) ~[na:1.8.0_241]
	at $(:743) ~[na:1.8.0_241]
	at $(:742) ~[na:1.8.0_241]
	at $(:580) ~[na:1.8.0_241]
	at (:362) [junit-jupiter-engine-5.8.:5.8.2]
	at $instantiateAndPostProcessTestInstance$6(:283) [junit-jupiter-engine-5.8.:5.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:282) [junit-jupiter-engine-5.8.:5.8.2]
	at $testInstancesProvider$4(:272) [junit-jupiter-engine-5.8.:5.8.2]
	at (:267) ~[na:1.8.0_241]
	at $testInstancesProvider$5(:271) [junit-jupiter-engine-5.8.:5.8.2]
	at (:31) ~[junit-jupiter-engine-5.8.:5.8.2]
	at $prepare$0(:102) ~[junit-jupiter-engine-5.8.:5.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:101) ~[junit-jupiter-engine-5.8.:5.8.2]
	at (:66) ~[junit-jupiter-engine-5.8.:5.8.2]
	at $prepare$2(:123) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:123) ~[junit-platform-engine-1.8.:1.8.2]
	at (:90) ~[junit-platform-engine-1.8.:1.8.2]
	at (:1257) ~[na:1.8.0_241]
	at (:41) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$6(:155) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$8(:141) ~[junit-platform-engine-1.8.:1.8.2]
	at (:137) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$9(:139) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:138) ~[junit-platform-engine-1.8.:1.8.2]
	at (:95) ~[junit-platform-engine-1.8.:1.8.2]
	at (:1257) ~[na:1.8.0_241]
	at (:41) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$6(:155) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$8(:141) ~[junit-platform-engine-1.8.:1.8.2]
	at (:137) ~[junit-platform-engine-1.8.:1.8.2]
	at $executeRecursively$9(:139) ~[junit-platform-engine-1.8.:1.8.2]
	at (:73) ~[junit-platform-engine-1.8.:1.8.2]
	at (:138) ~[junit-platform-engine-1.8.:1.8.2]
	at (:95) ~[junit-platform-engine-1.8.:1.8.2]
	at (:35) ~[junit-platform-engine-1.8.:1.8.2]
	at (:57) ~[junit-platform-engine-1.8.:1.8.2]
	at (:54) ~[junit-platform-engine-1.8.:1.8.2]
	at (:107) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:88) ~[junit-platform-launcher-1.8.:1.8.2]
	at $execute$0(:54) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:67) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:52) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:114) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:86) ~[junit-platform-launcher-1.8.:1.8.2]
	at $(:86) ~[junit-platform-launcher-1.8.:1.8.2]
	at (:53) ~[junit-platform-launcher-1.8.:1.8.2]
	at .junit5.(:71) ~[:na]
	at $(:33) ~[:na]
	at (:221) ~[:na]
	at (:54) ~[:na]
Caused by: : Error creating bean with name 'jdbcMappingContext' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$]: Post-processing of merged bean definition failed; nested exception is : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
	at (:597) ~[spring-beans-5.3.:5.3.21]
	at (:542) ~[spring-beans-5.3.:5.3.21]
	at $doGetBean$0(:335) ~[spring-beans-5.3.:5.3.21]
	at (:234) ~[spring-beans-5.3.:5.3.21]
	at (:333) ~[spring-beans-5.3.:5.3.21]
	at (:208) ~[spring-beans-5.3.:5.3.21]
	at (:955) ~[spring-beans-5.3.:5.3.21]
	at (:918) ~[spring-context-5.3.:5.3.21]
	at (:583) ~[spring-context-5.3.:5.3.21]
	at (:734) ~[spring-boot-2.7.:2.7.1]
	at (:408) ~[spring-boot-2.7.:2.7.1]
	at (:308) ~[spring-boot-2.7.:2.7.1]
	at (:132) ~[spring-boot-test-2.7.:2.7.1]
	at (:99) ~[spring-test-5.3.:5.3.21]
	at (:124) ~[spring-test-5.3.:5.3.21]
	... 69 common frames omitted
Caused by: : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
	at (:485) ~[spring-core-5.3.:5.3.21]
	at (:321) ~[spring-core-5.3.:5.3.21]
	at (:232) ~[spring-beans-5.3.:5.3.21]
	at (:210) ~[spring-beans-5.3.:5.3.21]
	at (:149) ~[spring-beans-5.3.:5.3.21]
	at (:305) ~[spring-context-5.3.:5.3.21]
	at (:1116) ~[spring-beans-5.3.:5.3.21]
	at (:594) ~[spring-beans-5.3.:5.3.21]
	... 83 common frames omitted
Caused by: : org/springframework/data/mapping/PreferredConstructor$Parameter
	at .getDeclaredMethods0(Native Method) ~[na:1.8.0_241]
	at (:2701) ~[na:1.8.0_241]
	at (:1975) ~[na:1.8.0_241]
	at (:467) ~[spring-core-5.3.:5.3.21]
	... 90 common frames omitted
Caused by: : $Parameter
	at (:382) ~[na:1.8.0_241]
	at (:418) ~[na:1.8.0_241]
	at $(:355) ~[na:1.8.0_241]
	at (:351) ~[na:1.8.0_241]
	... 94 common frames omitted

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221

报错:: Failed to load ApplicationContext

: Failed to load ApplicationContext

	at (:132)
	at (:124)
	at (:190)
	at (:132)
	at (:248)
	at (:138)
	at $invokeTestInstancePostProcessors$8(:363)
	at (:368)
	at $invokeTestInstancePostProcessors$9(:363)
	at $3$(:193)
	at $2$(:175)
	at $(:1382)
	at (:482)
	at (:472)
	at $(:312)
	at $(:743)
	at $(:742)
	at $(:580)
	at (:362)
	at $instantiateAndPostProcessTestInstance$6(:283)
	at (:73)
	at (:282)
	at $testInstancesProvider$4(:272)
	at (:267)
	at $testInstancesProvider$5(:271)
	at (:31)
	at $prepare$0(:102)
	at (:73)
	at (:101)
	at (:66)
	at $prepare$2(:123)
	at (:73)
	at (:123)
	at (:90)
	at (:1257)
	at (:41)
	at $executeRecursively$6(:155)
	at (:73)
	at $executeRecursively$8(:141)
	at (:137)
	at $executeRecursively$9(:139)
	at (:73)
	at (:138)
	at (:95)
	at (:1257)
	at (:41)
	at $executeRecursively$6(:155)
	at (:73)
	at $executeRecursively$8(:141)
	at (:137)
	at $executeRecursively$9(:139)
	at (:73)
	at (:138)
	at (:95)
	at (:35)
	at (:57)
	at (:54)
	at (:107)
	at (:88)
	at $execute$0(:54)
	at (:67)
	at (:52)
	at (:114)
	at (:86)
	at $(:86)
	at (:53)
	at .junit5.(:71)
	at $(:33)
	at (:221)
	at (:54)
Caused by: : Error creating bean with name 'jdbcMappingContext' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$]: Post-processing of merged bean definition failed; nested exception is : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
	at (:597)
	at (:542)
	at $doGetBean$0(:335)
	at (:234)
	at (:333)
	at (:208)
	at (:955)
	at (:918)
	at (:583)
	at (:734)
	at (:408)
	at (:308)
	at (:132)
	at (:99)
	at (:124)
	... 69 more
Caused by: : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
	at (:485)
	at (:321)
	at (:232)
	at (:210)
	at (:149)
	at (:305)
	at (:1116)
	at (:594)
	... 83 more
Caused by: : org/springframework/data/mapping/PreferredConstructor$Parameter
	at .getDeclaredMethods0(Native Method)
	at (:2701)
	at (:1975)
	at (:467)
	... 90 more
Caused by: : $Parameter
	at (:382)
	at (:418)
	at $(:355)
	at (:351)
	... 94 more
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111

在网上找了两三个小时解决方案一直没多大用,尝试了降版本,直接解决了

<parent>
        <groupId></groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.7</version> <!--降版本 -->
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6