micronaut 是否有一种方法可以从 spring 中的界面自动生成 "Spring Data JPA" 存储库?

Is there with micronaut a way to have the "Spring Data JPA" repository autogenerated from an interface like in spring?

我正在使用 micronaut 设置一个新的微服务,并希望它通过 jpa/hibernate 访问数据库。

是否有一种简单的方法可以像 spring 一样从界面自动生成 "Spring Data JPA" 存储库实现?

interface ExampleRepository {
    fun FindById(id: String): Example
}

理想情况下,我能够通过 DI 将 ExampleRepository 导入到我的服务中。

编辑:Micronaut 数据正在发布中:https://github.com/micronaut-projects/micronaut-data

目前没有,但计划在未来提供此类功能。

2019 年 7 月,Micronaut 作者发布了 Predator——预计算数据存储库的缩写——相当于 Spring 数据。

Quoting:

Predator uses Micronaut's ahead-of-time (AoT) compilation APIs to move the entity meta-model into your compiler and translate a finder expression like findByTitle into the appropriate SQL or JPA-QL query at compilation time. A very thin runtime layer that uses Micronaut's reflection-free compilation-time AOP then only has to execute the query and return the results.

更新:该项目现已重命名为 "Micronaut Data"、here is the new link to the docs