The type org.springframework.context.ConfigurableApplicationContext cannot be resolved

后端 未结 2 524
攒了一身酷
攒了一身酷 2020-12-16 04:57

I am getting the following error, when i tried to create my first application in Spring Tool Suite:

Multiple markers at this line - The

相关标签:
2条回答
  • 2020-12-16 05:25

    Your maven cache is corrupted. To resolve this problem, follow the steps below:

    • Go to the directory of your project on the command line.
    • Make sure your POM.xml is in the same directory as your command line
    • Run the command

      mvn dependency:purge-local-repository
      
    • If you receive build successful message, means the error has been resolved.

    • If error is still there, delete your (~/.m2/repository/org/springframework) folder and run

      mvn package
      

    It will work properly now.

    0 讨论(0)
  • 2020-12-16 05:32

    Updated the spring-boot-starter-parent to latest version . Resolved the problem for me

    <parent>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-parent</artifactId>
          **<version>1.3.6.RELEASE</version> // update this to latest**
          <relativePath/> <!-- lookup parent from repository -->
    </parent>
    
    0 讨论(0)
提交回复
热议问题