我有
public class Assembler extends ResourceAssemblerSupport<User, BeanResource<User> {
public Assembler() {
super(UserController.class, BeanResource<User>.class);
}
}
super的第二个参数给我编译错误。无法从参数化类型中选择。为什么?
这是超类
public abstract class ResourceAssemblerSupport<T, D extends ResourceSupport> implements ResourceAssembler<T, D> {
public ResourceAssemblerSupport(Class<?> controllerClass, Class<D> resourceType) {}