【问题标题】:JpaRepository interface implementation, I want to understand where are its methods implemented? [duplicate]JpaRepository 接口实现,我想了解它的方法在哪里实现? [复制]
【发布时间】:2016-12-01 13:08:49
【问题描述】:

我在 Spring 中构建项目时遵循了一个教程,而 @Repository 接口 正在扩展另一个接口 JpaRepository,它为子接口添加了功能:

@Repository("myRepository")
public interface myRepository extends JpaRepository<Name, Long> {

}

在@Service 类中

@Autowired
private MyRepository myrepo;

@Transactional
public Stuff save(Stuff stuff) {
    return myrepo.save(stuff);
}

我想找到“SAVE”方法的实际代码。 已下载spring-data-commons-core-1.2.1.RELEASE.jar 并反编译,但在那里找不到实现。

【问题讨论】:

    标签: java spring


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-29
      • 1970-01-01
      • 2020-05-02
      • 1970-01-01
      • 2016-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多