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

前端 未结 17 1946
半阙折子戏
半阙折子戏 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:22

    When you run your application as an jar, your Manifest.MF file should know which class has the main method.

    To add this information when SpringBoot compiles your code, add start-class property on your pom file.

    E.g.:

    
            com.example.DemoApplication
    
    

提交回复
热议问题