异常:Error creating bean with name ‘methodValidationPostProcessor’ defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘methodValidationPostProcessor’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘jotm’ defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.hfb.merchant.datasource.JotmFactoryBean]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: stub class initialization failed

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
	<!-- 移除嵌入式tomcat插件 -->
	<exclusions>
		<exclusion>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-tomcat</artifactId>
		</exclusion>
		<exclusion>
			<groupId> org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
		</exclusion>
	</exclusions>
</dependency>

Error creating bean with name 'methodValidationPostProcessor' defined in class path resource
如上图所示加入红框中的代码

相关文章:

  • 2021-10-30
  • 2021-12-24
  • 2021-09-07
  • 2021-11-27
  • 2021-06-24
  • 2021-10-18
  • 2022-01-23
  • 2021-06-20
猜你喜欢
  • 2021-09-23
  • 2022-01-20
  • 2021-06-15
  • 2021-06-30
  • 2021-05-30
  • 2021-10-25
  • 2021-06-12
相关资源
相似解决方案