1
に春ブーツ1.5.6.RELEASEをアップグレードするとき、私は、次のJPAのリポジトリがあります。私がしようとすると、スプリングブート2.0.0でコンパイルした場合春データJPAコンパイルエラー2.0.0.M4
public interface ProductRepositoryJPA extends CrudRepository<Product,String>,
PagingAndSortingRepository<Product,String> {
@Override
@EntityGraph(value="EVERYTHING", type= EntityGraph.EntityGraphType.FETCH)
Product findOne(String id);
}
を。 M4は、私は次のようなエラーが発生します。私は春ブーツ1.5.6.RELEASEを使用する場合
ProductRepositoryJPA.java:[21,5] method does not override or implement a method from a supertype
コードは罰金コンパイルします。
@Overrideアノテーションを削除してSpringブートをバージョン2.0.0.M3に保存すると、コンパイルも正常に行われます。ここで
は春ブーツ2.0.0.M3のための私の依存関係ツリーです:
-- maven-dependency-plugin:2.10:tree (default-cli) @ example-load ---
[INFO] com.example.product-load:jar:1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.0.M4:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.0.M4:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.0.M4:compile
[INFO] | \- org.springframework:spring-core:jar:5.0.0.RC4:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.0.0.RC4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-log4j:jar:1.2.8.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.0.M4:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.0.M4:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.0.M4:test
[INFO] | \- org.springframework:spring-test:jar:5.0.0.RC4:test
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.0.M4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.0.M4:compile
[INFO] | | \- org.springframework:spring-aop:jar:5.0.0.RC4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.0.M4:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.0.0.RC4:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.0.0.RC3:compile
[INFO] | | +- org.springframework:spring-orm:jar:5.0.0.RC4:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.0.0.RC4:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.0.0.RC4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-elasticsearch:jar:2.0.0.M4:compile
[INFO] \- org.springframework.data:spring-data-elasticsearch:jar:3.0.0.RC3:compile
[INFO] +- org.springframework:spring-context:jar:5.0.0.RC4:compile
[INFO] | \- org.springframework:spring-expression:jar:5.0.0.RC4:compile
[INFO] +- org.springframework:spring-tx:jar:5.0.0.RC4:compile
[INFO] \- org.springframework.data:spring-data-commons:jar:2.0.0.RC3:compile
と春ブーツ1.5.6.RELEASEのための私の依存関係ツリー:
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.5.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.5.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.6.RELEASE:compile
[INFO] | \- org.springframework:spring-core:jar:4.3.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-log4j:jar:1.2.8.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.6.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.6.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.6.RELEASE:test
[INFO] | \- org.springframework:spring-test:jar:4.3.10.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:4.3.10.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.3.10.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.11.6.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:4.3.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:4.3.10.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:4.3.10.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-elasticsearch:jar:1.5.6.RELEASE:compile
[INFO] \- org.springframework.data:spring-data-elasticsearch:jar:3.0.0.RC3:compile
[INFO] +- org.springframework:spring-context:jar:4.3.10.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.10.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.3.10.RELEASE:compile
[INFO] \- org.springframework.data:spring-data-commons:jar:1.13.6.RELEASE:compile
ありがとう!