启动ApplicationContext时出错。要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。 27-Sep-2018 14:42:06.307严重[localhost-startStop-1] org.springframework.boot.SpringApplication.reportFailure应用程序运行失败 org.springframework.beans.factory.UnsatisfiedDependencyException:在文件[D:\ appache \ apache-tomcat-8.5.34-windows-x64 \ apache-tomcat-8.5.34 \ webapps \ ng中定义名称为'userprofileResource'的bean创建时出错-ols-platformservices \ WEB-INF \ classes \ com \ ce \ resources \ UserprofileResource.class]:通过构造函数参数0表示的不满意依赖关系;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名称为'userProfileService'的bean时出错:ClassLoader [ParallelWebappClassLoader]在bean Class [com.ce.services.UserProfileService]上声明的构造方法的解析 上下文:ng-ols-platformservices 代表:假 ---------->父类加载器: java.net.URLClassLoader@c5a425e ]失败;嵌套的异常是java.lang.NoClassDefFoundError:org / springframework / data / jpa / repository / JpaRepository 在org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:732) 在org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:197) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1267) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1124) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) 在org.springframework.beans.factory.support.AbstractBeanFactory.lambda $ doGetBean $ 0(AbstractBeanFactory.java:317) 在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) 在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) 在org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) 在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) 在org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) 在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) 在org.springframework.boot.SpringApplication.run(SpringApplication.java:333) 在org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157) 在org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137) 在org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91) 在org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) 在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245) 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754) 在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) 在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) 在org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985) 在org.apache.catalina.startup.HostConfig $ DeployWar.run(HostConfig.java:1857) 在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) 在java.util.concurrent.FutureTask.run(FutureTask.java:266) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)
答案 0 :(得分:1)
您可以通过清除本地Maven存储库并再次下载来解决此问题。
Linux或Mac用户可以按照以下步骤操作。
1. navigate to .m2 file
2. execute remove command (rm -rf repository/).
窗口用户:
C:\Users\[username]\.m2\repository