Java file: Content not allowed in prolog

后端 未结 4 1642
有刺的猬
有刺的猬 2021-01-17 23:38

I\'m new to Spring and started using the Sprint Tool Suite (eclipse) and see this error in a java file in my maven project: \"Content is not allowed in prolog\". This preve

4条回答
  •  半阙折子戏
    2021-01-18 00:05

    In my case this error occured while I was renamed main class (class annotated with @SpringBootApplication) of springboot application. I don't mean this will always happen but I accidently got this error after rename this class file in STS 3.8.4.

    To resolve this issue, I closed the IDE, navigate to project folder and delete the .springBeans file. After reopened IDE, this error was gone and my IDE no longer complains about this.

提交回复
热议问题