0

私はSpring Roo + Spring Data + QueryDSLを使用しており、次のクラス/インターフェースを持っています:

public interface FamilyAdvertisementRepositoryCustom {
}

@RooJpaRepository(domainType = FamilyAdvertisement.class)
public interface FamilyAdvertisementRepository extends FamilyAdvertisementRepositoryCustom {
}

public class FamilyAdvertisementRepositoryImpl extends QueryDslRepositorySupport implements FamilyAdvertisementRepositoryCustom {
   //NO CONSTRUCTOR
}

次のパッケージのすべて:com.bignibou.repository;

次の設定で:

<repositories base-package="com.bignibou.repository" />

ただし、次のエラーが表示されます。

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project bignibou: Compiler errors : [ERROR] error at public class FamilyAdvertisementRepositoryImpl extends QueryDslRepositorySupport implements FamilyAdvertisementRepositoryCustom { [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ERROR] /home/julien/Documents/donnees/projets/site-garde-enfants/java/bignibou/src/main/java/com/bignibou/repository/FamilyAdvertisementRepositoryImpl.java:5:0::0 Implicit super constructor QueryDslRepositorySupport() is undefined for default constructor. Must define an explicit constructor

以前はそうでしたが、QueryDslRepositorySupportクラスにはデフォルトのコンストラクターがなくなったようです。何故ですか??

私が間違っているのは何ですか?

4

1 に答える 1

3

この変更は、から単一のドメイン タイプBuilderに返されることを強制するために導入されました。getBuilder()引数なしでコンストラクターを作成し、リポジトリを実装するドメインタイプでスーパークラスのコンストラクターを呼び出すだけです。

于 2013-03-11T10:04:45.453 に答える