0

超级班看起来像这样:

public class DomainRepository<T> {
    public DomainRepository(Class genericType) {
        this.genericType = genericType;
    }

    @Transactional(readOnly = true)
    public T get(final long id) {
        return (T) sessionFactory.getCurrentSession().get(genericType, id);
    }
}

子类看起来像这样

public class FooRepository extends DomainRepository<Foo> {
    public FooRepository(){
        super(Foo.class);
    }

    @Override
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public Foo get(final Long id) { //blah blah

但是我的 IDE 突出显示了 @Override 注释 sayign 方法上的错误确实覆盖了任何东西......?

4

1 回答 1

4

好像Longlong不匹配。

于 2013-02-19T11:01:06.530 回答