Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6732079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:36:22+00:00 2026-05-26T10:36:22+00:00

We are looking at spring’s AOP framework for adding Audit log functionality in our

  • 0

We are looking at spring’s AOP framework for adding Audit log functionality in our application based on Spring MVC.

In our application whenever we call a service method we pass extra audit log object (in addition to the normal method parameter). This audit log object has few properties pre populated like username, user id and user ip address etc.

In the actual service method we set few more properties on the audit log object depending on method being called or the operation being performed in the service method.

This is very dynamic and varies from method to method.

In the AOP classes we can intercept the method parameters and the return values. But what about the values which are being calculated based on the operation being performed in the service method and then set on the audit log object. This values wont be available in the AOP classes.

Basically we need to populate the audit log object and then save it in the db after execution of the method with the come parameters being set in method being intercepted only.

Is there any we can do this?

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:36:23+00:00Added an answer on May 26, 2026 at 10:36 am

    In the AOP class you should have access to the audit object since you have access to the method parameters. So after the method returns, find the audit object in the method parameters and operate on it. It doesn’t matter which argument the audit object is, as long as you can find it by type.

    The values you set on the audit object should still be there since the audit object was passed by reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a legacy web application (not Spring based) and are looking for best
I'm currently building a Spring MVC application. I was looking to use JSP pages
While looking through the Spring MVC framework I noticed that, unless I misunderstand, its
I'm looking at integrating a wizard in an existing Spring 3 MVC+JPA+Jquery+JSP application. I
I am looking for a web based report designer supporting spring/hibernate. I have seen
I'm currently looking into the spring-security framework - great stuff so far, pretty impressed.
I'm looking for an example Spring MVC 2.5 web app that I can easily:
When I'm looking at Spring FrameWork 3.0 I see the following code example: @RequestMapping(/index.dlp)
I have a working Spring MVC application(doing everything I wanted when deployed to jboss)
Just been looking at the Spring framework for JDBC - it looks like there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.