Spring Boot application can't resolve the org.springframework.boot package

前端 未结 17 1973
半阙折子戏
半阙折子戏 2020-12-29 19:34

I have set up a spring boot project using the Spring Initializer, I tried several times to create a new project or play with the dependencies, everything seems to be in plac

17条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 20:29

    If the below step not work:

    Replaced my Spring Boot 1.4.2.RELEASE to 1.5.10.RELEASE

    • Right click on project and -> Maven-> Download Resources
    • right click on project -> Maven-> Update project

    The reason for this error might be multiple version of the same is downloaded into your maven local repository folder.

    So follow below steps to clear all existing repository jars and download all from beginning based on dependencies defined in your POM.xml..

    1. Go to build path . Check Maven Repository in the libraries added section.
    2. Choose any jar and mousehover .. it will show the local repository location. generally it is : user/.m2/repository/....
    3. Go to the location . and remove the repository folder contains.
    4. Now right click on your project .. do Maven --> maven update.
      This will solve your dependencies problem . as Maven will try to download all the items again from repository and build the project.

提交回复
热议问题