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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:44:53+00:00 2026-05-31T12:44:53+00:00

Before certain methods (or as of now all the methods) I have to call

  • 0

Before certain methods (or as of now all the methods) I have to call the method of an Aspect to log some messages. My application is functioning correctly otherwise but none of the methods of the Aspect class are called.

I have tried the same cutpoint in same folder structure in my local application but when I try to include it with ZK i am having issues. I have also modified my application-context.xml to support AOP.

This is my aspect class :

package com.mypckg.services.impl;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class MyIntercpeter {

    @Pointcut("execution(* com.mypckg.services.impl.MyService.getStudents(..))")
    public void performance() {
    }

    @Before("performance()")
    public void doSomethingBeforeExecution() {
        System.out.println("Before execution method called...");


    }

    @AfterReturning("performance()")
    public void doSomethingAfterExecution() {
        System.out.println("After execution method called...");

    }
}

The modifications I made in the application-context.xml are

<beans  .........

    xmlns:aop="http://www.springframework.org/schema/aop"

    xsi:schemaLocation="
           ..........
             http://www.springframework.org/schema/aop
  http://www.springframework.org/schema/aop/spring-aop.xsd">


.....

<aop:aspectj-autoproxy />
<context:annotation-config />

Am I missing something? Thanks in advance.

  • 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-31T12:44:55+00:00Added an answer on May 31, 2026 at 12:44 pm

    Looks like you missed an obvious thing : you forgot to declare beans in spring config?

    From Spring docs:

    Spring AOP only supports method execution join points for Spring beans, so you can think of a pointcut as matching the execution of methods on Spring beans.

    http://static.springsource.org/spring/docs/2.0.x/reference/aop.html

    You can declare your beans with annotations or by config.

    Also would be better to put a version of spring you use (I supposed it was 2.0.x).

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

Sidebar

Related Questions

I'm writing an application that draws certain shapes. Before each shape is drawn, some
I have a legacy web application that was written long before there were even
I have some methods that return a List of T like say GetAllEvents. In
I am editing a certain website which before used the port 80 (default) that
Before you answer this I have never developed anything popular enough to attain high
Before, I have found the Cost in the execution plan to be a good
This is really annoying me as I have done it before, about a year
We have in place a simple implementation of GA and have had for some
For example, I have a HTML form with several input buttons, <form action=/index.php method=post>
In my C# Windows Forms application, I have a user control that contains other

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.