Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can log everything by using <code>CustomizableTraceInterceptor</code> you can either set it in your application context xml config and use AOP: (log level Trace)</p> <pre><code> &lt;bean id="customizableTraceInterceptor" class="org.springframework.aop.interceptor.CustomizableTraceInterceptor"&gt; &lt;property name="exitMessage" value="Leaving $[methodName](): $[returnValue]" /&gt; &lt;/bean&gt; </code></pre> <p>or you can completly customize it by implementing it in Java and use the method setExitMessage():</p> <pre><code>public class TraceInterceptor extends CustomizableTraceInterceptor { private Logger log = LoggerFactory.getLogger("blabla"); @Override protected void writeToLog(Log logger, String message, Throwable ex) { //Write debug info when exception is thrown if (ex != null) { log.debug(message, ex); } .... } @Override protected boolean isInterceptorEnabled(MethodInvocation invocation, Log logger) { return true; } @Override public void setExitMessage(String exitMessage) { .... //Use PlaceHolders } } </code></pre> <p>and use the placeholders such as '$[returnValue]'. You can find the complete list in the <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/aop/interceptor/CustomizableTraceInterceptor.html" rel="noreferrer">spring api documentation</a>.</p> <p>EDIT: Also, if you want to get the value of your @ResponseBody in another interceptor, I think it's not possible until version > 3.1.1. Check this issue: <a href="https://jira.springsource.org/browse/SPR-9226" rel="noreferrer">https://jira.springsource.org/browse/SPR-9226</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload