springboot2.0中报错如下
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1694)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:548)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at com.tongweb.web.thor.core.ThorStandardContext.startInternal(ThorStandardContext.java:340)
at com.tongweb.web.thor.util.LifecycleBase.start(LifecycleBase.java:150)
at com.tongweb.web.thor.core.ContainerBase.addChildInternal(ContainerBase.java:913)
at com.tongweb.web.thor.core.ContainerBase.addChild(ContainerBase.java:889)
at com.tongweb.web.thor.core.StandardHost.addChild(StandardHost.java:618)
at com.tongweb.web.thor.core.ThorStandardHost.addChild(ThorStandardHost.java:584)
at com.tongweb.web.thor.startup.ThorHostConfig.deployWar(ThorHostConfig.java:697)
at com.tongweb.twnt.thor.ThorWebtierWebAppBuilder.fireWebtierProcess(ThorWebtierWebAppBuilder.java:2424)
at com.tongweb.twnt.thor.ThorWebtierWebAppBuilder.deployApplication(ThorWebtierWebAppBuilder.java:2364)
at com.tongweb.deploy.TongWebDeployer.deploy(TongWebDeployer.java:212)
at com.tongweb.deploy.commands.DeployCommand.deploy(DeployCommand.java:321)
at com.tongweb.console.deployer.service.DeployerService.deploy(DeployerService.java:391)
at com.tongweb.console.deployer.controller.DeployerController.deploy(DeployerController.java:318)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
at org.jboss.resteasy.springmvc.ResteasyHandlerAdapter.createModelAndView(ResteasyHandlerAdapter.java:87)
at org.jboss.resteasy.springmvc.ResteasyHandlerAdapter.handle(ResteasyHandlerAdapter.java:74)
at org.jboss.resteasy.springmvc.ResteasyHandlerAdapter.handle(ResteasyHandlerAdapter.java:24)
at org.jboss.resteasy.springmvc.ResteasyWebHandlerTemplate.handle(ResteasyWebHandlerTemplate.java:39)
at org.jboss.resteasy.springmvc.ResteasyHandlerAdapter.handle(ResteasyHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:859)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:883)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:792)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.tongweb.web.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.tongweb.console.commons.AuthorityFilter.doFilter(AuthorityFilter.java:111)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.tongweb.console.commons.LoginFilter.doFilter(LoginFilter.java:50)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.tongweb.console.commons.ConsoleFilter.doFilter(ConsoleFilter.java:25)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.tongweb.console.commons.LogFilter.doFilter(LogFilter.java:79)
at com.tongweb.web.thor.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at com.tongweb.web.thor.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.tongweb.web.thor.core.ThorStandardWrapperValve.invoke(ThorStandardWrapperValve.java:202)
at com.tongweb.web.thor.core.StandardContextValve.invoke(StandardContextValve.java:242)
at com.tongweb.twnt.thor.OpenEJBValve.invoke(OpenEJBValve.java:46)
at com.tongweb.web.thor.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at com.tongweb.web.thor.core.ThorStandardHostValve.invoke(ThorStandardHostValve.java:89)
at com.tongweb.web.thor.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at com.tongweb.web.thor.core.StandardEngineValve.invoke(StandardEngineValve.java:154)
at com.tongweb.web.thor.connector.CoyoteAdapter.service(CoyoteAdapter.java:411)
at com.tongweb.web.oro.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017)
at com.tongweb.web.oro.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at com.tongweb.web.webutil.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1788)
at com.tongweb.web.webutil.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1765)
at com.tongweb.web.webutil.util.threads.TWThreadPoolExecutor.runWorker(TWThreadPoolExecutor.java:1165)
at com.tongweb.web.webutil.util.threads.TWThreadPoolExecutor$Worker.run(TWThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;
at org.hibernate.validator.internal.xml.config.ValidationBootstrapParameters.(ValidationBootstrapParameters.java:63)
at org.hibernate.validator.internal.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:540)
at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:337)
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:309)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1753)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1690)
... 85 common frames omitted
解决办法
将项目中的validation-api-xxx.jar替换tongWeb中jar(/root/TongWeb6.1/lib/endorsed下的validation-api-xxx.jar)