在 Spring Data JPA 中使用带有审计的 Java 配置 [英] Using Java Configuration with auditing in Spring Data JPA

查看:34
本文介绍了在 Spring Data JPA 中使用带有审计的 Java 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java 配置 在 1.2.0 版中引入Spring Data,但我不知道 <jpa:auditing> 的 java 配置应该是什么样子.我在文档中找不到任何示例,我也没有通过查看 Spring Data JPA 源来弄清楚.

Java configuration was introduced in version 1.2.0 of Spring Data, but I can't figure out how the java configuration for <jpa:auditing> should look like. I couldn't find any examples in the docs, neither did I figure it out by looking at the Spring Data JPA Source.

我怀疑不可能将 <jpa:auditing> 翻译成 java 配置,但由于我找不到 Jira 可能缺少的功能,我不确定.有谁知道如果我在审计中使用 Spring Data JPA 是否还需要使用 XML 配置?

I'm suspecting it's not possible to translate <jpa:auditing> into java configuration, but as I couldn't find a Jira for the possibly missing feature, I'm unsure. Does anyone know if I still have to use XML configuration if I use Spring Data JPA with auditing?

推荐答案

此功能从 Spring Data 的 1.5 M1 版开始可用.有关详细信息,请参阅 Alex Blomskøld 创建的.

This feature is available as of version 1.5 M1 of Spring Data. See the ticket created by Alex Blomskøld for details.

JavaConfig 目前不支持激活审计,这意味着我们在 1.2.0 中引入.无论如何,我们都计划全面检修审计基础设施,您是否介意针对 Spring Data JPA 提交一张票以捕获故事的这一方面?

Activating auditing is currently not supported by the JavaConfig means we introduced in 1.2.0. As we're planning to generally overhaul the auditing infrastructure anyway, would you mind filing a ticket against Spring Data JPA to capture that aspect of the story?

这篇关于在 Spring Data JPA 中使用带有审计的 Java 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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