如何将 spring-data-envers 集成到我的项目中 [英] How to integrate spring-data-envers into my project

查看:47
本文介绍了如何将 spring-data-envers 集成到我的项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要集成这个项目,可在 https://github.com/spring-projects/spring-data-envers 进入我的项目.我正在使用 spring-boot 来管理我的所有配置,所以我不知道如何添加该行:进入我的项目.我将依赖 spring-data-envers 添加到我的项目中,但是为了使用 spring-data 提供的存储库,必须完成我没有看到的其他事情.请给我一个关于如何使用 spring-boot 执行此操作的提示

Hi I need to integrate this project available at https://github.com/spring-projects/spring-data-envers into my project. I'm using spring-boot to manage all my configurations so I don't know how to add the line : into my project. I added the dependency spring-data-envers into my project but in order to use the repository that spring-data provides something else has to be done that I'm not seeing. Please give me a hint on how to do this with spring-boot

推荐答案

添加:

@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)

我们使用这个:

@Configuration
@EnableJpaAuditing(auditorAwareRef = "auditorAwareImpl")
@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
@EnableTransactionManagement
public class DataRestConfig
    extends RepositoryRestMvcConfiguration {
}

这篇关于如何将 spring-data-envers 集成到我的项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆