Spring boot 嵌入式tomcat不适用于spring boot 2.0.1

Spring boot 嵌入式tomcat不适用于spring boot 2.0.1,spring-boot,tomcat,Spring Boot,Tomcat,我是弹簧靴的新手。所以今天我开始研究SpringBoot2.0.1版本。但是当我运行Spring启动应用程序时,它不会加载嵌入式tomcat。我使用的是从SpringBoot参考文档中获取的SpringBootHelloWorld示例。我的Tomcat版本是9,Java版本是10.0.1 我以以下方式运行Spring boot: . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( (

我是弹簧靴的新手。所以今天我开始研究SpringBoot2.0.1版本。但是当我运行Spring启动应用程序时,它不会加载嵌入式tomcat。我使用的是从SpringBoot参考文档中获取的SpringBootHelloWorld示例。我的Tomcat版本是9,Java版本是10.0.1

我以以下方式运行Spring boot:

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

2018-05-07 12:06:18.348  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : Starting BikeApplication on siva-PC with PID 3640 (started by siva in E:\Udemy Course Ae\SPRING WITH SPRING BOOT AT LYNDA\demo)
2018-05-07 12:06:18.352  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : No active profile set, falling back to default profiles: default
2018-05-07 12:06:18.412  INFO 3640 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e21e98f: startup date [Mon May 07 12:06:18 IST 2018]; root of context hierarchy
2018-05-07 12:06:18.593  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : Started BikeApplication in 0.715 seconds (JVM running for 1.434)
2018-05-07 12:06:18.598  INFO 3640 --- [       Thread-0] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e21e98f: startup date [Mon May 07 12:06:18 IST 2018]; root of context hierarchy
  • start.spring.io并单击“MAVEN”上带有“JAVA”和spring Boot“2.0.1”的Generate项目
  • 组“com.globomatics”和工件“bike”
  • 依赖关系“web”
  • 之后,我单击“切换到完整版本”选项卡
  • 并将Java版本8更改为10
  • 最后“点击生成项目”
  • 导入maven现有项目
  • pom.xml 并将应用程序作为“Java应用程序”运行,并以以下方式给出输出:

      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v2.0.1.RELEASE)
    
    2018-05-07 12:06:18.348  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : Starting BikeApplication on siva-PC with PID 3640 (started by siva in E:\Udemy Course Ae\SPRING WITH SPRING BOOT AT LYNDA\demo)
    2018-05-07 12:06:18.352  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : No active profile set, falling back to default profiles: default
    2018-05-07 12:06:18.412  INFO 3640 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e21e98f: startup date [Mon May 07 12:06:18 IST 2018]; root of context hierarchy
    2018-05-07 12:06:18.593  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : Started BikeApplication in 0.715 seconds (JVM running for 1.434)
    2018-05-07 12:06:18.598  INFO 3640 --- [       Thread-0] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e21e98f: startup date [Mon May 07 12:06:18 IST 2018]; root of context hierarchy
    

    你介意发布你的pom/gradle文件吗?添加你的
    pom.xml
    ,你可能想要清除你的本地存储库,以防你的jar坏了<代码>mvn依赖项:清除本地存储库这将删除所有依赖项重建将重新下载依赖项(
    mvn包
    或在IDE中刷新)。我在此处添加了我的pom.xml。我已经把罐子重新装上了。但它仍然显示相同的错误msgM。迪纳姆的评论应该是一个答案。清除我的本地回购为我解决了这个问题。
      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v2.0.1.RELEASE)
    
    2018-05-07 12:06:18.348  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : Starting BikeApplication on siva-PC with PID 3640 (started by siva in E:\Udemy Course Ae\SPRING WITH SPRING BOOT AT LYNDA\demo)
    2018-05-07 12:06:18.352  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : No active profile set, falling back to default profiles: default
    2018-05-07 12:06:18.412  INFO 3640 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e21e98f: startup date [Mon May 07 12:06:18 IST 2018]; root of context hierarchy
    2018-05-07 12:06:18.593  INFO 3640 --- [           main] com.globomatics.bike.BikeApplication     : Started BikeApplication in 0.715 seconds (JVM running for 1.434)
    2018-05-07 12:06:18.598  INFO 3640 --- [       Thread-0] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5e21e98f: startup date [Mon May 07 12:06:18 IST 2018]; root of context hierarchy