报错如下:
2020-10-24 11:45:53.240 ERROR 10044 --- [main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration': Unsatisfied dependency expressed through field 'properties'; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'cxf-org.apache.cxf.spring.boot.autoconfigure.CxfProperties': Could not bind properties to 'CxfProperties' : prefix=cxf, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is javax.validation.NoProviderFoundException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
原因:
缺少了可用的验证依赖的实现类
解决方法:
增加bean的验证依赖
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.2.4.Final</version>
</dependency>