2016-06-20 11 views
0

私のコードは次のようになります。Spring-DataとQueryDSLの使い方は?

@Document(collection = "address") 
public class Address implements Serializable { 

    private static final long serialVersionUID = 1L; 

    @Id 
    private String id; 

    @Field("address_id") 
    private Integer addressId; 
} 

public interface AddressRepository extends MongoRepository<Address,String> { 

} 

問題がQueryDSLのドキュメントがmorphiaの@Entityアノテーションを言及していることですが、スプリングスドキュメントは春データQueryDSLをサポートしていることを主張しますか?問題は、「Spring-Dataを使用している場合、QueryDSL成果物を作成するにはどうすればよいですか?

答えて

1

解決策:@QueryEntityとcom.mysema.query.apt.QuerydslAnnotationProcessorを使用

関連する問題