IDEA的springboot项目启动报错

Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled.
2019-03-08 16:58:52|zswd-main|ERROR|192.168.1.194 | SKY-20181230ZNG|[main]| org.springframework.boot.SpringApplication| Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tomcatEmbeddedServletContainerFactory’ defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration E m b e d d e d T o m c a t . c l a s s ] : I n i t i a l i z a t i o n o f b e a n f a i l e d ; n e s t e d e x c e p t i o n i s j a v a . l a n g . I l l e g a l A r g u m e n t E x c e p t i o n : C o n t e x t P a t h m u s t s t a r t w i t h ′ / ′ a n d n o t e n d w i t h ′ / ′ a t o r g . s p r i n g f r a m e w o r k . b o o t . c o n t e x t . e m b e d d e d . E m b e d d e d W e b A p p l i c a t i o n C o n t e x t . o n R e f r e s h ( E m b e d d e d W e b A p p l i c a t i o n C o n t e x t . j a v a : 137 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . r e f r e s h ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 537 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . c o n t e x t . e m b e d d e d . E m b e d d e d W e b A p p l i c a t i o n C o n t e x t . r e f r e s h ( E m b e d d e d W e b A p p l i c a t i o n C o n t e x t . j a v a : 122 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h ( S p r i n g A p p l i c a t i o n . j a v a : 693 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h C o n t e x t ( S p r i n g A p p l i c a t i o n . j a v a : 360 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 303 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1118 ) a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1107 ) a t c o m . d i n g x i n . w u d a n g . A p p . m a i n ( A p p . j a v a : 9 ) C a u s e d b y : o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . B e a n C r e a t i o n E x c e p t i o n : E r r o r c r e a t i n g b e a n w i t h n a m e ′ t o m c a t E m b e d d e d S e r v l e t C o n t a i n e r F a c t o r y ′ d e f i n e d i n c l a s s p a t h r e s o u r c e [ o r g / s p r i n g f r a m e w o r k / b o o t / a u t o c o n f i g u r e / w e b / E m b e d d e d S e r v l e t C o n t a i n e r A u t o C o n f i g u r a t i o n EmbeddedTomcat.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: ContextPath must start with '/' and not end with '/' at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) at com.dingxin.wudang.App.main(App.java:9) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration EmbeddedTomcat.class]:Initializationofbeanfailed;nestedexceptionisjava.lang.IllegalArgumentException:ContextPathmuststartwith/andnotendwith/atorg.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)atorg.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:303)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1118)atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1107)atcom.dingxin.wudang.App.main(App.java:9)Causedby:org.springframework.beans.factory.BeanCreationException:ErrorcreatingbeanwithnametomcatEmbeddedServletContainerFactorydefinedinclasspathresource[org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfigurationEmbeddedTomcat.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: ContextPath must start with ‘/’ and not end with ‘/’
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:199)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
… 8 common frames omitted
Caused by: java.lang.IllegalArgumentException: ContextPath must start with ‘/’ and not end with ‘/’
at org.springframework.boot.context.embedded.AbstractConfigurableEmbeddedServletContainer.checkContextPath(AbstractConfigurableEmbeddedServletContainer.java:132)
at org.springframework.boot.context.embedded.AbstractConfigurableEmbeddedServletContainer.setContextPath(AbstractConfigurableEmbeddedServletContainer.java:120)
at org.springframework.boot.autoconfigure.web.ServerProperties.customize(ServerProperties.java:197)
at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.postProcessBeforeInitialization(EmbeddedServletContainerCustomizerBeanPostProcessor.java:73)
at org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizerBeanPostProcessor.postProcessBeforeInitialization(EmbeddedServletContainerCustomizerBeanPostProcessor.java:59)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
… 16 common frames omitted
Disconnected from the target VM, address: ‘127.0.0.1:61149’, transport: ‘socket’

Process finished with exit code 1

你可能感兴趣的:(IDEA的springboot项目启动报错)