@@ -0,0 +1,2484 @@
+/*%0A * Copyright 2015-2018 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.poc.restfulpoc.config;%0A%0Aimport org.springframework.aop.Advisor;%0Aimport org.springframework.aop.aspectj.AspectJExpressionPointcut;%0Aimport org.springframework.aop.interceptor.CustomizableTraceInterceptor;%0Aimport org.springframework.aop.support.DefaultPointcutAdvisor;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.context.annotation.EnableAspectJAutoProxy;%0A%0A/**%0A * Defines Web Requests related configuration.%0A *%0A * @author Raja Kolli%0A *%0A */%0A@Configuration%0A@EnableAspectJAutoProxy%0Apublic class WebConfig %7B%0A%0A%09private static final String PLACEHOLDER_METHOD_NAME = %22$%5BmethodName%5D%22;%0A%0A%09private static final String PLACEHOLDER_ARGUMENTS = %22$%5Barguments%5D%22;%0A%0A%09private static final String PLACEHOLDER_TARGET_CLASS_NAME = %22$%5BtargetClassName%5D%22;%0A%0A%09private static final String PLACEHOLDER_INVOCATION_TIME = %22$%5BinvocationTime%5D%22;%0A%0A%09/**%0A%09 * Creates a trace interceptor for logging entry into and exit from methods.%0A%09 * @return The created trace interceptor%0A%09 */%0A%09@Bean%0A%09public CustomizableTraceInterceptor customizableTraceInterceptor() %7B%0A%09%09CustomizableTraceInterceptor cti = new CustomizableTraceInterceptor();%0A%09%09cti.setUseDynamicLogger(true);%0A%09%09cti.setEnterMessage(%22Entering method '%22 + PLACEHOLDER_METHOD_NAME + %22(%22%0A%09%09%09%09+ PLACEHOLDER_ARGUMENTS + %22)' of class %5B%22 + PLACEHOLDER_TARGET_CLASS_NAME%0A%09%09%09%09+ %22%5D%22);%0A%09%09cti.setExitMessage(%22Exiting method '%22 + PLACEHOLDER_METHOD_NAME + %22' of class %5B%22%0A%09%09%09%09+ PLACEHOLDER_TARGET_CLASS_NAME + %22%5D took %22 + PLACEHOLDER_INVOCATION_TIME%0A%09%09%09%09+ %22ms.%22);%0A%09%09return cti;%0A%09%7D%0A%0A%09@Bean%0A%09public Advisor traceAdvisor() %7B%0A%09%09AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();%0A%09%09pointcut.setExpression(%22execution(public * com.poc.restfulpoc..*.*(..))%22);%0A%09%09return new DefaultPointcutAdvisor(pointcut, customizableTraceInterceptor());%0A%09%7D%0A%0A%7D%0A

Enable log proxy #57