执行此代码时出现这两个错误
error: SpringBeanFactoryPluginImpl is not abstract and does not override abstract method isTypeMatch(String,Class) in BeanFactory public class SpringBeanFactoryPluginImpl implements SpringBeanFactoryPlugin
error: name clash: isTypeMatch(String,Class<?>) in SpringBeanFactoryPluginImpl and isTypeMatch(String,Class) in BeanFactory have the same erasure, yet neither overrides the other public boolean isTypeMatch(String s, Class<?> class1)
public class SpringBeanFactoryPluginImpl implements SpringBeanFactoryPlugin,
BeanFactory {
private static BeanFactory beanFactory = new XmlWebApplicationContext();
public boolean containsBean(String s) {
// TODO Auto-generated method stub
return beanFactory.containsBean(s);
}
public String[] getAliases(String s) {
// TODO Auto-generated method stub
return beanFactory.getAliases(s);
}
public Object getBean(String s) throws BeansException {
return beanFactory.getBean(s);
}
private void checkBeanFactory(String string) throws FatalBeanException {
try {
Class clazz = Class.forName(string);
} catch (ClassNotFoundException e) {
throw new FatalBeanException(string + " was not found.");
}
}
public Object getBean(String s, Object[] aobj) throws BeansException {
// TODO Auto-generated method stub
return beanFactory.getBean(s, aobj);
}
public Class getType(String s) throws NoSuchBeanDefinitionException {
// TODO Auto-generated method stub
return beanFactory.getType(s);
}
public boolean isPrototype(String s) throws NoSuchBeanDefinitionException {
// TODO Auto-generated method stub
return beanFactory.isPrototype(s);
}
public boolean isSingleton(String s) throws NoSuchBeanDefinitionException {
// TODO Auto-generated method stub
return beanFactory.isSingleton(s);
}
public <T> T getBean(String s, Class<T> class1) throws BeansException {
return beanFactory.getBean(s, class1);
}
public boolean isTypeMatch(String s, Class<?> class1)
throws NoSuchBeanDefinitionException {
return beanFactory.isTypeMatch(s, class1);
}
public <T> T getBean(Class<T> s) throws BeansException {
return beanFactory.getBean(s);
}
}