我的类定义如下:
public class StartEventListener implements ApplicationListener<ContextRefreshedEvent>
我得到了错误:
The type ApplicationListener is not generic; it cannot be parameterized with the arguments <ContextRefresedEvents>
我已经尝试过用其他所有方法解决此问题,但都没有成功,有人知道可以解决此问题吗?
最佳答案
使用
import org.springframework.context.ApplicationListener;
您可能正在使用非通用
ApplicationListener