首页 文章

使用spring-boot启动apache tomcat时出现以下错误

提问于
浏览
-1

当我用spring boot启动apache tomcat时,我得到的是异常我的组件扫描和其他一些注释:

@ComponentScan(basePackages =     
{"com.ce.resources","com.ce.services","com.ce.repository"}) 
@EnableJpaRepositories("com.ce.repository")
@EntityScan("healthchecker")
@SpringBootApplication

2018-10-01 14:22:21.000 WARN 14044 --- [ost-startStop-1] ConfigServletWebServerApplicationContext:在上下文初始化期间遇到异常 - 取消刷新尝试:org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为'的bean时出错userprofileResource'在文件中定义[D:\ appache \ apache-tomcat-8.5.34 \ webapps \ ng-ols-platformservice \ WEB-INF \ classes \ com \ ce \ resources \ UserprofileResource.class]:通过构造函数参数表示的不满意的依赖关系0;嵌套异常是org.springframework.beans.factory.UnsatisfiedDependencyException:在文件[D:\ appache \ apache-tomcat-8.5.34 \ webapps \ ng-ols-platformservice \ WEB-INF \中定义名称'userProfileService'创建bean时出错classes \ com \ ce \ services \ UserProfileService.class]:通过构造函数参数0表示的不满意的依赖;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'userProfileRespository'的bean时出错:init方法的调用失败;嵌套异常是java.lang.IllegalArgumentException:不是托管类型:class com.ce.entity.UserProfile 2018-10-01 14:22:21.000 INFO 14044 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean:关闭JPA持久性单元的EntityManagerFactory'default'2018-10-01 14:22:21.010 INFO 14044 --- [ost-startStop-1] com.zaxxer.hikari.HikariDataSource:HikariPool-1 - 关闭启动... 2018-10- 01 14:22:21.029 INFO 14044 --- [ost-startStop-1] com.zaxxer.hikari.HikariDataSource:HikariPool-1 - 关闭完成 . 2018-10-01 14:22:21.051 INFO 14044 --- [ost-startStop-1] ConditionEvaluationReportLoggingListener:

启动ApplicationContext时出错 . 要显示条件报告,请在启用“debug”的情况下重新运行应用程序 . 2018-10-01 14:22:21.080 ERROR 14044 --- [ost-startStop-1] o.s.boot.SpringApplication:应用程序运行失败

org.springframework.beans.factory.UnsatisfiedDependencyException:在文件[D:\ appache \ apache-tomcat-8.5.34 \ webapps \ ng-ols-platformservice \ WEB-INF \ classes \ com中定义的名称为'userprofileResource'的bean创建时出错\ ce \ resources \ UserprofileResource.class]:通过构造函数参数0表示的不满意的依赖关系;嵌套异常是org.springframework.beans.factory.UnsatisfiedDependencyException:在文件[D:\ appache \ apache-tomcat-8.5.34 \ webapps \ ng-ols-platformservice \ WEB-INF \中定义名称'userProfileService'创建bean时出错classes \ com \ ce \ services \ UserProfileService.class]:通过构造函数参数0表示的不满意的依赖;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'userProfileRespository'的bean时出错:init方法的调用失败;嵌套异常是java.lang.IllegalArgumentException:不是托管类型:org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:732)〜[spring-beans-5.0]中的com.ce.entity.UserProfile类.9.RELEASE.jar:5.0.9.RELEASE]在org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:197)〜[spring-beans-5.0.9.RELEASE.jar:5.0 . 9.RELEASE] org.springframework上的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1267)~ [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] . 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean上的beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1124)~ [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] (AbstractAutowireCapableBeanFactory.java:535)〜[spring-beans-5.0.9.RELEASE.jar:5.0.9.RE LEAGE]在org.springframework.beans的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)〜[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] . factory.support.AbstractBeanFactory.lambda $ doGetBean $ 0(AbstractBeanFactory.java:317)〜[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry . 在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)的getSingleton(DefaultSingletonBeanRegistry.java:222)〜[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]〜 [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)〜[spring-beans-5.0.9 . RELEASE.jar:5.0.9.RELEASE]在org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)〜[spring-beans-5.0.9.RELEASE.jar:5 . 0.9.RELEASE] atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)〜[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:550)〜[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) 〜[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780)〜[spring-boot-2.0.5.RELEASE.jar :org.springframework.boot上的org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412)〜[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]的2.0.5.RELEASE] .SpringApplication.run(SpringApplication.java:333)〜[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]在org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(Spr ingBootServletInitializer.java:157)[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)[spring -boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]在org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)[spring-boot-2.0.5.RELEASE .jar:2.0.5.RELEASE]在org.apache的org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)[spring-web-5.0.9.RELEASE.jar:5.0.9.RELEASE] . catalina.core.StandardContext.startInternal(StandardContext.java:5245)[catalina.jar:8.5.34] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[catalina.jar:8.5.34 ] org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)[catalina.jar:8.5.34] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)[catalina的.jar:8 .5.34] org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)[catalina.jar:8.5.34] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985) [catalina.jar:8.5.34] at org.apache.catalina.startup.HostConfig $ DeployWar.run(HostConfig.java:1857)[catalina.jar:8.5.34,at java.util.concurrent.Executors $ RunnableAdapter . 在java.util.concurrent.ThreadPoolExecutor.runWorker上调用(executors.java:511)[na:1.8.0_91] java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_91] ThreadPoolExecutor.java:1142)[na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_91]

1 回答

相关问题