SpringBoot 启动报错:Unable to start embedded

启动springboot的时候报错,信息大概如下内容

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat

,网上第一种解决方案是在启动类上面加上注解:@SpringBootApplication(@SpringBootApplication = (默认属性)@Configuration + @EnableAutoConfiguration + @ComponentScan),

只要在springboot启动类上面写@springbootapplication这一个注解就行了,加上了如果还报错,则点击项目,右键-->build Path--->configure build path ,选择左边的java Build path ,再选择右边的libraries ,把关于Apache tomcat 的依赖去掉,点击apply,再次启动就能够成功了


你可能感兴趣的:(java)