问题描述 SpringBoot项目启动时报了这样的错: 解决方案 注解SpringBootTest里的参数有问题: 应该是: @SpringBootTest(classes = FreemarkerDemoApplication.class) 修改代码以后,项目正常启动。