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 8647901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:11:15+00:00 2026-06-12T13:11:15+00:00

I came across the following Spring AOP pointcut in a tutorial: execution(public * *

  • 0

I came across the following Spring AOP pointcut in a tutorial:

execution(public * * (..))

it was said that it would cause the execution of all public methods. Is that correct? AFAIK we can only intercept public methods, and that public keyword there is even illegal.

  • 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-12T13:11:17+00:00Added an answer on June 12, 2026 at 1:11 pm

    In addition to @Mario’s answer, the spring docs on AOP say the following (emphasis mine):

    Note Due to the proxy-based nature of Spring’s AOP framework,
    protected methods are by definition not intercepted, neither for JDK
    proxies (where this isn’t applicable) nor for CGLIB proxies (where
    this is technically possible but not recommendable for AOP purposes
    ).
    As a consequence, any given pointcut will be matched against public
    methods only!

    If your interception needs include protected/private methods or even
    constructors, consider the use of Spring-driven native AspectJ weaving
    instead of Spring’s proxy-based AOP framework. This constitutes a
    different mode of AOP usage with different characteristics, so be sure
    to make yourself familiar with weaving first before making a decision.

    In addition, the pointcut grammer is as follows:

    execution(modifiers-pattern? ret-type-pattern declaring-type-pattern?
              name-pattern(param-pattern) throws-pattern?)
    

    Wherby the modifier-pattern would be public,protected etc but is optional…

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

Sidebar

Related Questions

I came across some Java code that had the following structure: public MyParameterizedFunction(String param1,
I came across the following code recently and would like to optimize it: Public
I came across the following code that compiles fine (using Visual Studio 2005): SomeObject
I was working with spring-ehcache-annotations and came across following scenario: I have a simple
I came across the following issue: I have this model public class Region {
I came across the following program class Boolean { public static void main(String argv[])
Watching a tutorial today I came across the following: var q2Var1 = hi there.,
I came across the following java code. Here interface contains two methods out of
I came across the following code in a book recently. It says that we
I came across a difference in speed using the following two structs: public struct

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.