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

  • SEARCH
  • Home
  • 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 8599779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:28:10+00:00 2026-06-12T01:28:10+00:00

Every time I read the official Spring AOP documentation ( link ), I get

  • 0

Every time I read the official Spring AOP documentation (link), I get confused by the behavior of advices wrt RuntimeExceptions. Would someone check if my undestanding is correct for the following advices?

@Before

  • Advice throws Exception = Target (not executed) Advice (executed)
  • Target throws Exception = Target (executed) Advice (executed)

@AfterReturning

  • Advice throws Exception = Target (executed) Advice (executed)
  • Target throws Exception = Target (executed) Advice (not executed)

@AfterThrowing

  • Advice throws Exception = Target (executed) Advice (not executed)
  • Target throws Exception = Target (executed) Advice (executed)

@After

  • Advice throws Exception = Target (executed) Advice (executed)
  • Target throws Exception = Target (executed) Advice (executed)

@Around

  • Advice throws Exception = Target (executed) Advice (executed)
  • Target throws Exception = Target (executed) Advice (executed up to point.proceed())
  • 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-06-12T01:28:11+00:00Added an answer on June 12, 2026 at 1:28 am

    This is how I usually look at it.

    try {
        //@Before
        method();
        //@AfterReturning
    } catch(Throwable t) {
        //@AfterThrowing
    } finally {
        //@After
    }
    

    @Around is kind of its own beast. Since you choose when to invoke the target, you are able to catch any Exception‘s it may throw. Therefore, you can easily wrap the call in a try-catch-finally and have access to any and all of the joinpoints previously mentioned.

    I am assuming that when you say ‘executed’, you mean ‘executed to the point that the exception was thrown’.

    Another thing that may be important to you is the @Order annotation. Higher valued @Order‘s occur first on the before side, and they work themselves out backwards on the after side. Make sure you keep that in mind when combining multiple Advices to the same target.

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

Sidebar

Related Questions

Every time I open Eclipse, I get the error: Unable to read workbench state.
Is it executed / read-by-the-server every time a page on the site is loaded?
I feel, every time I read a C or C++ program, that half or
Every time I set my twitter app to be read-write is says settings saved
I read some website development materials on the Web and every time a person
Every time I read about using synchronized in Scala the author will usually mention
Every time i try to read a file form the hard drive and cast
I get the following error in Chrome every time I try to run my
It annoys me every time I use -XX:+PrintAssembly with Hotspot and have to read
Every time I read either WSGI or CGI I cringe. I've tried reading on

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.