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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:10:55+00:00 2026-06-09T11:10:55+00:00

From the Spring doc : 6.2.3.4. Examples Spring AOP users are likely to use

  • 0

From the Spring doc:

6.2.3.4. Examples

Spring AOP users are likely to use the execution pointcut designator the most often. The format of an execution
expression is:

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

I can see the modifiers-pattern? where you can say public, private, protected. And on the same document it says:

6.2.3.1. Supported Pointcut Designators

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!

I’m abit confused, what is the point of using the modifiers-pattern?, please give an example?

  • 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-09T11:10:56+00:00Added an answer on June 9, 2026 at 11:10 am

    That documentation is now out of date. The latest is at https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#aop-pointcuts-designators and says

    Due to the proxy-based nature of Spring’s AOP framework, calls within
    the target object are, by definition, not intercepted. For JDK
    proxies, only public interface method calls on the proxy can be
    intercepted. With CGLIB, public and protected method calls on the
    proxy are intercepted (and even package-visible methods, if
    necessary). However, common interactions through proxies should always
    be designed through public signatures.

    Note that pointcut definitions are generally matched against any
    intercepted method. If a pointcut is strictly meant to be public-only,
    even in a CGLIB proxy scenario with potential non-public interactions
    through proxies, it needs to be defined accordingly.

    If your interception needs include method calls or even constructors
    within the target class, 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
    before making a decision.

    So be careful with non-public access modifiers, but you can use them in certain scenarios with cglib proxies.

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

Sidebar

Related Questions

I came from the Spring camp , I don't want to use Spring ,
From Spring Projects Issue Tracker Beans: public class JavaBean { private NestedBean nested; }
I'm just upgrading from Spring 3.0.6 to 3.1 and there seems to be an
After upgrading from Spring 3.0.0.M4 to 3.0.0.RC1 and Spring Security 3.0.0.M2 to 3.0.0.RC1, I've
How to clean jms queue from spring jms? Like clean command from MQ Explorer?
I have a Java program that executes from Spring Qquartz every 20 seconds. Sometimes
I recently upgraded my app from Spring 2.5.6 to Spring 3.0.0. A few days
So I have a project I am converting over from Spring MVC to Jersey
I'm trying to upgrade from Hibernate 3.6.5 to 4.0 (and from Spring 3.0.5 to
new to Laravel (coming from Java spring), while using Route::get('/', function() { return Hello

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.