Results 1 to 4 of 4

Thread: Is there any way not to execute a line in a method using spring AOP ?

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Default Is there any way not to execute a line in a method using spring AOP ?

    Hi,

    Is there any way not to execute a line in a method using spring AOP ?

    Scenario : I have an application where we have some unnecessary logging which are undesirable. The culprit is a class where I have bunch of logging statements such as log.info and in the prod environment I don't have access to this class but I have access to the spring config xml. Can I apply an aspect to the class/in particular a method to stop executing the log.info statements ?
    Thanks in advance

    Gourab

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    Ehrm... Why? Simply disable logging for that class...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jul 2012
    Posts
    6

    Default

    Quote Originally Posted by Marten Deinum View Post
    Ehrm... Why? Simply disable logging for that class...
    Hi Marten,
    As I have already mentioned I do not have access to any other file or class except the spring config.

  4. #4
    Join Date
    Jan 2013
    Posts
    2

    Default

    hi dear
    try to enable AspectJ support... may be it will help you....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •