运行时报错如下:
出现叉号解决方式应该是 setting->builder->compiler->excludes,然后把path中的类删除
错误显示你这个自定义类中引用了 spring 框架的类,检查一下类所在的 jar 包是否是引入到 pom.xml 中了。