org.springframework.aop.interceptor.CustomizableTraceInterceptor Java Examples

The following examples show how to use org.springframework.aop.interceptor.CustomizableTraceInterceptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebConfig.java    From POC with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a trace interceptor for logging entry into and exit from methods.
 * @return the created trace interceptor
 */
@Bean
public CustomizableTraceInterceptor customizableTraceInterceptor() {
	CustomizableTraceInterceptor cti = new CustomizableTraceInterceptor();
	cti.setUseDynamicLogger(true);
	cti.setEnterMessage("Entering method '" + PLACEHOLDER_METHOD_NAME + "(" + PLACEHOLDER_ARGUMENTS
			+ ")' of class [" + PLACEHOLDER_TARGET_CLASS_NAME + "]");
	cti.setExitMessage("Exiting method '" + PLACEHOLDER_METHOD_NAME + "' of class [" + PLACEHOLDER_TARGET_CLASS_NAME
			+ "] took " + PLACEHOLDER_INVOCATION_TIME + "ms.");
	return cti;
}