IntelliJ IDEA 无法启动 SpringBoot项目

  在使用IDEA新建了SpringBoot项目,准备启动的时候,无法运行,没有特别明显的报错。报错信息如下:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.7.RELEASE)

2017-09-27 14:26:41.448  INFO 62888 --- [           main] com.apabi.fonts.FontsApplication         : Starting FontsApplication on liu-jiang with PID 62888 (D:\workspace\fonts\target\classes started by liu.jiang in D:\workspace\fonts)
2017-09-27 14:26:41.448  INFO 62888 --- [           main] com.apabi.fonts.FontsApplication         : No active profile set, falling back to default profiles: default
2017-09-27 14:26:41.511  INFO 62888 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7f9fcf7f: startup date [Wed Sep 27 14:26:41 CST 2017]; root of context hierarchy
2017-09-27 14:26:42.230  WARN 62888 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2017-09-27 14:26:42.653  WARN 62888 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2017-09-27 14:26:42.855  INFO 62888 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-09-27 14:26:42.871  INFO 62888 --- [           main] com.apabi.fonts.FontsApplication         : Started FontsApplication in 1.626 seconds (JVM running for 2.059)
2017-09-27 14:26:42.871  INFO 62888 --- [       Thread-5] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@7f9fcf7f: startup date [Wed Sep 27 14:26:41 CST 2017]; root of context hierarchy
2017-09-27 14:26:42.871  INFO 62888 --- [       Thread-5] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

Process finished with exit code 0

  项目用eclipse打开运行,是没有问题的,但是IDEA就存在问题。搜索的结果是因为 pom.xml 存在问题。

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>

解决的方案是 去掉 <scope>provided</scope>

参考: http://blog.csdn.net/fuyaopingbu/article/details/70314236
http://blog.csdn.net/wo541075754/article/details/51698552

0

一个有关“IntelliJ IDEA 无法启动 SpringBoot项目”的想法

发表评论