我有类的定义如下:我如何修复错误“之类ApplicationListener不是通用的;它不能与参数<ContextRefresedEvents>进行参数化”?
public class StartEventListener implements ApplicationListener<ContextRefreshedEvent>
,我得到的错误:
The type ApplicationListener is not generic; it cannot be parameterized with the arguments <ContextRefresedEvents>
我已经尝试了所有我见过Ø解决这个问题,并有其他的方式没有任何人知道这个问题的解决办法吗?
不是作为一个Java专家,但它不应该读 “imple_me_nts”? –
通过使用正确的'ApplicationListener'从春天的一个,并使用一个版本的春天,有一个通用的'ApplicationListener'(这意味着一个版本的春季大那么3.0)它,你有一个旧版本,你会得到这个错误。如果您使用maven,请使用'mvn dependency:tree'来确定正在使用哪些版本(并解决该问题)。 –
如何确保eclipse使用正确的应用程序侦听器? –