猿问

tomcat启动不了项目显示404

tomcat启动不了项目显示404我要把cboard整个文件夹都移动到webapps下了但是启动不了报错日志如下
16-Nov-201813:43:34.772严重[localhost-startStop-1]org.apache.catalina.core.StandardContext.listenerStartExceptionsendingcontextinitializedeventtolistenerinstanceofclass[org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'dashboardController':Unsatisfieddependencyexpressedthroughfield'jobService';nestedexceptionisorg.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'jobService':Unsatisfieddependencyexpressedthroughfield'mailService';nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'mailService':Injectionofautowireddependenciesfailed;nestedexceptionisjava.lang.IllegalArgumentException:Couldnotresolveplaceholder'mail.smtp.host'invalue"${mail.smtp.host}"
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
atorg.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
atorg.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
atjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
atjava.util.concurrent.FutureTask.run(FutureTask.java:266)
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
atjava.lang.Thread.run(Thread.java:748)
Causedby:org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'jobService':Unsatisfieddependencyexpressedthroughfield'mailService';nestedexceptionisorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'mailService':Injectionofautowireddependenciesfailed;nestedexceptionisjava.lang.IllegalArgumentException:Couldnotresolveplaceholder'mail.smtp.host'invalue"${mail.smtp.host}"
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
atorg.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
...28more
Causedby:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'mailService':Injectionofautowireddependenciesfailed;nestedexceptionisjava.lang.IllegalArgumentException:Couldnotresolveplaceholder'mail.smtp.host'invalue"${mail.smtp.host}"
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
atorg.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
...41more
Causedby:java.lang.IllegalArgumentException:Couldnotresolveplaceholder'mail.smtp.host'invalue"${mail.smtp.host}"
atorg.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
atorg.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
atorg.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258)
atorg.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:831)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086)
atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
atorg.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
...52more
问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
//请把代码文本粘贴到下方(请勿用图片代替代码)
你期待的结果是什么?实际看到的错误信息又是什么?
白猪掌柜的
浏览 1150回答 2
2回答

ITMISS

Tomcat报404,两个问题:1.Tomcat是否正常?在没有这个应用的情况下启动Tomcat,排除web容器导致的应用无法启动。2.应用debug开发是否可以正常启动?开发环境中启动应用,抛出异常信息:ExceptionsendingcontextinitializedeventtolistenerinstanceofclassContextLoaderListener根据报错信息就可以排查一下是否正确的配置了springMVC的ContextLoaderListener。参考官方手册配置文档
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答