I am looking for a design approach. What i want to achieve to get all the 'old to new' changes when a entity is updated,during which also the changes to be recorded/audited into another entity. trick is former update to entiry happens in mysql using hibernate and the later entity lives in Mongo which is using morphia. both these provider inside my spring mvc, independently yet together. they dont bother each other coz all the CRUD happens independently for their respective changes. Last time, i tried a join with mongo and mysql using hibernate but realized that is not possible ! (not sure there is a solution ), But now I have take my audit changes to Mongo and track them there for every change in JPA/hibernate managed entities.
I have read and come up with some idea, i needs some experts to help me refine or suggest a better solution.
I am planning to implement spring aop and to intercept at service level, having a Audit service to set my Audit bean in order not to loose changes then in use some mechanism to get and set or flush the Audit change to the dedicated document in Mongo.
Not sure the above approach is meaningful and achievable. Any help will be greatly appreciated.
Audit4j支持Spring AOP支持的各种选项,但你必须为audit4j编写一个自己的MongoDB插件,目前它不可用。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.